question

arjunarao avatar image
0 Votes"
arjunarao asked Joyzhao-MSFT commented

How to export get each separate report on "Page Break" in SSRS report

Hi All,

I have a SSRS "Employee Details Report" as Shown in below.

Page break applied on DEPTNO and we have 3 values 10,20,30.

Is it a way to generate for each page break? (As per my data I am expecting 3 report outputs like 3 PDFs or 3 Excel files )

Kindly advise.

88288-dept-10.jpg


88385-dept-20.jpg


88289-dept-30.jpg


sql-server-reporting-services
dept-10.jpg (37.4 KiB)
dept-20.jpg (37.6 KiB)
dept-30.jpg (37.9 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

arjunarao avatar image
0 Votes"
arjunarao answered
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Joyzhao-MSFT avatar image
0 Votes"
Joyzhao-MSFT answered Joyzhao-MSFT commented

Hi @arjunarao ,
Take exporting Excel as an example. I did a test locally. You could refer to the following operations:
1.First of all, let us add grouping (group by "DEPTNO" in your case), We have enabled the Add group header option so that we can use it to repeat the column headers later.
88429-07.jpg

2.Next is to include the page break to the included groups. To do that, go to the properties of the groups from the following option.
88427-01.jpg

In the Page Breaks option, choose the Between each instance of a group as shown in the below image.
88428-02.jpg

3.Now we need to provide the sheet name for when exporting to the Multiple sheets of Excel in SSRS.
Go to the properties of the group and go to Group -> PageName as shown in the below screenshot.
88404-03.jpg

Since the sheet name is dynamic, it has to be an Expression. In the expression property page, you need to provide the name of the sheet by combining the dataset fields as shown in below (according to your case): Fields!DEPTNO. Value & "Sales"
88348-04.jpg
4. Export to Excel format and view:
88390-05.jpg
88481-06.jpg
Best Regards,
Joy


If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.





07.jpg (14.0 KiB)
01.jpg (13.7 KiB)
02.jpg (33.0 KiB)
03.jpg (45.0 KiB)
04.jpg (12.8 KiB)
05.jpg (93.8 KiB)
06.jpg (84.0 KiB)
· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Refer to the following gif file:
88444-10.gif


If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

0 Votes 0 ·
10.gif (1.2 MiB)

Hi @Joyzhao-MSFT

Thank you so much for your solution.

I want to generate the separate excel output report for DEPTNO 10,20,30.

Is there a way for this? Through script or through SSRS options?

0 Votes 0 ·
Show more comments

Hi @Joyzhao-MSFT ,
I want to save the reports to separate Excel files

0 Votes 0 ·
Show more comments