• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2967
  • Last Modified:

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.


0
LCNW
Asked:
LCNW
  • 4
  • 4
  • 3
2 Solutions
 
Megan BrooksSQL Server ConsultantCommented:
I *think* page break capabilities are improved in SSRS 2008 R2. I've tried similar workarounds without much success either.
In the mean time, if you can create an artificial group structure in your data, such that the group breaks exactly where you want the page breaks to occur then you can have each new group start a new page. Maybe someone else has a better idea.
0
 
planoczCommented:
Like rsscowden said .... Add a Group and sort by your record type that you are using. Then in the Group have the page break .
Also you can try a page break when the Previous(Record) <> Record of your details.
0
 
LCNWAuthor Commented:
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?
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
planoczCommented:
"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.
0
 
Megan BrooksSQL Server ConsultantCommented:
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.  
0
 
LCNWAuthor Commented:
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?
0
 
LCNWAuthor Commented:
sorry in the last post, it should have [Page3] followed by [Page4]

0
 
planoczCommented:
Your group will be on the Patient ID.
use the group edit screen and check the Page at the end checkbox.
0
 
Megan BrooksSQL Server ConsultantCommented:
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.
0
 
LCNWAuthor Commented:
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.
0
 
Megan BrooksSQL Server ConsultantCommented:
Ok, it's worth a try. I have not had much luck with anything but group breaks.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 4
  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now