简体   繁体   中英

Crystal Reports Excel formatting issue

We have an ERP built on .net2.0, Visual Studio 2008 on C# which runs the crystal reports for Visual Studio 2008(Inbuilt version). Issue with this is the excel export option doesn't work properly(no formatting, cells getting merged etc) and this seems to be a known issue, so the question is will we be able to upgrade the crystal reports to the latest version(even a paid one) that do not have these issues? if so which one would work with VS 2008? whats a possible solution for this if anybody is familiar with such a situation

I had a lot of these issues, and was able to correct them all via formatting in Crystal Reports 11.

Extra columns/issues with merging can be solved by making sure your design doesn't have any "gaps" in it.

For example: You have a detail of width 1.5 , height .34 and position (0,0) . If your next cell in that section starts anywhere other than position (1.5,0) , you will have a gap between cells. This gap will result in excel making a blank column or row of that width. Similarly, if your second item has height 1.4 you'll then have a blank row of height .1 , where your first item is displayed in a merged cell between two rows, one of height 1.4 merged with a row of height 0.1 . This is the only way excel knows to give you two cells of a different size on the same row.

Let me know if this isn't clear enough and I'll try to elaborate a bit more or take some screen shots, but I'm pretty sure this is your issue.

When exporting to excel, there are several reasons that can cause formatting issue. For example, If you go to Export options Using the column width of Header 1 may give you better formatting that the whole page. The best way to avoid formatting problems when exporting to excel is designing your report around the fact that it will be exported to excel. That means try to keep the fields in every section aligned. so if you have two .5 in fields in one section. and you have another field in the section below it. Make that field .5 or 1 in and align it with the fields above it. Also make sure all the sections are fitted by right clicking a section and click fit to section. If your still getting unwanted black rows when exporting,

1.)Right click section 2.)click arrange lines 3.)right click section 4.)click fitSection

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM