Reverse Engineering Crystal Reports Definition Files - crystal-reports

We're creating a metamodel of our report definitions within our central metadata repository. We know how to "harvest" SSRS reports since they are XML. IS there any easy way to do the same for Crystal Reports. We're interested in getting to anything CR understands about the report (similar in concept to the SSRS RDL Model)
TIA,
Paolo

Use the Crystal Reports SDK (Java or .Net version) to convert the object hierarchy to an XML representation.
Samples:
Visual Basic .Net: RptToXml
C# .Net: RptToXml
PowerShell: PsCrystal

You can get a report definition text file if you export the crystal report as...you guessed it "Report Definition(TXT)" It has the crystal version and lots of info for each section such as datafields, formatting, etc...

Check http://www.reportminer.com/, it includes a diff tool (although after exporting to text you can use the diff'er of your choice).

AFAIK, there is no way to do this. CR files are in a closed and proprietary format. :-(

I used something like this once to debug a Crystal problems, it might help:
rpt Inspector

RptToRdl.Com (http://www.RptToRdl.com) will do this for you for $25. Check out their FAQ, and you can get one done for free.

Related

Editor for Crystal Reports Formula

I'm looking for some simple editor to test out some formulas used in Crystal Reports.
I don't want to download the entire Crystal Reports application, I just need a small, simple application or an online editor that can parse functions Crystal Reports is using.
I just need to test a few functions used in the reports and calculate the values based on the parameters I provide.
Is there anything like that?
You can export the report to a report definition format.
3rd-party report inspection tools (see list here) provide more powerful options such as mass inspection.

Protecting Crystal Report Design and Source

I have search everywhere on Internet to protect my source of Crystal Reports or protect them by any means but all in vain.
I am using crystal-reports ver. 9. and Developing Reports for an accounting and financing solution. and need to protect the reports that no one can mess with the reports.
Any help is appreciated.
Regards.
Jamshaid Riaz
There is no way to do this with Crystal 9, you need to upgrade to Crystal 2011 or above and use RPTR file. RPTR file is a run-time report , which can be run as a normal report by the end user but cannot be edited. RPTR file is created from a regular report using export. You will keep the regular report (RPT file) for development and export it to RPTR and deploy it when it is necessary. There are some tools , which pretend that they secure any Crystal report file , but these are false statements and the files can be easily open in design mode.
To make the report read-only:
Navigate to File Menu --> Report Options -->Select the 'Read-only' check box-->click 'OK'

Export to Excel to be set for a single report in jasperserver 4.5

I am working on Jasper server 4.5 version.
I need to know the details on whether i can set the Export to Excel for a report.
In more details all that i need is to have only one export option available for that report.
But at the same time the changes done for this report should not affect the export options of other reports.
Thanks in advance.
Regards,
Sarakartik
Yes, you can export your reports as .xls or .xlsx files. If you are using 4.5 professional, check out the JasperReports Server User Guide in the documentation. There is a section on navigating and exporting reports. JasperReports Server allows you to export reports in many formats.
As for report-specific export options: because the exporting buttons are at the application level and not unique to each report, I think it might be difficult to enable only Excel exports for one report and not have that flow over into your other reports without extreme customization. But maybe someone else can offer a suggestion.

Is there an api to create a Crystal Report

Is there an api that can be used to create a crystal report programmatically? I have reports written in Powerbuilder that we need to convert to Crystal and I would like to automate the conversion.
Crystal does have a report creation API, but I believe you have to have a license to their report server product to use it> I tried to find a link to this info on their site, but it is pretty well hidden.
Review the Crystal Reports SDK. There are COM, .Net, and Java 'flavors'.
For an example of converting an RPT file to XML, review this Google Code project: RptToXml
For .NET based languages, there's a Crystal Reports SDK available from Microsoft. They expose the object model and an SDK to create Crystal Report files.
Take a look at http://crystalreports.co.uk/developer-zone/ and select the appropriate platform (Java or .NET) and this will take you to a list of links into the SAP website.
The list is maintained by the one of the partners so should be up to date.

Storing Crystal Reports in XML files?

I was talking to somebody a recently who mentioned it was possible to store reports created using Crystal Reports as XML files.
Upon Googling this, I can't find anything suggesting that this is the case (using data stored in XML in a report, yes, but actually storing the report, the part stored by default as a .rpt file, no.
Am I correct in assuming that there was in fact some sort of misunderstanding between us and it in fact not possible to do this?
It is not possible to store the report template in XMLformat. XML is supported as export format of the "rendered" report only.
For what purpose do you need the report template in XML format. There is a Java reporting solution called Crystal-Clear which can read the Crytsal Reports report template and save it as XML report template. The other way round this does not work. After you created a XML file you cannot open the report with Crystal Reports again. But you can work with the report using Crystal-Clear which is coming with a GUI-designer too.
Use the Crystal Reports SDK to convert the RPT file format to XML.
There's a GitHub project that will convert RPT to XML. The intent of the tool is to use for diffs, so I don't know if there is a XML to RPT converter. Crystal Reports certainly can not take the XML file and open it like a .RPT file.
At least in version 8.5 XML-file is one of the supported export destinations just like PDF, Excel or Word. Seems unlikely they'd have removed the support in later versions.
I just tested in Crystal Reports 10.
Open up the report you want to export, click on export in the file menu, and at least in CR 10, XML is at the very bottom.
Next a screen appears, asking for directory and base file name to save to. According to the Window it uses "Crystal Markup Language" XML Format