Solved

Changing default printer for IReport

Posted on 2002-05-08
9
1,114 Views
Last Modified: 2011-10-03
Hi,

I have a project in Delphi 4 using Crystal Report IReport.

The printer of the IReport is the Windows default printer but I want to be able to select any printer.

Please provide code !
0
Comment
Question by:roioep
  • 2
  • 2
  • 2
  • +1
9 Comments
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
Are you trying to print directly from Delphi or do you preview the report first?

If you preview the report first you should be able to change the printer when you print from the preview screen.

Does the following solve your problem?
http://support.crystaldecisions.com/library/kbase/articles/c2003743.asp

In VB there is a property on the CR control which can be set
CR_Object.PrinterName = MyPrinter

Delphi I am sure has something similar.

mlmcc
0
 
LVL 4

Expert Comment

by:YodaMage
Comment Utility
Your printer selection for the running app is storeed in the printer index. All you need to do is drop TPrintDialog, then fire it with

printdialog1.execute;

User changes to the selection in the dialog will effect your application for as long as it is running, and accross forms. As long as your reports are not hardcoded to a printer and are instead using the default, you should be fine.
0
 

Author Comment

by:roioep
Comment Utility
I want to print directly from Delphi without any dialogs.
0
 

Author Comment

by:roioep
Comment Utility
I want to print directly from Delphi without any dialogs.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 4

Accepted Solution

by:
YodaMage earned 50 total points
Comment Utility
If you want to hardcode the printer (not a wise choice), then set the Tcrpe.printer as needed in code and fire directly the printer.
0
 
LVL 7

Expert Comment

by:mnye
Comment Utility
This question has been classified abandoned. I will make a recommendation to the moderators on its resolution in a week or two. I appreciate any comments that would help me to make a recommendation.
 

Unless it is clear to me that the question has been answered I will recommend delete. It is possible that a Grade less than A will be given if no expert makes a case for an A grade. It is assumed that any participant not responding to this request is no longer interested in its final disposition.

 
If the user does not know how to close the question, the options are here:
http://www.experts-exchange.com/help/closing.jsp

mnye
EE Cleanup Volunteer
0
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
Not sure.

mlmcc
0
 
LVL 7

Expert Comment

by:mnye
Comment Utility
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

PAQ/No Refund, resolved by YodaMage

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

mnye
EE Cleanup Volunteer
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now