Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I was hoping this would be as simple as using a report parameter which could then be fed into the WHERE clause of your query. However, parameters aren't allowed to use the Globals!RenderFormat.Name field (I don't know why). I'm not sure about how to use a lookup expression to pull back this as you asked for, but I used the following nested IIF function to toggle visibility in the Hidden expression of a textbox based on rendered format:</p> <pre><code>=IIF(Globals!RenderFormat.Name=nothing,true, IIF(Globals!RenderFormat.Name="EXCEL",false, IIF(Globals!RenderFormat.Name="PDF",false,true))) </code></pre> <p>As you were going to have a single query that holds the boolean visibility values anyway, this option may not be bad. The only problem will be maintaining it in the many different locations you probably need it. I would recommend storing it in a hidden textbox and then copying and pasting from that as needed so you have one place where you change the function and you don't have to worry about typos but once.</p> <p>In my testing, I found that the Render Formats are case-sensitive, and that for the report viewer rendering, the format name is RPL, not rdl.</p> <p>The most comprehensive list I could find of Rendering Formats in correct case is below and came from here: <a href="http://msdn.microsoft.com/en-us/magazine/cc188712.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/magazine/cc188712.aspx</a></p> <p>HTML3.2 HTML4.0 HTMLOWC MHTML IMAGE EXCEL CSV PDF XML</p> <p>I know it's not exactly what you wanted, but hopefully it helps.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload