Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the best way of diffing Crystal Reports? [closed]

If you have two versions of the same report (.rpt) and you want to establish what the exact differences are, what is the best way to go about this? I've seen some commercial tools to do this, but I'm not too interested in forking out cash for something that should be relatively straight forward. Can I hook into the Crystal API and simply list all of the properties of every field or something? Please someone tell me that there's an Open Source project somewhere that does this... @:-)

@Kogus, wouldn't diffing the outputs as text hide any formatting differences?

@ladoucep, I don't seem to be able to export the report without data.

like image 969
ninesided Avatar asked Aug 21 '08 13:08

ninesided


People also ask

How do I compare two Crystal Reports RPT files?

Open each report in Crystal Designer, export each to Report Definition format (a text-based file). Use a text comparison tool such as CSDiff (ComponentSoftware) or even MS-Word to compare the two text files.

How do I stop Crystal Reports?

There are 2 ways to disable the Online Resources of the Start Page in Crystal Reports: Set the registry key "Show Online Resources" to the value: "No"; OR. Rename the file start.


3 Answers

Can I hook into the Crystal API and simply list all of the properties of every field or something? Please someone tell me that there's an Open Source project somewhere that does this... @:-)

There is in fact, such an API. I wrote a VB6 application to do just what you asked and more. I think I even migrated it to VB.Net. As it was for my own use, I didn't spend much time making it 'polished'. I've been intending to release it, but I haven't had the time...

Another approach that I've used in the past is to create an Access application to help manage large, report-development projects. One of it's many features includes the ability to extract the tables that are used by the report, and the SQL statements used by its Commands and SQL Expressions. It's intent is to give one a global perspective of which reports use which tables. I probably still have it somewhere...

** edit 1 **

BusinessObjects Enterprise XI (R?) has a feature named 'Meta Manager'. It will periodically examine the contents of the Repository and save the results to a database. It uses the Report-Application Service (RAS) to generate the meta data. It's an additional, 5-figure license, of course.

** edit 2 **

Consider using PowerShell to do the work: PsCrystal.

like image 164
craig Avatar answered Oct 12 '22 15:10

craig


One helpful technique is to output both versions of the report to plain text, then diff those outputs.

You could write something using the crystal report component to describe every property of the report, like you described. Then you could output that to text, and diff those. I'm not aware of any open source tool that does it for you, but it would not be terribly hard to write it.

@question in the post: Diffing the outputs would only show formatting changes if the relative positions had changed. For example, if i had this:

before: First name, last name, addresss

after: Last Name, First Name, Address

Then that would show up as a difference.

But if I had just bumped the address column over a few pixels, or changed it from plain text to bold, then you are right, that would not show up.

like image 21
JosephStyons Avatar answered Oct 12 '22 17:10

JosephStyons


One technique I have used to great effect in the past is to print out reports from both versions based on the same data. I then take the first page from each version, lay one on top of the other (it is important not to mix them up) and hold them up to a window. It is generally quite easy to see any differences, and these differences can be manually annotated with a suitable writing instrument such as a pencil. Repeat for each page in the report.

Admittedly, for large reports this can be quite time consuming and error prone, but these limitataions can be overcome with patience and care.

like image 37
Kramii Avatar answered Oct 12 '22 15:10

Kramii