I am building SSRS report for invoices using SSRS 2008 R2 each invoice has list of items
I have built the report successfully but there was a little problem that we need to display page number of the invoice (i.e Page 1 of 3) the page number is based on the group ( which is the invoice number ) so for every invoice in the report page 1 will be the first page in the invoice and once invoice ends a new page started with reset of page number
after 2 weeks of research i managed to do this
now I am stuck on a gap at the end of the report that i dont know how to get rid of. and an initial empty page that I cant get rid of too. and I would appreciate if someone can help me here
I have created a simpler structure that shows my problem and sample data too
insert into xRep01 values('Inv01','Item0101', '')
insert into xRep01 values('Inv01','Item0102', '')
insert into xRep01 values('Inv01','Item0103', '')
insert into xRep01 values('Inv01','Item0104', '')
insert into xRep01 values('Inv01','Item0105', '')
insert into xRep01 values('Inv01','Item0106', '')
insert into xRep01 values('Inv01','Item0107', '')
insert into xRep01 values('Inv01','Item0108', '')
insert into xRep01 values('Inv01','Item0109', '')
insert into xRep01 values('Inv01','Item0110', '')
insert into xRep01 values('Inv01','Item0111', '')
insert into xRep01 values('Inv01','Item0112', '')
insert into xRep01 values('Inv01','Item0113', '')
insert into xRep01 values('Inv01','Item0114', '')
insert into xRep01 values('Inv01','Item0115', '')
insert into xRep01 values('Inv01','Item0116', '')
insert into xRep01 values('Inv01','Item0117', '')
insert into xRep01 values('Inv01','Item0118', '')
insert into xRep01 values('Inv01','Item0119', '')
insert into xRep01 values('Inv01','Item0120', '')
insert into xRep01 values('Inv01','Item0121', '')
insert into xRep01 values('Inv01','Item0122', '')
insert into xRep01 values('Inv01','Item0123', '')
insert into xRep01 values('Inv01','Item0124', '')
insert into xRep01 values('Inv01','Item0125', '')
insert into xRep01 values('Inv01','Item0126', '')
insert into xRep01 values('Inv01','Item0127', '')
insert into xRep01 values('Inv01','Item0128', '')
insert into xRep01 values('Inv01','Item0129', '')
insert into xRep01 values('Inv01','Item0130', '')
insert into xRep01 values('Inv01','Item0131', '')
insert into xRep01 values('Inv02','Item0201', '')
insert into xRep01 values('Inv02','Item0202', '')
insert into xRep01 values('Inv02','Item0203', '')
insert into xRep01 values('Inv02','Item0204', '')
insert into xRep01 values('Inv02','Item0205', '')
insert into xRep01 values('Inv02','Item0206', '')
insert into xRep01 values('Inv02','Item0207', '')
insert into xRep01 values('Inv02','Item0208', '')
insert into xRep01 values('Inv02','Item0209', '')
insert into xRep01 values('Inv02','Item0210', '')
insert into xRep01 values('Inv02','Item0211', '')
insert into xRep01 values('Inv02','Item0212', '')
insert into xRep01 values('Inv02','Item0213', '')
insert into xRep01 values('Inv02','Item0214', '')
insert into xRep01 values('Inv02','Item0215', '')
insert into xRep01 values('Inv02','Item0216', '')
insert into xRep01 values('Inv02','Item0217', '')
insert into xRep01 values('Inv02','Item0218', '')
insert into xRep01 values('Inv02','Item0219', '')
insert into xRep01 values('Inv02','Item0220', '')
insert into xRep01 values('Inv02','Item0221', '')
insert into xRep01 values('Inv02','Item0222', '')
insert into xRep01 values('Inv02','Item0223', '')
insert into xRep01 values('Inv02','Item0224', '')
insert into xRep01 values('Inv02','Item0225', '')
insert into xRep01 values('Inv02','Item0226', '')
insert into xRep01 values('Inv02','Item0227', '')
insert into xRep01 values('Inv02','Item0228', '')
insert into xRep01 values('Inv02','Item0229', '')
insert into xRep01 values('Inv02','Item0230', '')
insert into xRep01 values('Inv02','Item0231', '')
insert into xRep01 values('Inv02','Item0232', '')
insert into xRep01 values('Inv02','Item0233', '')
insert into xRep01 values('Inv02','Item0234', '')
insert into xRep01 values('Inv02','Item0235', '')
insert into xRep01 values('Inv02','Item0236', '')
insert into xRep01 values('Inv02','Item0237', '')
insert into xRep01 values('Inv02','Item0238', '')
insert into xRep01 values('Inv02','Item0239', '')
this is the report code
Your initial blank page is because you have set page break on the start and end of the group in your table1_Details_Group group. You should only need "Between each instance of a group".
The gap near the end of the detail rows is there because of keep with group and keep together settings. Set them all back to defaults and you'll probably find it works. I've just set most of them back to default and it looks OK (I think, maybe I've misinterpreted your intentions.)
Just as a note: I would normally approach reports like this using a master and sub report. The subreport would be the entire report but for a single Invoice ID. This gives you more control over the layout rather than trying to get grouping and page breaks to work together as this is a pain if the reports can span over an unknown number of pages. Then use a master report with a single cell table pointing to a dataset that contains a list of invoices to print. In the single cell, insert your sub-report and pass the parameters from your invoice list dataset.