Link to home
Start Free TrialLog in
Avatar of LCNW
LCNWFlag for United States of America

asked on

SSRS 2005: Specify page break after particular row in a table

I am working on a large report.  There is a main table with many detail rows.  Each record returned to this table will fill several rows and is 2 pages long:
Page 1: Record1
Page 2: Record1, cont.
Page 3: Record2
Page 4: Record2, cont.
etc

After a particular detail row, I want to force a page break before the next detail row begins.

Is this possible and if so, how?

I tried putting a rectangle in one of the blank detail rows and specifying page break at end but this does not work when the report is exported to PDF.


ASKER CERTIFIED SOLUTION
Avatar of Megan Brooks
Megan Brooks
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Howard Cantrell
Howard Cantrell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of LCNW

ASKER

For the grouping solution, what would I specify to group on?

@planocz, can you give an example of the syntax i'd use for Previous(Record)?  Is that all built in?
"what would I specify to group on?"
That depends on what you have. An example would be like Item Numbers, Customer name.
Once you have that then you can use the group edit screen and check the Page at the end checkbox.
Where do you want the page breaks to be? That is where the group would have to break too. I don't know if this approach will be feasible. It depends on how complex the report is.  
Avatar of LCNW

ASKER

well it's a query returning a lot of data.  One record for each patient.  
something like this.  Page 1 and 2 are both for the same record, Patient #1
[Page1] <-- Patient #1
First Name
Last Name
Age
Gender
Blood Type
[Page2] <-- Patient #1
Blood Chemistries
Arterial Blood Gases

[Page3] <-- Now Patient #2 starts
First Name
Last Name
Age
Gender
Blood Type
[Page2] <-- Patient #2
Blood Chemistries
Arterial Blood Gases

Do I create the main group and a second group, both grouped by Patient ID?
Avatar of LCNW

ASKER

sorry in the last post, it should have [Page3] followed by [Page4]

Your group will be on the Patient ID.
use the group edit screen and check the Page at the end checkbox.
I am starting to remember why I just ignored the problem and let the reports come out with the page breaks in the wrong places. :-) I don't know if this will prove feasible or not, but here is what I think is a way to trick RS into doing page breaks at the right times:
  1. Have the dataset return each row twice.
  2. Add a 'page' column to the dataset output that is 1 in the first record of each pair and 2 in the second record (the actual values don't matter as long as they are different)
  3. Add an inner group on this 'page' column -- this will be the innermost grouping surrounding the detail data
  4. Enable a page break between groups on this grouping
  5. In the detail data, hide the page 2 rows of the table when the 'page' field is 1, and hide the page 1 rows of the table when the 'page' field is 2.
Avatar of LCNW

ASKER

Here's what I ended up doing which seems to work and was alot easier.  I inserted a blank row in the table where I wanted the page break and merged all cells..  I created a place-holder subreport that contains a single thin rectangle with "Page Break After" and placed it in that row.
Ok, it's worth a try. I have not had much luck with anything but group breaks.