0
votes

Currently i have the problem, that printing on a matrix printer using it's embedded fonts does not work when printing from our c# core. The printer/crystal reports always change the font, to some windows font. Due to this fact, printing a single page is very slow.

If i print directly withing the crystal reports designer, everything works pretty well and the correct font is used. So it works, but not when printing from c#. That means, the driver and printer is working well, and it is also possible for crystal reports, to send every thing to the printer. Just when i start printing within the .net application, it does not work.

In the report the correct printer is set and i do not override any settings. I just create the report and print it:

private ReportDocument reportDocument = new ReportDocument('C:\\Rpt\\Test.rpt');
// Passing parameter and every thing to the report
// Than print it:
reportDocument.PrintOptions.PrinterName = "Tally";
reportDocument.PrintToPrinter(1, false, 0, 0);

Is there some thing wrong with the .net print engine/runtime inside of crystal reports? I thing the designer does not use .net for this, so the other components will be used, which works.

EDIT

In this article from sap snc, i found:

FYI - CR Designer uses the DEVMODE structure to access the printer, .NET uses >the .NET Framework equivolent in System.Drawing.Printing.PrinterSettings

Maybe this is the problem?

EDIT 2

Using Crystal Reports RAS for printing, may solve the problem. I'll give it a try and let you know.

Thank you all!

1

1 Answers

0
votes

I wouldn't say it's because of the runtime, but rather because of the options the .net interface calls the Crystal Reports engine with. Typically you can ressort to the fonts built into the target system / printer. I'm no expert on Crystal Reports, but in PostScript and PDF you can embed the necessary fonts in the document itself, or you can make the output device use its own fonts. CR must have a similar option, but you've gotta activate it explicitly when using it from client SW.