none
Windows report (rdlc) - Data structure/formatting issue RRS feed

  • Question

  • I'm kind of new to reporting in this environment, and would appreciate a few pointers on how to acheive what I'm after.

    I'm passing a single dataset into the report (actually, a list of objects). The basic structure of the object is something like:
    Brand
    Item_Name
    Item_Colour
    Item_Price

    What I want to do is display all of this data as a grid. But the brand should not be repeated - it should just be displayed once at the top. Something like:
    Brand XYZ
       Item    Colour  Price
       I1      Blue    $20
       I2      Red     $22

    Brand ABC
       Item    Colour  Price
       U1      Black   $10
       U2      White   $12 

    etc etc. I have managed to get something like this working by using a list within a list, where the outer list is grouped by Brand. The problem is, if the list of items for one brand goes over one pages, the top of the next pages has no headers - no indiciation of the brand this is for, and no "Item", "Colour" or "Price" headers.

    How can I write this report so it gives me the data as I structured it above, but will repeat the header details should it go over a page? Am I on the right track? Or do I need to change the structure completely?

    Thanks.
    Saturday, November 8, 2008 12:28 PM

Answers

  • Tables have a RepeatHeaderOnNewPage property found in property grid, or displayed as "Repeat header rows on each page" in Table Properties dialog. Table groupings have a "Repeat group header" option in the Grouping and Sorting Properties Dialog. Setting these to true should give you your desired behavior.
    Nick Allen, Microsoft SQL Server Reporting Services. This posting is provided "AS IS" with no warranties and confers no rights.
    • Marked as answer by fweeee Monday, November 10, 2008 10:06 PM
    Monday, November 10, 2008 6:10 PM

All replies

  • Tables have a RepeatHeaderOnNewPage property found in property grid, or displayed as "Repeat header rows on each page" in Table Properties dialog. Table groupings have a "Repeat group header" option in the Grouping and Sorting Properties Dialog. Setting these to true should give you your desired behavior.
    Nick Allen, Microsoft SQL Server Reporting Services. This posting is provided "AS IS" with no warranties and confers no rights.
    • Marked as answer by fweeee Monday, November 10, 2008 10:06 PM
    Monday, November 10, 2008 6:10 PM
  • Thanks - using a table (rather than a list) sorted out my issue.
    Monday, November 10, 2008 10:04 PM