CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 2 of 2

Thread: Need Crystal Reports help - exception reporting

  1. #1
    Join Date
    Dec 2014

    Exclamation Need Crystal Reports help - exception reporting

    I'm using Crystal Reports XI - data is in an Oracle DB.

    I need to create a report that compares one customer address data element to the other addresses that are defined for that same customer. Address 01 is the master address which means that I need to compare the other address values to the values on this address record. It's basically a Customer Address Exception Report.

    My data is as follows:
    Customer A
    AddrID-- Pmt Term-- Ship Via
    01 30 UP1
    02 45 UP1
    03 30 UP1

    I need to compare the elements of Address 01 to the same elements in Addresses 02 and 03 but I only want to print a value on the report if it's different than the value for Address 01

    What I need to print on the report - based on the above data:
    AddrID--Pmt Term--Ship Via
    01 30
    02 45

    I need to print the Master record value (the value from Address 01) and the record that is not the same.

    What is the best way to accomplish this?
    I looked at using variables but I can't figure out how to store the 01 Address values so they can be compared with all the other addresses. I'm not sure where to go from here or if it can be done using Crystal.

    Appreciate any ideas anyone might have. Thank so much!

  2. #2
    Join Date
    Aug 2007

    Re: Need Crystal Reports help - exception reporting

    Depending on the number of records in your table, Crystal may not be the best tool to use for this application. Under normal conditions, Crystal reads records in a continuous block, allowing you to compare the current record to the next and/or previous record, in the order the data is read. You could use a sub-report to accomplish this task. Your main report would read your 'master' records (Address01) and your sub report would read all non-master records. You would use shared variables and/or parameters to pass data between the main report and the sub report, suppressing the sub-report output if a condition is not met. While this approach will work, if you have a large number of records the report could take a very long time to process. You might consider creating a view or pipline function in Oracle to collect the data, and then use Crystal for output.

Tags for this Thread

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

On-Demand Webinars (sponsored)