Change Report Printing Resolution through VB 6

Posted on 2004-11-16
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
    LVL 19

    Expert Comment

    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 100

    Expert Comment

    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 100

    Expert Comment

    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

    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 100

    Accepted Solution

    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

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Suggested Solutions

    Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
    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 …
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    745 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

    17 Experts available now in Live!

    Get 1:1 Help Now