[RESOLVED] Creating a multipage report from rdlc
I have a data set:
Pay Code, Name, Work Type, Hours
A001, A Jones, Travel, 20
A001, A Jones, Field, 30
A001, A Jones, Office, 40
A002, A Smith, Travel, 30
A002, A Smith, Field, 40
A002, A Smith, Office, 50
For each person I want to create one page of the report - the first page would be as follows.
Pay Code : A001
Name : A Jones
Work Type Hours
Travel 20
Field 30
Office 40
The pay code & name are text boxes, the Work Type & Hours are in a tablix as there could be different work types for each employee.
I have got my program to work for one person at a time - using a loop.
I use the data set for one person
Pay Code, Name, Work Type, Hours
A001, A Jones, Travel, 20
A001, A Jones, Field, 30
A001, A Jones, Office, 40
and produce one page - the user can print it, or save it as an excel file, this then repeats for the next person, etc.
But the user wants a multipage report with one page for each person so they only have to press the print button once.
I don't know how to set up the rdlc file to do this, or if this is possible.
Help would be appreciated.
Thanks
Re: Creating a multipage report from rdlc
You would need to use grouping, group on "Name". Then set the page break property to true. Haven't used rdlc in quite a while but I'm sure you can find how to do it, Google something like "rdlc create grouping" or search this forum.
Re: Creating a multipage report from rdlc
Quote:
You would need to use grouping, group on "Name". Then set the page break property to true.
Close but not quite:)
The page break isn't on the group, it's on the visual items on the report design (e.g. tables, graphs, rectangles etc.) So probably the most reliable way is to do the grouping as Wes described, then drag a list onto your report. A list is basically a tablix which has a single rectangle in every row. Design a page of your report in the rectangle and set the grouping of the tablix apropriately. Then set the PageBreak property of the Rectange to End.
On small problem with this, it will create a blank page at the end of the report becasue it will put a page break at the end of the last rectangle. There's no sensible way to get rid of this which reliably getting the page breaks where you want them. What is handy is if you can have a "header" page at the beginning of the report. One that gives an overall summary, for example. That way you can set the page break property of the rectangle to Start which gets rid of the final blank page.
edit> I tell a lie! I just spotted there is a page break property on the group itself and the option is to include a page break between each instance of a group. I've always used the above technique so can't vouch for this aproach but it certainly sounds like what you're after.
Re: Creating a multipage report from rdlc
Thanks both for your help - I will try them - at least I now know where to look.
Re: Creating a multipage report from rdlc
Thanks - I did get it working. I now understand more about reports and groups.