Skip to Content
author's profile photo Former Member
Former Member

Crystal Report 2008. Attempted to divide by zero. -

*

We are using .NET SDK for Crystal Reports 2008 and Report Document Object Model \ API.

Printing throws error but preview works fine launching an empty report viewer.

*

Message = Attempted to divide by zero.

StackTrace =

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(Int32 nCopies, Boolean collated, Int32 startPageN, Int32 endPageN)

at CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(Int32 nCopies, Boolean collated, Int32 startPageN, Int32 endPageN)

at CREngine_2008.CCRPEngine_2008.Print()

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2011 at 01:54 PM

    This error is only faced when there are no records returned from the binded stored procedure.

    The report has sub-reports present.

    Main Report has "Suppress Printing if No Records" checked, but the sub reports do not have this checked ?

    Could this be the problem

    Any thoughts are appreciated.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.