Skip to Content
avatar image
Former Member

Remove Printer Name from Crystal Report

How can i remove the printer name from the Crystal Report so that the PrinterName property of the CRAXDRT.Report object in the RDC SDK is blank WITHOUT having the "No Printer" Option checkbox checked?

Here's the scenerio. When I first create a Report and don't go into Page Setup, PrinterName property is blank. If I go into Page Setup and explicitly select a printer, PrinterName property equals the name of the printer selected. If I check the "No Printer" checkbox in Page Setup, PrinterName property is blank. But if i go back in and uncheck the "No Printer" checkbox in Page Setup, the PrinterName property equals the name of my Windows Default Printer.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 20, 2011 at 08:28 PM

    I'm not 100% sure how will help me with existing Crystal Reports? I don't have a problem when creating a new Crystal Report because I know not to go into Page Setup. But we have over 50 existing reports where my company's network printer is saved in the report. I'm trying to resolve the issue with the existing reports.

    Does the CR XI R2 SP6 expose the "No Printer" option in .NET?

    Add comment
    10|10000 characters needed characters exceeded

    • Hello,

      No, there is no option or way to verify or get/set the No Printer option in any version of CR runtime other than in the designer.

      By default CR XI R2 is WYSIWYG and it does this by using the Video driver and default printer the same as Adobe does it. So even if you set the No Printer option it still uses the PC's default printer to render the report.

      One work around that is generic is install the Windows Generic Print Driver which everyone has on older PC's or use the Microsoft XPS Document Writer on newer PC, set that as default printer and then update and save the reports. You can set the printer in code, saveAs to update the RPT and now it has a generic printer name.

      So the ultimate question is WHY do you need to remove the printer name?

      Thank you

      Don

  • Apr 13, 2011 at 02:06 PM

    Taking this thread and [Crystal Reports RDC SDK "No Printer" Option|Crystal Reports RDC SDK "No Printer" Option; together, I assume there is a relationship - perhaps even the same query asked in different ways(?).

    What I am wondering about is;

    Can you summarize the two queries and state what will be the end product of this? E.g.; why the need to remove the printer name at runtime?

    - Ludek

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 13, 2011 at 02:14 PM

    I have multiple queries because i am trying to attack this problem from anydirection that will solve my issue. If being able to detect the "No Printer" option is selected in the RDC SDK...my issue will be solved. If, through the Crystal Designer, I can remove the Printer Name after one has already been set, then that solves my issue as well.

    Add comment
    10|10000 characters needed characters exceeded

    • If, through the Crystal Designer, I can remove the Printer Name after one has already been set, then that solves my issue as well.

      I'm missing something here. In your firs tpost you say:

      If I check the "No Printer" checkbox in Page Setup, PrinterName property is blank.

      That is all you should need to do to remove the selected printer.

      Now, if you go back and uncheck the "No Printer" checkbox in Page Setup, the PrinterName property will select the default printer, thus again removing a preset printer.

      Perhaps a description of ;

      If, through the Crystal Designer, I can remove the Printer Name after one has already been set, then that+ solves my issue+ as well.

      may be good. What is the actual issue?

      - Ludek

  • avatar image
    Former Member
    Apr 15, 2011 at 01:11 PM

    I need to remove the PrinterName from the report when the "No Printer" checkbox unchecked.

    When "No Printer" checkbox is checked, and i give the report to the client, it doesn't print at all.

    When I uncheck the "No Printer" checkbox, it puts my windows default printer in the report. Then when i give the report to the client, it takes upward of up to a minute for the report to start printing to their windows default printer because apparently the report is looking for my printer and just sits there searching for it because if figures out that printer doesn't exist on the clients machine and uses their default printer.

    Add comment
    10|10000 characters needed characters exceeded

    • Ok. So after 5 days, I finally know what the issue is... I suspect that it would have been better to provide that piece of info 1st(?) as now we can look at it and move on to a resolution.

      To make an analogy, all you were telling me is that you wanted to access the wire to the blinker light of your car. I had no idea why. You, knew that the light does not work and assumed it was a broken wire. But it could have been the fuse, the filament or a myriad of other things...

      I'm still missing tons of info, so to begin with please provide the following;

      Version of CR

      CR Service Packs applied

      Web or Win app?

      OS?

      Development language?

      Method of CR files deployment

      Where were the runtime files downloaded from?

      What is the version of the craxdrt.dll on the deployed box?

      Umm, looking at the blog [What do I need to do to get the fastest issue resolution?|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/12045] [original link is broken] [original link is broken] [original link is broken]; may be a good idea for next time... The [Rules of Engagement|http://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] - Step 2 Asking Your Question; Provide Enough Information - is also a good read.

      - Ludek

  • avatar image
    Former Member
    Apr 20, 2011 at 06:52 PM

    I'm still not sure what is unclear about my first question. And I'm not sure how any of the info you are requesting is going to make any difference in answering my question. And I'm not sure how your analogy fits here but ..

    Version of CR = 11.0.0.895

    CR Service Packs applied = None

    Web or Win app? = Win App

    OS? = Windows XP Service Pack 3

    Development language? = Both Visual Basic 6 and C#.Net 2008

    Method of CR files deployment = email the .RPT file to a client

    Where were the runtime files downloaded from? = Runtimes are installed from Merge Modules donwload from SAP site

    What is the version of the craxdrt.dll on the deployed box? = 11.0.0.893

    So here are the exact steps so you can understand what is going on:

    I have the Crystal Reports Application open side-by-side with my Visual Basic development environment in debug mode so i can step through the code using the RDC SDK.

    1. I open the Crystal Reports Application and create a brand new report - "Test.RPT" and DO NOT go into Page Setup at all and save the report.

    2. In my Visual Basic development environment, i run the code that will generate the report, Here's the exact code

    Dim m_crApp As CRAXDRT.Application

    Dim m_crReport As CRAXDRT.Report

    Set m_crApp = New CRAXDRT.Application

    Set m_crReport = New CRAXDRT.Report

    Set m_crReport = m_crApp.OpenReport("Test.RPT")

    3. When i look at the PrinterName property in the CRAXDRT.Report object, it is blank.

    ie. crReport.PrinterName is equal to ""

    4. I reopen the Crystal Reports Application with report "Test.RPT" and go into Page Setup and check the "No Printer" option.

    5. I go back into my Visual Basic development environment and rerun the code that will generate the report.

    6. When i look at the PrinterName property in the CRAXDRT.Report object, it is still blank.

    ie. crReport.PrinterName is equal to ""

    7. I reopen the Crystal Reports Application with report "Test.RPT" and go into Page Setup and uncheck the "No Printer" option. I have NOT specified any printer, nor have i clicked the "Printer..." button to setup a printer....i have just unchecked the "No Printer" option

    8. I go back into my Visual Basic development environment and rerun the code that will generate the report.

    9. When i look at the PrinterName property in the CRAXDRT.Report object, it is now set to my WINDOWS DEFAULT PRINTER, yet i had not specified any printer.

    ie. crReport.PrinterName is equal to "
    MyNetwork\MyPrinter"

    PROBLEMS:

    1. The client needs the report to go to the default windows printer of their machine

    2. If the "No Printer" Option is checked, the Report does not print at all

    3. If the report is set to MY default windows printer and i give it to the client, at times it takes upwards of to a minute for the Print Dialog to disply. As i've read on other forum posts, it appears Crystal is looking for MY printer on the clients machine and takes a minute before i realizes it can't find it and then sets it to the CLIENTS default windows printer.

    4. The client believes it is unreasonable to wait a minute for the print dialog to appear ...and i agree.

    5. I cannot change the code to use the Select Printer in the RDC SDK - it's a long explanation why but just suffice it to say that i cannot do this.

    All i want to do is either:

    1. Remove the Printer Name in the actual report from the Crystal Reports designer - basically undoing what Crystal did when i went into Page Setup.

    2. Via the RDC SDK, be able to detect the "No Printer" option is selected. Checkign CRAXDRT.PrinterName equal to "" is not an option.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 01, 2011 at 08:08 PM

    I understand the problem described because I am experiencing the same issue. I have upgraded from XI to XI R2, but this did not fix the issue. The problem is this: In creating a report in Crystal Reports XI R2 with the option "No Printer" unchecked in Page Setup, the default printer of the development machine is saved with the report. When the report is run on a client machine and the user goes to print the report, Crystal wants to print to the default printer of the development machine instead of the client default printer.

    I am using XI R2 SP6 with hot fixes 6.3.

    Is there a solution or one in the making?

    CRViewer.dll version is 11.5.12.1838

    Edited by: RHawkins on Jul 1, 2011 10:32 PM

    Add comment
    10|10000 characters needed characters exceeded