Change Report Printing Resolution through VB 6

Posted on 2004-11-16
Medium Priority
Last Modified: 2008-02-01
Dear Brothers...

I am Saed Ali from Saudi Arabia. I have a little problem and I need a solution. The problem detail is as follow:

We developed a VB application which shows a list of Crystal Reports (RPT files). The user can run the report by double click on the report from the list. We placed a CRViewer control for showing the report. The name of this control is "Crystal Report 8.5 ActiveX Designer Run Time Library" which can be added through adding the file (craxddrt.dll) in the References window. Also, we added the Print Button to this control. So, the user can print the report to his default printer.

Also, we are using the Windows Terminal Server technology and this VB Application is installed on our terminal servers. All the users who want to use this application should connect to the terminal server and run it from there.

Our problem is in the printing resolution of the report. The user clicks on the Print Button and then we found the report resolution is 600 dpi or 1200 dpi. This resolution is fixed even if we changed the printer resolution through the Printer Properties to 300 dpi. We need to fix it to 300 dpi always because we have users who connected using dialup connection and 600 dpi & 1200 dpi is slowing the Printing Procedures.

So, is there any way to fix the resolution to a fixed value in VB or in Windows Registry?

Thanks & Regards

Saudi Arabia - Riyadh
S. A. Al-Rajhi Holding Company
Business Solutions & Software Developer

<personal contact information removed by mlmcc PE>

Question by:exp_rhc
  • 3
LVL 19

Expert Comment

ID: 12592727
The printer preferences cannot be controlled from a central location as these are set locally on each client PC where the chosen printer is installed. You may however be able to control this high level printing API calls using VB, but this forum isn't the place for that question you may get better answers in a seperate forum.

LVL 101

Expert Comment

ID: 12593413
Personal information can be placed in your profile but is prohibited in the question forums.  I copied it to a deleted comment so if EE Admins wish to make it available they can.

mlmcc PE
LVL 101

Expert Comment

ID: 12593490
I totally agree with Gary.  The kind of control you wish to exercise cannot be done with the Crystal controls but rather must be done through the VB application.  I recommend you ask this questiion in the VB TA or perhaps the VB Controls TA.  This question can be moved there if you so desire or you could put a linking questiion in those forums.

We had a simiilar problem with reports that users wanted to print 2-sided.  Unless the report was built with a printer set to default to 2-sided the user couldn't change it.  Since my development printer couldn't do that, I installed a "ghost" printer with the capability and then opened and saved the reports.  Users could then do what they wanted.
One idea to try.
On one of the report development machines
Setup the default printer the way you want the report to print
  Resoultion, 2-sided, etc
Edit one of the reports with Crystal
Verify the printer setup is as desired from within Crystal
Save the report

Test to see if it is now set as desired.


Author Comment

ID: 12694770
Dear mlmcc,

The solution which you provide was a valid solution for us. But, the problem that we have more than 800 reports among the departments in each company of our sister companies. So, we want to find a solution from within the code of our viewer system. Also, don't forget that we have to make a policy that no report will be deployed unless it is attached to the configured printer.

Actually, in the past few days, we found the following:

As you know we are using the Terminal Server Technology and whenever the user connect to one of our TS and this user has a printer HP 1200, a virtual printer will be created with the following name "__HP1200/<user name>/<terminal session id>" and this printer will be the logged user default printer (Note also that there is a printer driver defined in the Terminal Server with the name "HP 1200" and the properties for the created virtual printer can be inherited from this HP 1200 printer). Now, if the user runs a report and he prints the report, it will be spooled to this virtual printer. The solution that we found to overcome our problem is:

1. The printer "HP 1200" will be configured according to our need.

2. Then, we will place our own Printer Setup button in the Crystal Report Viewer System and it will has the following code in the Click action:

         CrxReport.PrinterSetup (0)


         Public CrxReport As CRAXDRT.Report

3. The user will click on the Printer Setup button (our button) and he will get a Printer Setup Dialog box. One of the Printer Properties is "Default Properties". If the user tick that check box and clicks OK, and then print the report, it will work fine.

So, the challenge that I face is how to tick that check box through the VB code without user interaction. If you have a solution or any of the forum members, please supply.

If there is a need for more clarification about the problem, I will do so.

Thanks & Regards

Saudi Arabia - Riyadh
S. A. Al-Rajhi Holding Company
Business Solutions & Software Developer

LVL 101

Accepted Solution

mlmcc earned 2000 total points
ID: 12703013
Unfortunately I don't know of any way to do that though an application might be written to do just that.

You might look at the utilities on this page

Report inspector (rtpInspector)


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…
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…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

579 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