Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Changing default printer for IReport

Posted on 2002-05-08
9
Medium Priority
?
1,168 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
9 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 6996823
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
ID: 6997137
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
ID: 6998793
I want to print directly from Delphi without any dialogs.
0
Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

 

Author Comment

by:roioep
ID: 6998951
I want to print directly from Delphi without any dialogs.
0
 
LVL 4

Accepted Solution

by:
YodaMage earned 200 total points
ID: 6999016
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
ID: 9346635
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 101

Expert Comment

by:mlmcc
ID: 9350787
Not sure.

mlmcc
0
 
LVL 7

Expert Comment

by:mnye
ID: 9827829
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

636 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