cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic generation of reports from templates on the Crystal Report Server

Former Member
0 Kudos

Hello,

We are new to Crystal Report Server so please feel free to correct me.

We are investigating the possibility of the automatic generation of reports from the templates on the Crystal Report Server XI Release 2 via the automatic retrieval of the data from certain databases and inserting this into the template on the Crystal Report Server

We are planning that our Java Application Server sends a message with particular parameters to Crystal Report Server each time an instance of a particular report should be generated.

Parameterlist contains Information, which template to use, for example a templateID, SQL-query or just u201CWHEREu201D-clause of the SQL-query as a String, to retrieve data sets, and some parameters which are needed to connect to a particular database.

On the Crystal Report Server side the following steps should be executed:

1. Connect to a specified Database (we use Oracle Database)

2. execute the SQL-query

3. insert the result data sets into specified template to generate a reportinstance

After the report is generated, it should be scheduled to one or more specified printers.

Has anyone programmed something like that before? Can anyone send a code snippet?

Thank you!

Best regards

Angelika

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Is it possible to pass somehow the SQL-Query to Crystal Report Server XI, so that it retrieves the data sets from the specified database and inserts them into the template automatically?

Former Member
0 Kudos

Yes this is a functionality you could have using Crystal Reports Server. You will need to do some development (build an application using an SDK)..... out of the box, without using custom code, you can't really do it. The closest you might come is to adding a record selection formula to filter your data, however you will still be required to add your data at design time.

The Report Application Server SDK has the capability of passing a sql query at runtime. With this you can create a result set from your database, and add that to your report template at runtime. This way you can design templates without data and add that data when you run the report.

The trick is that the Report Application Server SDK doesn't schedule reports, only modifies them at runtime, so after adding your report source you would need to commit the report back to your CMS database, and then schedule it using the BusinessObjects Enterprise SDK.

I would highly recommend reviewing the documentation referenced earlier in this thread to get an idea of what the different SDK's can do.

Former Member
0 Kudos

Is it possible to expose the code written with RAS SDK which generates automatic reports from templates as web services?

ted_ueda
Employee
Employee
0 Kudos

There RAS report creation/modification functionality is not exposed as a Web Service, but only via the proprietary Enterprise Framework via the RAS SDK.

Sincerely,

Ted Ueda

Former Member
0 Kudos

Hello Ted,

is there a possibility to acess that functionality remotely? Is it possible to write my own Web Service in order to call the function which generates the reports from templates remotely?

Sincerely,

Angelika

ted_ueda
Employee
Employee
0 Kudos

You'd then be creating a Web Service interface to the RAS SDK.

CR Server <> RAS SDK <> Your Custom Web Service Provider <--> Consumer

The RAS SDK [docs|http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/en/RAS_SDK/default.htm].

Sincerely,

Ted Ueda

Answers (2)

Answers (2)

former_member203619
Contributor
0 Kudos

Another option would be to just build the report from scratch - or you could take an existing report, and modify it by either added a dataset, and then adding the fields to the report.

This would be done using the RAS RCAPI SDK.

Shawn

Former Member
0 Kudos

Angelika, I'm not sure if I understand you correct. Do you wish to alter the query or just the where clause? If you wish to alter the where clause only you can use parameters in the reports and set the parameter values once you schedule the report.

Please read the "How to set parameter information tutorial" in our Developer Library for further information.

http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm#en/Viewers_SDK/viewerss...

Further information about scheduling are available in "Schedule a report to run" - Business Objects Enterprise SDK

http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm#en/BOE_SDK/boesdk_java_...