Quantcast
Channel: SCN : Discussion List - SAP Crystal Reports, version for Visual Studio
Viewing all articles
Browse latest Browse all 3636

Suppress Printing If No Records System.DivideByZeroException.

$
0
0

With one of our customers, we've got a couple of problems.  The first is that if the user customizes their report and checks "Suppress Printing If No Records" in SAP Crystal Reports 2008 or 2011, when we go to print it using the SAP Crystal Reports 2011 run-time, we get a System.DivideByZeroException.

 

Interestingly enough, we can create a completely blank report, with no query, no parameters, and no data on the page and recreate the same problem.  If we check "Suppress Printing If No Records", then we get the DivideByZeroException.  If we uncheck it, then the completely blank report prints without the error.

 

We are using SAP Crystal Reports for Visual Studio (13.0.5 latest) to do this.  We can also duplicate the issue in prior versions.  If we print the report via the 2008 or 2011 standalone designer, there is no error and "Suppress Printing If No Records" works correctly.

 

I've seen the SAP Note  (1487765) on workarounds, however they are not acceptable workarounds for our situation.  We have 400 reports plus customers can customize their own.  We have customers who want to print blank reports, and some that do not, and performance is critical.  We can't be hard-coding workarounds into our printing that would jeopardize flexibility and performance when it is very clearly a deep, internal Crystal Reports bug.

 

Is there a way to get this reported as a critical bug and get it fixed?

 

Here's the stack trace:

 

System.DivideByZeroException: Attempted to divide by zero.

   at CrystalDecisions.Shared.PrintingHelper.PrintPage(PrintPageEventArgs e, PageObject page, PrintLayoutSettings layoutSettings, Int32& currentPageNumber, Int32& currentHorizontalPageNumber)

   at CrystalDecisions.CrystalReports.Engine.FormatEngine.PrintPageEventHandler(Object sender, PrintPageEventArgs e)

   at System.Drawing.Printing.PrintDocument.OnPrintPage(PrintPageEventArgs e)

   at System.Drawing.Printing.PrintDocument._OnPrintPage(PrintPageEventArgs e)

   at System.Drawing.Printing.PrintController.PrintLoop(PrintDocument document)

   at System.Drawing.Printing.PrintController.Print(PrintDocument document)

   at System.Drawing.Printing.PrintDocument.Print()

   at CrystalDecisions.CrystalReports.Engine.FormatEngine.PrintToPrinter(PrinterSettings printerSettings, PageSettings pageSettings, PrintLayoutSettings layoutSettings, Boolean reformatReportPageSettings)

   at CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(PrinterSettings printerSettings, PageSettings pageSettings, PrintLayoutSettings layoutSettings, Boolean reformatReportPageSettings)

   at CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(PrinterSettings printerSettings, PageSettings pageSettings, Boolean reformatReportPageSettings)

 

 

The second issue is that when we open the report in SAP Crystal Reports for Visual Studio designer in Visual Studio 2010 or 2012, the Report Options page is missing a group of options that appear in the SAP Crystal Reports 2008 and 2011 standalone report designers:

  • Save Data With Report
  • Suppress Printing If No Records
  • Perform Query Asynchronously
  • Show Preview Panel
  • Display Alerts on Refresh
  • Read-only

 

SAP Crystal Reports For Visual Studio:

SAP Crystal Reports for Visual Studio Report Options.jpg

SAP Crystal Reports 2008:

SAP Crystal Reports 2008 Report Options.jpg

Is there a way to get these options back?  The inconsistency between the two designers is concerning.

 

Thanks for the help!

 

Kyle


Viewing all articles
Browse latest Browse all 3636

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>