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

Passing data from sub report

Post Author: Waxys

CA Forum: Formula

I am writing a report that compares data from 2007 and 2008.

The main report has a table for 2008 data and a sub report has data for 2007 data.

The issue I am having: I am comparing 3 items from a column (Example: Milk, Sugar, Eggs) If we had all 3 in 2008 then there is no issue. If we only have Milk and Sugar in 2008 but we had Milk Sugar and Eggs in 2007, only the Milk and Sugar values showed up and the Eggs are left off.

Any ides how to force a value for Eggs in 2008 of 0 so we can compare that we have not sold any eggs this year but did last year?

I hope this makes sense.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on May 27, 2008 at 06:04 PM

    Post Author: pandabear

    CA Forum: Formula

    Hi Waxys,

    I don't know your skill level, but you're going to be far better off doing the comparisons in the query

    using "Case" "With" and/or subquery statements. Second best might be to compare the values

    in a formula, cast off the "odd man out" and print the "similar" entries.

    Like : Create an array and put the 2007 values in it. Then, if val2008 "in" array then "" else strHold = strHold + ", " + val2008.

    Then put the next value for this record in the variable "val2008" and compare it again with the array.

    When you're done with all the "values" in this record, or the "many" "values" connected to some "primary" id, etc, then you print the strHold...

    or parse it out however you want.

    Happy hunting,

    The Panda

    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.