Bonez024
Bonez024

Reputation: 1398

Extra blank page while exporting my report in excel using SSRS 2005?

I am using two data regions to display two types of data... Ones with missing serial numbers, and one with mismatched transportation statuses. When I export my report to excel I seperate each of these types of data onto different sheets using a page break. Then I am able to differentiate which region shows which data by setting a filter based upon an indicator column within my stored procedure. I have one particular report parameter in my SP named @mode and there are three types including missing serial, Badstatus, and ALL (includes both).

The All mode works fine, both regions are on seperate sheets and there is no problem. However, when I run the first two modes which are missingserial/Badstatus. The correct data is displayed for the mode, but it still generates two sheets within the excel file and retains a place holder for the region not in use which ultimately outputs a blank page..

I apologize if I am unclear on anything but I am new to SSRS and Report managing. I appreciate any feedback and thank you ahead of time.

I also forgot to mention, I have tried the following in attempt to fix this:

-Tyler

Upvotes: 1

Views: 3667

Answers (3)

Tejas Jadhav
Tejas Jadhav

Reputation: 1

The issue isn't specific to 2005. I have faced the same issue in 2013 also.

I wanted conditional page breakup, tried following options-

  • Group > PageBreak > BreakLocation = 'None' This doesn't create multiple sheets. Not served the purpose.
  • Group > PageBreak > BreakLocation = 'End' This creates multiple sheets as per requirement, but creates an unnecessary sheet at the last. Not served the purpose.

What worked for me is-

  • Group > PageBreak > BreakLocation = 'Start' Creates multiple sheets as per requirement, and does not create an unnecessary sheet at the last. Served the purpose.

View image for pictorial representation of the solution

Upvotes: 0

Ash Arora
Ash Arora

Reputation: 78

Try this... In the properties for the last Tablix on the report (which is expected to be the last worksheet upon exporting to excel) - set the Page Break > Break Location = None.

I think what this does is removes the expectation of another "region" after this Tablix in the export process. I also tried this with a footer, it works fine with the footer too after making that little adjustment.

Let us know how it worked out for you. Good luck!

Upvotes: 6

mr.theTrain
mr.theTrain

Reputation: 891

Try changing the visibility of each region to something like:

=iif(Parameters!mode.Value = "Badstatus", True, False) 'for Missing Serial

=iif(Parameters!mode.Value = "Missing Serial",True, False) 'for Badstatus

Upvotes: 0

Related Questions