Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2004
    Posts
    21

    Angry Unanswered: Sharing Data between Sub-Report and Main Report

    I am trying to pass some data back from a sub-report to the main report and I only get zeros. In the sub-report I created a formula called "Assign Group Count" that looks like this:

    Shared NumberVar GroupCount;
    GroupCount := DistinctCount({File.Field name})

    Than in the Main report I create a formula called "Place Group Count" that looks like this:

    Shared NumberVar GroupCount;
    GroupCount

    When I drag the formula field of the main report into the report it always comes up as zero. In the sub-report the count works, but the main report returns the data from the sub-report as zero. Why is this happening? The formulas should work to pass the information between the reports. Any help would greatly be appreciated!!!

  2. #2
    Join Date
    Jun 2004
    Posts
    4
    I had that problem before also. The way i got around it was to assign another shared variable to hold the value that you want to be sent after it has already been calculated in the subreport.
    so in the subreport you would have that groupcount how you have it.
    Then i created another formula "holdgroupcount"

    Shared NumberVar HoldGroupCount;
    HoldGroupCount := {@GroupCount};

    then in the main report just do
    Formula GroupCount

    Shared NumberVar HoldGroupCount;

    you dont need that extra variable after it like you have it now.
    Also keep in mind that there will be no value until after the subreport has been calculated so make sure the field is in the correct location.

  3. #3
    Join Date
    Apr 2004
    Posts
    21

    Angry

    I am still not getting the results for some reason, I still get 0 (ARGGGGHHH). I created the new "hold formula" in the subreport and in the main report. I have the subreport in the Detail section of the main report and the information that I need back from the subreport in is in the Group Footer section. Is everything in the correct location, orwould you suggest other areas for the subreport or even the shared information? Thanks for all of your help in this problem!!

    pstiger

Posting Permissions

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