Determine the Current Report Rendering Format
I have several reports in SSRS 2005 (SharePoint Integrated Mode) that have Jump to URL navigation links. The links were working intermittently, and the fix I implemented was to use a Javascript window.open command for the links, and it worked. However, now the links do not work when the reports are exported to Excel because it doesn't support Javascript. I'm trying to satisfy the users' requirements of having the links work regardless of how the report is rendered. Is there a way that I can use custom code to determine the current URL (with query string parameters) so that I can parse it to determine whether the report is currently being rendered as HTML, Excel, PDF, etc.? If not through parsing the URL, is there another way to go about this that I'm missing? Thanks in advance, Ben
September 20th, 2010 10:29pm

Hi Ben, For SSRS 2005, i am not sure that there is a way to do it. But in SSRS 2008 R2, we could do it using Reporting Services built-in expression Function GLobals!RenderFormat.Name. See http://blogs.msdn.com/b/robertbruckner/archive/2010/05/16/report-design-naming-excel-worksheets.aspx or http://blogs.msdn.com/b/robertbruckner/archive/2010/05/02/globals-renderformat-aka-renderer-dependent-report-layout.aspx for more information about Globals!RenderFormat. thanks, Jerry
Free Windows Admin Tool Kit Click here and download it now
September 23rd, 2010 10:58am

This is what I was afraid of -- thank you, Jerry, for your response. Ben
September 24th, 2010 6:29am

I haven't got a copy to hand but I'm sure in 2005 there was a globals property that was the url for the report If that is the case and Excel is defined as the render item in the url then using the instr() function on the url string will tell you whether excel has been defined as the output render formatRgds Geoff
Free Windows Admin Tool Kit Click here and download it now
September 24th, 2010 7:55am

There is a global in SSRS 2005 named Globals!ReportServerUrl, but all it gives you is the URL of the report server without any of the query string parameters, which would include the current rendering format. Unfortunately I had already looked into this global, but it doesn't provide the information I need.
October 1st, 2010 4:25pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics