Switching Data Sets
Options
Hopefully a simple question about changing data sets in a report...
I'd like to change from one data set to another with an existing report. I can't figure out how to do this with the various bindings. Each time I've tried to switch, the report starts throwing errors and I have to rebuild from scratch.
For example if a report has a table with a few cell's I assumed I'd just rebind the table to the new data set, then edit the cell's binding data to the new field name - but this doesn't work.
Any suggestions are appreciated.
I'd like to change from one data set to another with an existing report. I can't figure out how to do this with the various bindings. Each time I've tried to switch, the report starts throwing errors and I have to rebuild from scratch.
For example if a report has a table with a few cell's I assumed I'd just rebind the table to the new data set, then edit the cell's binding data to the new field name - but this doesn't work.
Any suggestions are appreciated.
0
Comments
-
I have not done this with a chart but you can do it with a table like this:
In the beforeFactory add script like this (make sure to name your table).
table = reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("table1");
ch = table.getColumns().get(0);
ch.setProperty("width", "10%");
table.setProperty( "dataSet", "Data Set2" );0 -
Hi ericsmith,
This should work as you described. What version of BIRT are you using? I'm using BIRT 2.2 and just created a report design with 2 datasets.
dataset1 has custnum, name, and city
and
dataset2 has custnum, name, and state
I dropped dataset1 onto the report and previewed to make sure it worked... then selected the table and switched the binding to dataset2. In BIRT 2.2, I can preview this without errors but nothing shows up for city. I then right-clicked on City, selected Change Data Column, and then picked State. After this, it ran fine and showed the State value. You could also delete the city field and drop state from the dataset2 onto the report.
VirgilWarning No formatter is installed for the format ipb0
Categories
- All Categories
- 111 Developer Announcements
- 49 Articles
- 102 General Questions
- 123 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 898 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 124 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 1 XM Fax