#1 2015-04-27 07:55:32

ralex
Member
Registered: 2015-04-20

Tables involved in saving a birt report

Hi,
We are about to migrating all our birt reports from openreports to reportserver, but before proceeding I would like to ask you something to automate the process via script.
In openreports we have a separation between  reports and parameters , while in reportserver(correct me I am saying something wrong) we define for each report their own parameters. It's clear that more than 100 reports cannot be uploaded vua GUI and for each report adding their own parameters. So I would like to write down some script. The point is that I do not know what are all tables involved in storing such information. So i can't go on ....Could you please tell me what tables or other db objects are involved any time I create a birt report with parameters?
Thanks,

Alex

Last edited by ralex (2015-04-27 09:38:08)

Offline

#2 2015-04-28 07:03:58

Arno Mittelbach
datenwerke
Registered: 2012-02-14

Re: Tables involved in saving a birt report

Hi,

there are quite some tables involved, I am afraid. Basically, anything with RS_REPORT_*, RS_BIRT_REPORT, RS_PARAM*, RS_*_PARAM_* would be needed. The good news is, that the import is a perfect use case for ReportServer scripts as they can use the ReportServer object model to create new objects. For instance, the following code snippet generates a new Birt report.

// ommiting imports

// get report Service
def reportService = GLOBALS.getInstance(ReportService.class);

// create new report 
def report = new BirtReport()
report.setName("Some Name")

// add report to some folder
folder.addChild(report)

// persist report and merge folder
reportService.persist(report)
reportService.merge(folder)  

We could also handle the import for you as part of our support. If that is interesting, please send an email to info@datenwerke.net and we'll prepare a quote.

Cheers
-Arno

Offline

#3 2015-04-28 08:37:50

ralex
Member
Registered: 2015-04-20

Re: Tables involved in saving a birt report

Hi,
what is the difference between "rs_report_2_param_inst" and "rs_report_2_param_def" table ? I am noticing that for each text parameter, defined for a report, we have one instance parameter on rs_report_2_param_inst table?
What is the reason to do this?

Thanks,
Alex

Offline

#4 2015-04-28 19:23:43

Arno Mittelbach
datenwerke
Registered: 2012-02-14

Re: Tables involved in saving a birt report

ReportServer distinguishes between parameter definitions (that is, a text parameter is of type string and the text field has a width of 300px and the default value is foo) and a parameter instance (the current setting for the report is bar).

In any case, I would really advice against importing reports directly into the ReportServer database. ReportServer's object model is designed from an object oriented perspective and not from a database perspective. Hence to get all the database references right is difficult and its easy to miss something which will later haunt you (especially since a corrupted database model might not directly lead to obvious errors). With ReportServer scripts you can use the intended API which takes care of the communication with the database. One extra hint here. When inserting parameters use the ReportParameterService, that is

import net.datenwerke.rs.core.service.reportmanager.ReportParameterService;

def parameterService = GLOBALS.getInstance(ReportParameterService.class);

def  paramDefinition = new TextParameterDefinition();

parameterService.addParameterDefinition(report, paramDefinition);

Offline

Board footer

Powered by FluxBB