Changing Crystal Reports reports shipped with an application and a runtime version - crystal-reports

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?

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.

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.

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.

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.

Related

Save Data Source in Crystal Server

I'm new to Crystal Reports/Crystal Server. Hope someone can enlighten me.
In SSRS, there's a thing called Shared Data Source wherein you can configure a data source like the server and database settings. This data source can then be used by multiple reports. This is very convenient especially if you would change the server name (ex: Production to UAT server) after some later time because you need to change it only on one place without modifying all the reports.
In Crystal Server, is there any equivalent? If not, what are the alternatives?
BTW, I'm using SAP Crystal Server 2013 and Crystal Reports 11.
Thanks in advance.
Edit: Saw this under Database > Set Datasource Location...
Can I save Datasource in Crystal and point all my reports thru this?
You can change data source by using Database-Set Datasource location from menu bar. From there it is pretty simple to change a reports datasource as long as you are changing to a database with same structure. If tables or fields don't exist you will receive an error. If field types used in the report do not match new data structure a mapping menu will appear.
So for example... I have several ODBC data sources which point to same server but different directories. Each directory has identical database structure but for different departments so all different data. I have setup each to be a favorite connection in database manager. I click database from menu bar, select Set Datasource. Select the current datasource. Select the new datasource and click update!
Very straight forward except for the items I mentioned in first paragraph.

Running Reporting Services against a test database

What's the best way to setup SSRS reports to run against a test database? We need to run them from the Report Server (e.g. from a browser) against a test database. I tried creating a linked report but I don't see a way to associate a different data connection with the linked report.
Thanks.
I usually create a second copy of reports in a Test folder on the SSRS server. This lets consumers test report changes before they affect production.
But if you really want one version of the report to point at both production and test you can get clever with data sources. Here's a blog entry discussing dynamically changing your datasource based on a parameter.
http://skamie.wordpress.com/2010/12/17/ssrs-changing-data-source-dynamically/
Then you'll need to either expose the parameter or call the report in some way where you can set the hidden parameter.
Create a new folder in the Report Manager and upload the exact same report to that new folder.
If needed, you can also hide this folder so only testing people can access the URL directly.
Create a new data source that points to your test database and change the data source of the new report to use the test data source.
That way you can leave your production report intact.
Go to Properties > Data Sources and point the datasource to your test database

How to export report files from Crystal Enterprise 10 server?

I am attempting to move some Crystal Reports from a legacy server (Crystal Enterprise 10) to their new home (SAP Business Objects XI v12). The former person in this position has multiple copies of reports everywhere with no versioning or documentation, so I decided to pull them all from the sources & start fresh.
In BO XI v12, to export a report file, I can select objects and choose "Send to --> File", which allows me to export the .rpt file.
However, in Crystal Enterprise 10, I can't discern any way to export the reports to a .rpt file. There doesn't seem to be anything in the CE 10 documentation referring to .rpt file export, either, so I'm thinking a philosophical shift occurred that I'm missing.
Any insight is appreciated; thanks!
To move objects and their instances (recurring or otherwise), you should use the Migration Wizard. It will move large numbers of objects between servers and preserve their IDs.
You will need to do a client (i.e. not the services) installation of BusinessObjects Enterprise (BOE) to get this tool.
If you are just trying to publish a report to BOE, use the File | Save as... feature and choose 'Enterprise' from the vertical list. The report's saved data will be discarded.
** edit **
To get a copy of the RPT w/ data to your workstation, there are a number of options:
schedule the report to a FTP location, to an 'unmanaged disk' (must be accessible by the Job Server), or email it to yourself
view the report "on demand' or a recently-scheduled instance, then use the Export button on the Viewer control to download the RPT w/ saved data. You will need to have the 'Download files associated with the report' right, however.
From the enterprise server you just need to render the report and export it from there. It should have an option to save it in crystal report format. Otherwise you can download it from the object explorer.

running a script from within crystal reports

I have an application that creates a report using crystal reports. The data for the report is created in db tables that are built on the fly and then deleted after the report has been created. I would like to save the database that create the report.
I have access to the reports, so I was wondering if it is possible to embed a script in the crystal report that would run when the report is created and move the data to another location, such as via a batch script.
Can anyone tell me if this can or cannot be done? Thanks for any thoughts.
Try this. In the .rpt, go to Database Export and Add Command as shown below.
I don't know what the proper SQL syntax is (the query in the sample image threw an error), but once you work it out, you could probably do it this way. This example from Business Objects uses this command as part of a larger question.
(However, since the original DB is immediately deleted, you'll have to specify a new database to put the table in. I don't know if that's possible.)

Can you start Crystal Reports 10 in read only mode so users can't create or change a report?

I'm in an environment where I have created reports in CrystalReports 10 and only want my users to view the report from an external application. The application is already set up to open the report with crystal, but I don't want my users to be able create or change the report. I can't seem to find a command line option to do this. Is there a runtime only version of Crystal?
embed crviewer and craxdrt components in your app (delivered with CR developer's edition, free to distribute) so that you'll be able to view reports without modifying them. Basic manipulations (zoom, search, export to pdf, display/hide details or groups) can still be done.
If you must launch this viewer from a command line, I'd advise you to embed it in an office document/file and manage it through VBA. You could for example launch the runtime version of Access (free to distribute) that will contain one generic form for Crystal Reports display.
There are Crystal Reports viewer components which you can use in your projects. They are coming with the Crystal Reports Developer editions and you can use them in almost every programming language. There you can define the report as view only if you want.
Go to SAP.com and search for "Crystal Reports Viewer". It may or may not do what you want.
Also take a look at "Crystal Reports Server". CRS XI is a nice reporting portal with many useful server-side features. Schedule reports to run and auto-publish. Generate PDF or Excel output. Limit access to reports (or groups of reports) by specific users, etc. But for your application you can use HTTP access within your application to the published results. This is a good solution for example when you have a large number of users viewing the same reports.
What about marking the file as read-only? If the viewer opiton isn't open to you.