ssrs 2008 r2 export to excel on report server problem

  • 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?

  • 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?

  • 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?

  • 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?

  • 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?

  • 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.

  • Can you let me know what the DataOutput option is that you are referring to once you get to work on Monday? Thanks!

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply