none
Group RRS feed

  • Question

  • Created subreport.  Set up parameters from the report menu when editing the subreport.
    Added subreport to mainreport.  Right clicked sub and clicked properties.  Added the parameters in the parameters tab.

    Setup group on the main report by the ID.  In the group heading I placed the sub report.

    I display the main report ID, the subreport item, and the subreport ID.
    Where the subreport prints, everything from the subreport table prints rather than just the records associated to the main report ID.

    The tables have a basic one-to-many relationship.  I could do a join in the main report to solve the problem, but I'm just trying to learn how to use the group feature since I'm new to the reportviewer control.

    Thanks
    Wednesday, February 24, 2010 9:43 PM

Answers

  • Here is what I did to get what I want.

    Put the subreport in my group area.  Modified the visibility tab of the sub report properties using the expression radio button setting the passed ID<>fields!ID.value.

    If there is a different way other than a joined sql statement I would like to know.

    Thanks
    • Marked as answer by James12314909 Wednesday, February 24, 2010 11:27 PM
    Wednesday, February 24, 2010 11:27 PM

All replies

  • Tables look something like the following.Table one:
    ID
    1
    2


    Table two
    ID,name
    1, dog
    1, worm
    2, cat

    report prints
    1, dog, 1
    1, worm, 1
    1, cat, 2

    2, dog, 1
    2, worm, 1
    2, cat, 2

    i'm expecting
    1, dog, 1
    1, worm, 1

    2, cat, w

    Wednesday, February 24, 2010 10:12 PM
  • Here is what I did to get what I want.

    Put the subreport in my group area.  Modified the visibility tab of the sub report properties using the expression radio button setting the passed ID<>fields!ID.value.

    If there is a different way other than a joined sql statement I would like to know.

    Thanks
    • Marked as answer by James12314909 Wednesday, February 24, 2010 11:27 PM
    Wednesday, February 24, 2010 11:27 PM