Division by Zero error
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Division by Zero error

  1. #1
    Join Date
    Apr 2014
    Posts
    1

    Division by Zero error

    I am receiving a division by zero error in relation to the following:-

    (Sum ({@Payments},{aps_group.code})/Sum ({@Invoice},{aps_group.code}))*100

    It is strange, as the report was written some time ago and this error has only just appeared.

    I am not particulary au fait with Crystal Reports, so a laymans response would be appreciated.

    I am using Crystal Reports XI if that helps.

    Thank you in advance.

    BASS

  2. #2
    Join Date
    Jul 2005
    Posts
    1,075

    Re: Division by Zero error

    Code:
    If Sum ({@Invoice},{aps_group.code})) <> 0 Then
        (Sum ({@Payments},{aps_group.code})/Sum ({@Invoice},{aps_group.code}))*100
    Else
        0
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center