views:

266

answers:

4

We have a purchased application (I'm told it's .NET, it's client server, running on Windows XP, connecting to SQL Server 2005) that uses a Crystal Reports runtime and separate report files (.rpt) to do it's reporting function. I have a copy of the CR Designer program but we don't have the CR Enterprise software. I can open the reports in the designer, get to the SQL Server data source (and any others, I guess), add them to the report, run it, print it -- but I can't figure out how to use the same Datasource, which is a subset of the tables in the database that it's connecting to, to do it, and I can't figure out how to save the report files so they'll work with the application. Real gravy would be coming up with new reports.

Is this even possible?

A: 

If you open up the report and then go to Database, Set Datasource Location, under the Properties section you will find a lot of info about the datasource and where it is getting it's info from. If the purchased application is creating its own datasource internally though and supplying it to the report at runtime, the best option that I can think of is to start a trace on the SQL Server and then run a report. You should be able to see the SQL that is issued by the Datasource and replicate it in your own version.

Anthony K
A: 

You have the possibility to manage your connection's properties at runtime (ie while launching CR from your app). Here is a proposal: Crystal Reports Datasource remap

If you cannot access your app code, you should then do as proposed by @Anthony, by updating all your connection strings in your rpt files, save the rpt files, and copy then on the corresponding report folder of your app: you might have to find where it's located in your system.

Philippe Grondier
A: 

First of all, you'd better make sure you're not violating the application's license agreement by attempting to add to it in this way. It may simply not be possible to add reports to the app in any case - it depends how it loads them and what it does with them.

To use the same datasource, you should just be able to open one of the .rpt files, then go to File > Save As, and give it a new name. Then modify it to what you want. Of course, if you don't know the authentication credentials the app passes to the report to connect, it would be tricky to test it.

It would help greatly if you gave us the name of the purchased application, as we don't really know what you're up against.

CodeByMoonlight
A: 

It could be that the application is passing through a filter of the data. So when you run the report from Crystal Reports Designer you get the whole data base, however when run through the program the parameters being passed to the report restrict the data back down.

Create a backup of the report. Then edit the existing report, make the changes you require, preview the report to get an idea it looks right, save the report and run the report via the application.

Warning: As it has already been stated some vendors may not allow you to edit existing reports, your warranty/sport may be voided by editing existing reports, or reports could even be overwritten on the next update.

Audioillity