I have a project that exports a lot of Crystal Report reports to HTML and uploads them to a web开发者_JS百科 server for viewing. It used to run in VB6 with CR XI R2. I am in the process of upgrading it to C# in VS 2010 with CR 2008. I've noticed that the new exported HTML files are about twice as large as the old ones. Anyone have any idea why this might be, and if it can be "fixed".
The HTML produced directly by CR2008 and that produced by Visual Studio are different. CR2008 does no formatting of the HTML. The VS produced HTML is formatted, with indents, etc. Whether that mere formatting difference accounts for all of the file difference or not, I don't know.
I'm not going to explain this well, because I lack the terminology, but what I think is going on is that the Dot Net libraries have their own viewer in them and don't use the regular CR2008 to interact with reports. Perhaps it was naive of me, or ignorance, but I'd always assumed that when I automated CR, in either VB6 or VS with C#, I was interacting directly with the same Crystal Reports tool I ran on the desktop. Maybe VB6 does that more than the Dot Net libraries do. I don't know. What I do know is that what outputs the HTML from within Visual Studio is not the same CR that I run on the desktop. The title tag in the HTML says "Crystal Report Viewer". It doesn't do that when I output directly from Crystal Reports.
In any case, it's alright. The sizes of the new files are acceptable. I'm going to consider this answered.
It sounds like, rather than a difference between exporting directly and exporting through C#, you're noticing a difference between exports from CR2008 and CR XI.
Can you confirm that by using CR2008 and exporting directly from the report designer/viewer?
精彩评论