Pooja Pandey
Pooja Pandey

Reputation: 3

Page break after a certain condition in ssrs

I am new to Reports in SSRS. I am facing problem in page break in ssrs. The problem is that I want to break the page whenever the sum of amount field in my table is greater than or equal to 20000. I want an output like this:

Page1 A 2000 B 6000 C 4000 D 5000 total 17000

Page 2 E 5000 F 5000 G 5000 H 5000 total 20000

and so on...

Can anybody help me get out the solution please? Thank you in advance

Upvotes: 0

Views: 616

Answers (2)

Pooja Pandey
Pooja Pandey

Reputation: 3

I had to make changes in my dataset to get the running total of the column and then I gave the page break condition on the details group and now I can see that the page is getting broken when the sum is exceeding 20000.

I couldn't have got the idea to change the dataset query without your help. :)

Upvotes: 0

Oceans
Oceans

Reputation: 3509

A way to achieve this wanted result would be to group the data correctly before you send the DataSource to the reporter.
So you'll have to create a custom DataTable and DataSet where you for example add a new column containing a key that represents the data that should be grouped.
Next you can place everything in the List element and group on that key. Inside the rectangle you can place the Tablix to achieve the wanted result.

To get the pages to break correctly you should edit the rectangle size to fit the body of the page perfectly. And make sure that both properties Add a page break after and Keep contents together on a single page, if possible are checked.

Upvotes: 2

Related Questions