On April 27, 2024, our Sign-in and Create Account options will be unavailable from 9am-12pm ET. During this maintenance window, developer account access and free trial registration will be unavailable.
Switching Data Sets
ericsmith
Junior Member
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.
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" ); -
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.
Virgil
Categories
- All Categories
- Cloud Editions
- 1 Thrust Services
- cat as link
- 1 Core SaaS Application development
- 10 Developer Announcements
- 15 General Questions
- 33.4K TeamSite
- 141 Application Governance & Archiving
- 15.2K Designing Analytics Reports
- 1K DevShare Downloads
- Core SaaS Applications
- nested parent
- 4.3K Developing Analytics Applications
- 8.8K Documentum Developer Forum
- Media Management developer
- 159 Transactional Content Processing (TCP)
- 1.7K Web Experience Management
- 55 Tempo Social
- 1 XM Fax