Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am working on a windows based application with c# and built in Crystal Report in Visual Studio 2005. CrystalReportViewer is the tool to show the report.

I found that, my crystal report is not getting any information from my system printer. During development, whatever print information I am saving in my crystal report for my system printer (Design --> Printer Setup), according to that I am facing two types of situation here –

  1. if it gets that printer active during runtime, it’s showing that information properly. After that, If I change my system printer preferences from control panel then my crystal report is not reflecting those changes. It’s detecting that printer but print preferences are shown as it’s mentioned in the crystal report during development.
  2. Secondly, if it’s not getting that printer active during runtime (Say some other printers are active in my machine at that time), then its detecting the printer but print preferences are showing for the ‘No Printer’ settings in crystal report.

While Notepad, Word every application is detecting the System printer preferences properly. If I make changes in my System printer preferences then also Notepad, Word etc applications are reflecting those changes properly. So, my question is why crystal report is not reflecting the changes we make in our system printer preferences during runtime? Any suggestion or hint will be greatly appreciated. I tried this code also:

bl.PrintOptions.PaperSize = PaperSize.DefaultPaperSize;

bl --> reference to my crystal report object.

But, no fortune.


--------REPLY--------

My default printer is OKI MICROLINE 321 TURBO with paper size Fanfold 15x12 in(Tractor feed). I am using the built in crystal report from visual studio 2005 for my windows based application. While creating the report I have chosen the printer as OKI with Fanfold 15x12 in(Tractor feed) in the Design->printer setup dialog box from my report. The report is showing properly.

After generating the report when I click the print button in the report, the print dialog box comes out as usual. In the print dialog box the default printer is OKI as expected. Its showing the paper size as Fanfold 15x12 properly.

But, the problem is, it’s keeping the paper size as Fanfold 15x12, even if I change the paper size of my system’s default printer(Say A4) in runtime from control panel.

share|improve this question
    
What version of Crystal reports are you using? Do you have a default printer selected? I noticed I get the no printer option in v6 when I have no default printer or when the paper type isn't compatible with the report. –  Kyle Aug 31 '12 at 19:07
    
Also I notice your reference PaperSize.DefaultPaperSize; That option is pulled the advanced tab> printing defaults. If you are changing paper size you have to set it in General> Preferences and Advanced > Printing defaults. –  Kyle Aug 31 '12 at 19:13
    
Please find the Edit(---REPLY---) section.. And thanks for your reply.. –  John Smith Aug 31 '12 at 19:47
    
Is there any code present to find the active printer settings and then set it to the crystal report? So that the Crystal report can detect the machine printer settings dynamically like Notepad,Word etc –  John Smith Sep 1 '12 at 8:17

1 Answer 1

Try to File->Page Setup and enable "No Printers" checkbox, that helped me

http://support.cyriouswiki.com/Crystal+Report+Ignores+Printer+Setting

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.