4.2. Reports

Issue
There is a big difference between a working report and a faulty report, in the way Crystal generates the SQL query to call the stored procedure. The difference is about formatting the DateTime value:

  • Working report: {ts '2016-07-17 00:00:00'}
  • Faulty report: CONVERT(DATETIME, '2016-07-17 00:00:00', 120)

Now the problem is that the 2nd syntax is apparently not allowed when calling a stored procedure. For example the following works:

EXEC "PMX_DEMO_PMX"."dbo"."PMX_SP_GoodsReceiptLabel" NULL, N'000000000000001847',
   N'DIS_FO_FG_002', 1, {ts '2016-07-17 00:00:00'},
   N'RM2015070001', N'22', -1, N'S_CG_001', N'0 Pallet, 0 Carton, 1 can',
   -N'1 Pallet = 100 Carton, 1 Carton = 12 can', N'RD_1', NULL, 88

but the following doesn’t:

EXEC "PMX_DEMO_PMX"."dbo"."PMX_SP_GoodsReceiptLabel" NULL, N'000000000000001847',
   N'DIS_FO_FG_002', 1, CONVERT(DATETIME, '2016-07-17 00:00:00', 120),
   N'RM2015070001', N'22', -1, N'S_CG_001', N'0 Pallet, 0 Carton, 1 can',
   N'1 Pallet = 100 Carton, 1 Carton = 12 can', N'RD_1', NULL, 88 

With the following SQL error message: Incorrect syntax near the keyword 'CONVERT'.

When you want to print this report using the scanners, you will get an error message saying;

ERROR Produmex.Sbo.Logex.Data.Devices.CrystalReportPrinter [(null)] - There was an exception when printing the report '1' on the printer 'LBLPR1' and windows printer 'Intermec01' Failed to open a rowset.

Solution
You can do a SQL trace on the stored procedure in the report, let them retry to see what parameters SAP is giving to SQL. with this Query you can check where the problem is.

This is due to the fact that the database connection type was set to native instead of OLE DB - SQL server.

Issue
When printing a Crystal report including a Code39 bar code, you get this error message:

There was an exception when printing the report '21' on the printer 'PRT2' and windows printer 'MYPRINTER' CrystalDecisions.CrystalReports.Engine.FormulaException: Error in File C:\Users\t-gilvh\AppData\Local\Temp\6\DLN20012_20151130123528079 {029FA103-3412-4CDD-AB61-1492BEBF6CC2}.rpt: Error in formula <Display_String>. 'BarcodeC39ASCII( ToText(CurrentFieldValue, 0, ' ') )' UFL 'u25azalea.dll.dll' that implements this function is missing.

Solution
When using a report with Crystal Reports that includes a bar code in Code39 format, using the Azalea fonts, the Azalea libraries are required for the Code39 bar code formatting.

The solution is to install these Azalea libraries. They can be downloaded from the following locations:

Extract the contents of these files, and copy their contents to the following folders:

  • 32 bits:
    • C:\Program Files x86)\Business Objects\BusinessObjects Enterprise 12.0\win32_x86
    • C:\Program Files x86)\Business Objects\Common\2.8
  • 64 bits:
    • C:\Windows\SysWOW64

This topic does not exist yet

You've followed a link to a topic that doesn't exist yet. If permissions allow, you may create it by clicking on Create this page.