Change Report Printing Resolution through VB 6

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>

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.

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
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.

exp_rhcAuthor Commented:
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

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)


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.