December 13, 2013 at 4:22 pm
In an SSRS 2008 r2, I am going to have some selected colunmns set as invisibile while the ssrs 2008 r2 report is running. However when the report is exported only to excel and csv files, I want those invisible columns to be included in the export. Thus can you tell me and or show me in code how to add the selected invisible columns to only the CSV and excel exports?
December 13, 2013 at 4:39 pm
You should read this : http://technet.microsoft.com/en-us/library/dd255216(v=sql.105).aspx
The part you are interested in is Globals!RenderFormat , which will allow you to base visibility of report items on the way the report is being rendered.
Add an expression to the item you want to show in excel so that it is hidden when Globals!RenderFormat.IsInteractive is True.
You can use the Globals!RenderFormat.Name method if you need different behaviour between export types.
MM
select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);
December 14, 2013 at 3:52 pm
would you show me some examples of code that I could use as an example?
December 14, 2013 at 5:16 pm
Sure put this is an expression on the visibility property of an item you only want to export, not show on screen.
(Don't forget the "visibility" property relates to whether the item is hidden or not despite the name)
=Globals!RenderFormat.IsInteractive
Just Googling "Globals!RenderFormat.IsInteractive" brings up a blog post with examples..
MM
select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);
December 15, 2013 at 8:32 pm
I have seen on the internet that csv (comma delimited) files have some kind of export problem. Thus would I do something different for csv files?
December 16, 2013 at 4:27 pm
wendy elizabeth (12/15/2013)
I have seen on the internet that csv (comma delimited) files have some kind of export problem. Thus would I do something different for csv files?
I don't ever export from SSRS to CSV, sorry.
MM
select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);
December 17, 2013 at 7:11 am
I export to csv and excel, the only time I've run into a problem exporting is using SSIS and it saving things as UTF instead of ASCII which screws up some automated imports we have. I've never run into a problem exporting straight from SSRS to CSV.
What kind of problems were you thinking you'd run into?
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply