简体   繁体   English

Crystal Reports Excel格式问题

[英]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). 我们有一个基于.net2.0,基于C#的Visual Studio 2008的ERP,该ERP运行Visual Studio 2008(内置版本)的水晶报表。 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? 这个问题是excel导出选项无法正常工作(没有格式设置,单元格被合并等),这似乎是一个已知问题,所以问题是我们能否将Crystal报表升级到最新版本(甚至一个付费的)没有这些问题? if so which one would work with VS 2008? 如果可以的话,哪个可以与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. 我遇到了很多这些问题,并且能够通过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) . 例如:您有一个width 1.5height .34position (0,0)的详图。 If your next cell in that section starts anywhere other than position (1.5,0) , you will have a gap between cells. 如果该部分中的下一个单元格从position (1.5,0)以外的任何其他position (1.5,0)开始,则单元格之间将存在间隙。 This gap will result in excel making a blank column or row of that width. 此间隙将导致excel制作该宽度的空白列或行。 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 . 同样,如果第二个项目的height 1.4 ,则将有一个空白行, height .1 ,其中第一个项目显示在两行之间的合并单元格中, height 1.4的行与height 0.1的行合并。 This is the only way excel knows to give you two cells of a different size on the same row. 这是excel知道的唯一在同一行上为您提供两个大小不同的单元格的方法。

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. 导出到excel时,有几种原因可能会导致格式问题。 For example, If you go to Export options Using the column width of Header 1 may give you better formatting that the whole page. 例如,如果转到“导出选项”,则使用标题1的列宽可能会更好地格式化整个页面。 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. 避免在导出到excel时出现格式问题的最好方法是围绕将要导出到excel的事实来设计报表。 That means try to keep the fields in every section aligned. 这意味着尝试使每个部分中的字段保持对齐。 so if you have two .5 in fields in one section. 因此,如果一节中有两个.5字段。 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. 使该字段为.5或1,并将其与上方的字段对齐。 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 1.)右键单击部分2.)单击排列线3.)右键单击部分4.)单击fitSection

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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