Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Dynamic Report Generation Post Reply Post New Topic
Author Message
kirandb
Groupie
Groupie
Avatar

Joined: 10 Jun 2009
Location: United States
Online Status: Offline
Posts: 69
Quote kirandb Replybullet Topic: Dynamic Report Generation
     Posted: 10 Jun 2009 at 8:41am
I am new to crystal reports.I know how to create a basic report. Now I have to convert a report from Actuate to Crystal. This report design basically drives more than 8000 reports. The complexity is that the user selects a set of parameters, these parameters are passed through a package in oracle which return a SQL which upon executing gives me the result set to be displayed. So basically my result set can have 3 columns to be displayed or 10. its dynamic which is based on how the user selects the parameters.
I have to design this report which takes in parameters and calls the package, fetch the resulting SQL and execute it and based on the no.of columns in the select clause, should create that many controls on the report design as display the result set.
I have no clue where to start. Any sample report design file would be of great help.
Thanks for your time.
Kiran
share your knowledge
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 11 Jun 2009 at 7:04am
are the column names the same for all 8000 reports, if not, Crystal is not going to work (at least not one report for all 8000 as a template).  You can only design the report to match the dataset that is sent.
 
Is the dataset created in an app?  If so, getting the data is easy.  Let the app get the dataset and then set the datasource of the report to the dataset created by the app. 
 
If the columns are the same in all the selects, then you can use Crystal to create the reports and conditionally move columns, change headers, and display fields.
 
Crystal is not very dynamic when it comes to how it interacts with the data, it expects the fields it is to display to be in the data and for the parameters to a stored proc to match exactly.
 
HTH
IP IP Logged
kirandb
Groupie
Groupie
Avatar

Joined: 10 Jun 2009
Location: United States
Online Status: Offline
Posts: 69
Quote kirandb Replybullet Posted: 11 Jun 2009 at 7:14am
The columns are not fixed. In Actuate we had one design file which dynamically adds the columns on the page before actually mapping the data from the dataset.
We are using Crystal Reports XI R3. So I dont know how many more features have been added. When we were given the demo by Business Objects folks, we were told that it is possible. So I dont know how can it be possible.
My report design is just displaying the columns. The simplest report design you can think of. Moreover another complexity is to provided the capability of drilldown say if the user want to see how a particular data has been formed,he can click on it and it will call another PL/SQL block by passing all the parameters along with the one user selected and this displays another report.
Regarding the data, its all inserts into temp table and then creating a final SQL from the data stored in the database. Is there any other way out by using Business Objects XI R3.
Thanks,
Kiran
share your knowledge
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 11 Jun 2009 at 7:23am

I don't have any ideas.  Have the BO folks tell you how.  In the years that I have been doing this, if the column does not exist in the dataset, you cannot display it on a report.  If you are displaying a field on a report and it is not in the dataset, Crystal will throw an error.

Perhaps, and I have never done this and maybe the BO people know how to do this, but posting to this site aren't encouraging, but you might be able to create an entire Crystal report in code.  If created this way, it might be possible to create a dynamically generated report, but it would be entirely from code.
 
Perhaps other will have other suggestions, but in my experience, when you 'write' a crystal report, it becomes very inflexible about the data...if you want to display a field, it needs to be in the schema that you have specified for that report...and it always needs to be there.
 
I'm on Crystal XI r2 or 3, so there aren't that many changes.
 
HTH
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum