June 7, 2010 at 8:59 am
How do I stop cells from merging when I am exporting report to excel. The issue is that I have an image in the header. It would be nice to be able to put the image in an expression, but I do not know how. Any help would be greatly appreciated.
June 7, 2010 at 11:35 am
I take it your issue is less about the cells merging and more about issues with attempting to sort the report using the excel tools and receiving an error something to the effect of the merged cells needing to be the same size or some such?
What I've done in cases like this is that I create a report header with the information in textboxes etc that span the entire width of the report. Then I make sure that the tables in my body are exactly the same width. Also I make sure there is about .25 in at the end of the header section with nothing in it.
That way when I export the report, the data in the body is the same size as the header so you don't get all of the merged cells. Then you can sort it or do whatever you need to as you would any other excel spreadsheet. It took me a while of playing with the different sizes and such to come up with this method, your mileage may vary, but basically just keep playing with the different sizes of the tables, header info until you find something that works.
-Luke.
-Luke.
June 7, 2010 at 12:02 pm
I am not sure if this will help, but I find it much easer to make a spreadsheet exported from an SSRS report behave as I like when I export to a .csv file rather than Excel. I then open the .csv file with Excel and I get all the columns without any merges.
The big gotcha is that the column header labels may be unclearly named as they come from the name of the text box in SSRS. So if you have a text box holding your sales info, but the text box itself is actually named text24, your column header will be named text24 instead of the Sales. The obvious way around this is to name all your text boxes with a properly discriptive name.
June 7, 2010 at 12:34 pm
Luke - I have been playing with the sizes for awhile now and yes that may work, but we have hundreds of reports nad that will take forever to implement over them all.
dbowlin - We have been saving to .cs because we did notice that it take away the merging but we run across the issue of the column headers not being named weird things like you stated.
Both of these solutions do work. I am trying to find a way to take an image and put it an expression. That would make my life so much easier. The problem we are having is the image we have in the header. Any ideas on how I can achieve this?
June 7, 2010 at 12:42 pm
Is the problem the image itself or it's size?
Did someone make a change to the image and all of a sudden you are having these issues? I'm guessing there is no backup of the old image so that you can make it the correct size? I'm making a bit of an assumption here because you state you have hundreds of reports that need to be modified...
-Luke.
June 7, 2010 at 12:47 pm
June 7, 2010 at 12:49 pm
Well here is out it works and maybe you have a better solution. I just started here and had no hand in this. The logo is stored on the report server in SourceSafe. When a report is built the logo is added to the header. We then upload the report to SharePoint and at that same time we load the image file to SharePoint also. So I would have to go through 100's of reports to fix the headers on the all. I know I will still have to do something with all the reports, but I'd rather not have to resize all of the report headers. It would be nice if there was a way to store that image and have it show up on the report when it is ran. Any ideas?
June 7, 2010 at 1:03 pm
OK it sounds like your company is using embedded images, again this is a bit of a guess, but if it gets uploaded with the report then that's probably what happens. The good thing about this is that the report always has access to the image. The bad thing is that in order to change the image you need to change it on every report and it adds to the overall size of the RDL file, which depending on the image sizes could cause issues down the road.
With the image object you are given 4 choices of how to access the image. Embedded (what I've just described above and what it seems you are using) as well as project, database, and Web.
The Web option allows you to host the image at a particular URL. For example if you had an intranet site called intranet in the mycompany.local domain and it contained an images virtual directory you'd be able to access the image using http://intranet.mycompany.local/images/reportimage1.jpg
Have a look at the following from MSDN. particularly the part about external images... http://msdn.microsoft.com/en-us/library/ms156482.aspx
You still have to touch each report, but hopefully that way if the image ever changes again, you can just change the image and not every report.
-Luke.
June 7, 2010 at 2:55 pm
Thanks Luke. Yeah we are using embedded images. I am going to look into the web option. I have exhausted the internet looking for a way to possible put this image in a text box or even call it from an expression. I was able to put in a text box using background image, but then when it was exported to excel it didn't show up because excel doesn't support background images.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply