cancel
Showing results for 
Search instead for 
Did you mean: 

Printing Maxicode Labels

Former Member
0 Kudos

We are experiencing an issue where we can print a label with a maxicode from within Crystal Reports and the label looks fine.  Printing from an application compiled against the Crystal Reports runtime dlls results in the maxicode being compressed by about 5%.  This results in the maxicode not being scannable.  We are using version 13 for both Crystal Reports and the runtimes.

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Hello Patrick

CR Version 13 is not enough information. What service pack are you on? If you do not know, look at the version of the crpe32.dll and quote that:

C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86

- Ludek

Senior Support Engineer AGS Primary Support, Global Support Center Canada

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

Former Member
0 Kudos

Hello Ludek,

The person building the .rpt file is using version 14.0.4.738.  I am developing against version 13.0.1.220 of CrystalDecisions.CrystalReports.Engine.dll.

former_member183750
Active Contributor
0 Kudos

Hello Patrick

Building reports in version 14 and running hem in version 13 is perfect. But. You have are using SP 1 for CRVS (13.x). I'd like you to update your install to SP5 and see if that helps. Links to SP5 install and runtime files are here:

http://scn.sap.com/docs/DOC-7824

- Ludek

Former Member
0 Kudos

Ludek,

I updated to SP5 (13.0.5.891) and I'm still seeing the same results.  Our issue seems similar to this one http://scn.sap.com/thread/3287614.  Our issue only occurs when printing from a .NET application by creating a CrystalDecisions.CrystalReports.Engine.ReportDocument and calling the PrintToPrinter() method on the ReportDocument.  Printing from Crystal Reports 14 works fine as does printing the report from Visual Studio.

0 Kudos

Try adding this to your app:

CrystalDecisions.Shared.PrintLayoutSettings PrintLayout = new CrystalDecisions.Shared.PrintLayoutSettings();

PrintLayout.Scaling = PrintLayoutSettings.PrintScaling.DoNotScale;

Same as in the designer in the report Options:


Don

Former Member
0 Kudos

Thanks for suggestion Don, but that didn't resolve the issue.  I also tried setting the margins in the PageSettings and on the ReportDocument to 0.  Any other suggestions?

0 Kudos

HI Patrick,

Use the RAS PrintOutputController then, it use ActiveX printer dll and shoudl be the same as the Designer. Removed System.Printer from the picture. P2P uses all Windows Framework to do the printing.

Don

Former Member
0 Kudos

Thanks for the suggestion Don.  Can you point me towards resources that would help explain how to do this?  It looks like I need to set up a server to host the reports?  Does this require a version of Crystal beyond the Visual Studio add on?

I have the following code in place but the last line (printOutputController.PrintReport(printReportOptions);) results in an exception with the message 'Error HRESULT E_FAIL has been returned from a call to a COM component.   at CrystalDecisions.ReportAppServer.Controllers.PrintOutputControllerClass.PrintReport(PrintReportOptions options) '

private void PrintCrystalReport(string reportLocation, string xsdLocation, int numberOfCopies, string printerName)

{

    var xmlDataSet = new DataSet();

    xmlDataSet.ReadXml(xsdLocation);

          var reportToPrint = new CrystalDecisions.CrystalReports.Engine.ReportDocument();

    var printReportOptions = new CrystalDecisions.ReportAppServer.Controllers.PrintReportOptions();

    var printOutputController = new CrystalDecisions.ReportAppServer.Controllers.PrintOutputController();

    ISCDReportClientDocument reportClientDocument;

    reportToPrint = new CrystalDecisions.CrystalReports.Engine.ReportDocument();

    reportToPrint.Load(reportLocation);

    reportToPrint.SetDataSource(xmlDataSet);

    reportClientDocument = _reportToPrint.ReportClientDocument;

   

    printReportOptions.PrinterName = printerName;

    printOutputController = reportClientDocument.PrintOutputController;

    printOutputController.PrintReport(printReportOptions);

}

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Patrick,

just curious - how do you create the maxicode barcodes in crystal?

Theo