Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report template to use across several databases

Status
Not open for further replies.

griffter

Programmer
Oct 17, 2005
36
GB
Hi
I need to create report templates that will work across many databases. The databases all contain the same tables but occassionaly 'custom' fields will be added to the tables. Where I need to add these fields to reports how do I handle the fact that sometimes the field will not be present in the table and sometimes it will??

Any guidance will be much appreciated.
 
Crystal has something called a 'template', but what it does is stamp a 'look and feel' on an existing report. At least that's true up to and including Crystal 10. Useful only if you want to make your documents look fancy according to some corporate standard.

What I'd think of as a template, something like an MS Word template, does not exist (unless I've overlooked something). What I've always done is have 'model' reports and then use Save As to get a version for some particualar purpose. Or sometimes forgetting and corrupting my model report, of course, it is wise to set one up and then take a few spares.

Swithcing between simiarl databases ought to be very simple, using Database > Set Datasource Location or similar.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Thanks for the feedback. I was going to create a template much as you describe. My problem is more around the fact that the report will be used against multiple databases and although the table design of these databases are the same, there are occassions where 'custom' fields are added to the tables. These reports will be shipped with our product and need to work whether the client is using the standard build or some of the custom features.

My query is how to handle this in Crystal, my gut feeling is that I will need to do this in the SQL query as crystal will want the field to be present in the table to be able to add it to the report or manipulate it in formuals.
 
You need to maintain different versions of the report: one for each database fields variation. Each version can run against all databases that have the same fields.

hth,
- Ido

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top