Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

ssrs 2008 r2 export to excel on report server problem Expand / Collapse
Author
Message
Posted Wednesday, November 27, 2013 9:56 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: 2 days ago @ 6:45 PM
Points: 375, Visits: 442
In an SSRS 2008 R2 report, I have the following expression on the 'Hidden' property on the Tablixes where I
do not want the headings exported to EXCEL or PDF.

=IIF(Globals!RenderFormat.Name = "EXCEL" OR Globals!RenderFormat.Name = "PDF", True, False)

The code listed above works fine when I am using my visual studio bids ide.
However when I deploy the code listed above to the test report server, the following occurs:
1. The heading columns for PDF do not show up, however
**2. The headings columns show up when I export the SSRS report to EXCEL on the report server.

I do not understand why the code would work on the visual studio ide and it does not work on the report server.

I also want to mention that when I change the code to the following:

=IIF(Globals!RenderFormat.Name = "EXCEL" OR Globals!RenderFormat.Name = "PDF", False, True),
that:
1. the Excel report headings show up on visual studio and
2. the Excel report headings do not show up on the report server.

Thus can you tell me what could be causing this problem and what I can do to solve the problem?
What code should I use?
Post #1518133
Posted Thursday, November 28, 2013 6:56 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Today @ 10:57 AM
Points: 586, Visits: 2,102
I have the almost exact code in a report of mine and it works, though I don't have the OR in the IIF. Maybe encapsulate them in parenthesis or try a nested IIF?

Have you looked in the report server logs to see if there's an error?
Post #1518349
Posted Thursday, November 28, 2013 2:25 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: 2 days ago @ 6:45 PM
Points: 375, Visits: 442
Thank you for your answer! I have the following additional questions/items to mention:

1. Can you show me the code of how you would use parenthesis or nest the iif statements?
2. Do you think if I tried one of the following statements the code would work:
either
"=IIF(Globals!RenderFormat.Name = "RPL", true, false)"
or
"=IFF(Globals!RenderFormat.IsInteractive, False, True)",
3. I am using bids 2008 (visual studio 2008) and the report runs on SSRS 2008 2012. Would that make a difference? If so, what difference would it make?
Post #1518409
Posted Thursday, November 28, 2013 2:30 PM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Today @ 10:57 AM
Points: 586, Visits: 2,102
For the Parenthesis:
=IIF((Globals!RenderFormat.Name = "EXCEL" OR Globals!RenderFormat.Name = "PDF"), False, True)

Nested
=IIF(Globals!RenderFormat.Name = "EXCEL" , False,
IIF(Globals!RenderFormat.Name = "PDF", False, True)
)

I think you have too many versions in part 3. lol Do you mean Bids 2008 and SSRS 2012?

Post #1518413
Posted Friday, November 29, 2013 9:56 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: 2 days ago @ 6:45 PM
Points: 375, Visits: 442
You are correct that I have think you have Bids 2008 and SSRS 2012.

I have the following additional question which is:
Would you tell me what the difference between the following 2 statements are:

1. IIF(Globals!RenderFormat.IsInteractive, False, True) and

2. =IIF(Globals!RenderFormat.Name = "RPL", true, false)

Note: I can not get the columns to hide when I use the code
"=IIF(Globals!RenderFormat.Name = "RPL", true, false)"

Can you tell me why one works and the other format does not work?
Post #1518617
Posted Saturday, November 30, 2013 8:12 PM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Today @ 10:57 AM
Points: 586, Visits: 2,102
I'm not sure one would work and not the other. I use it to hide the entire tablix, not just columns. The interactive Option I hadn't seen before. I had to go look it up (I'll read this on monday).

try dropping the Globals!rendername.Name into a text box and see what it returns. If this doesn't work for you there's a property of the tablix textbox called something like DataOutput. I'm at home so I don't have easy access to BIDS at the moment.
Post #1518675
Posted Sunday, December 1, 2013 2:32 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: 2 days ago @ 6:45 PM
Points: 375, Visits: 442
Can you let me know what the DataOutput option is that you are referring to once you get to work on Monday? Thanks!
Post #1518713
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse