0
votes

I'm all about recycling-) I have report that user want to run for selected number of month back (let say from 1 to 12). If they selected 6 month back (Jul-13 thru Jan-2104, then I need to produce 6 pages with monthly report on each of them, and sp is the SAME for all reports just different time params.

How I can reuse my code?? For now I have 12 Tablix(s) with New Page=START, Hide condition set based on datediff(m,startDate,endDate) individually for each Tablix.

Then I need to run same sp with diff params, can I add some dynamics into it? or I better to have 12 sp(s)?

Thanks Mario

1
Is the layout and format of each page the same? If so, I would set your SP to return one dataset for all months selected and group that data by month in a List report item. You can set page breaks between each month in your List item Group. - Ron Smith
Yes, format is 100% the same, just ran for different month period. But I need each month data on new page, so I need new tablix to implement page break I think, or probably I can try to use filters for each tablix.? - user1982778

1 Answers

1
votes

You can achieve this with a single dataset and a List Report Item with an embedded Tablix:

  1. Set the List Grouping to Group/Sort first by: =Year(Fields!YourDateField.Value) and then by =Month(Fields!YourDateField.Value).
  2. Set the Page Breaks on the List Grouping to "Between each instance of a group".
  3. Drag your Tablix inside the List Report Item.

Let me know if you need more detail.