Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 extra columns when exporting to Excel

Author  Topic 

dfisher
Starting Member

4 Posts

Posted - 2008-10-07 : 11:56:31
I notice that when exporting a report to Excel, it puts in a bunch of extra columns. Most of the columns are either hidden or very narrow. What is causing this and how do I prevent this from happening?

Diana Fisher

biim
Starting Member

8 Posts

Posted - 2008-10-07 : 15:09:19
If you have any title headers or images attached in the report header, you will need to make the width size of the text boxes exactly the same as the table width in the detail section. If an image (like a logo) is on the top left corner of the page header, make that width size the same as the first column width size of the detail table and align it. Any extra space in the page header will create all the extra columns in Excel. I have no other way of fixing it myself. This is what I do to resolve this issue. I am using SSRS 2005. I hope this helps.
Go to Top of Page

dfisher
Starting Member

4 Posts

Posted - 2008-10-07 : 17:31:27
Thanks -- this does seem to work.
However, we were showing the report title in a textbox in the Page Header along with the Parameters that were used to execute the report for reference. Now there is no report title or parameter reference unless we show this in the Body of the report.

Kinda hokey! I hope Microsoft addresses this issue in future versions.

Diana Fisher
Go to Top of Page

biim
Starting Member

8 Posts

Posted - 2008-10-07 : 18:01:38
Just expand all text boxes to the same width as the report table used in the body. Make sure there are no spaces between the text boxes in the page header. leave a space between the last text box and the body.

There are other issues and right now I cannot find any answers.

Go to Top of Page

peter2008
Starting Member

3 Posts

Posted - 2008-10-08 : 05:57:10
Use only one report, after export to Excel delete extra columns. That's the easiest solution to implement. Also You can make a copy of your report, delete extra column and save it under different name and deploy it. Then add a link on original one to this report. Try to pass on the existing parameter values when calling that report (if report has parameters). Explain your users how to use it.
________________________________________________________________________
[url=http://www.digitaltransitions.com]Capture One[/url] [url=http://www.nationaltransportllc.com]Auto Transport[/url]
Go to Top of Page

dfisher
Starting Member

4 Posts

Posted - 2008-10-08 : 11:34:13
Thanks.
I tried to make the textboxes the same width as the report table used in the body and still got a bunch of extra columns in the export. This is not working well for me. I'm ready to ditch RS and go back to crystal!
Go to Top of Page

biim
Starting Member

8 Posts

Posted - 2008-10-08 : 11:50:44
It is really tricky. I was frustrated myself when trying to find a fix for this. This fix is all I can come up with but it works for me all the time now. I used Crystal too for about 7 years but our company is only using RS. If you want, I can extend my help. You may email me your report and I will look at it. Let me know if you need my help.

Go to Top of Page

dfisher
Starting Member

4 Posts

Posted - 2008-10-08 : 11:55:50
Thanks for much for your offer of assistance. What is your email address?
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-10-09 : 03:20:53
Also try this with selected columns
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -