Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2009
    Posts
    2

    Question Unanswered: Passing wrong data from subreport to the main report

    I created a subreport to pass data to the main report. I see odd behavior in the main report happens when there is no data in the subreport.
    For example the subreport result = 1, the main report shows 1. So the record that has a matching record in the subreport works fine.
    When the second record in the main report has no matching record in the subreport the data passed shows 1. #1 keep showing until a record from the main has a matched in the subreport. See the table if it will help what i was trying toexplain here.


    Item, Main(Passed from Subreport), Subreport(Data to pass to Main)
    aaaa 1 1
    bbbb 1 0
    ccccc 1 0
    dddd 2 2
    eeee 2 0
    fffff 2 0
    gggg 1 1

  2. #2
    Join Date
    Dec 2004
    Location
    Connecticut
    Posts
    85
    Until something resets the field, it will show the data from the previous record. When your record has matching data in the subreport, the subreport resets it. When there's no match, the value stays the same as it was and prints out in the next record.

    You need to add a calculated field to set the value to null or zero after each record. You can split the record section and hide this calculated field in the part that runs after the section that prints out the value.

  3. #3
    Join Date
    Oct 2009
    Posts
    2
    Thank you Trowe for the help. Got my report working now.

Posting Permissions

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