SSRS Change field properties dependent on the render type
I've built a report that has background images with text over the top, which when rendered as Word or Excel the images don't show and because the client has requested the text is white against the image, the text isn't visible. What I'd like to do is run code within the report that identifies the render type and if xls will change the text color through an expression. Any ideas would be greatful.
September 28th, 2010 4:33pm

Try creating a parameter that asks the user how the report will be rendered - web, Excel, Word. You can then use expressions to build the report based on the parameter value they choose.
Free Windows Admin Tool Kit Click here and download it now
September 28th, 2010 5:24pm

Thanks Melinda, but that option isn't possible as the report is rendered in a iFrame for displaying within a SharePoint webpart. I have found the solution though, within SQL Server Reporting Services 2008 R2, a new global variable has been introduced RenderFormat, and I use this. =IIF(Globals!RenderFormat.Name = "WORD", "Black", IIF(Globals!RenderFormat.Name = "EXCEL", "Black","White")) Slight issue being that the development environement isnt on R2 just the production, but hey ho.
September 28th, 2010 6:17pm

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

Other recent topics Other recent topics