How to create a BIRT report based on multiple datasets

I need help creating a BIRT report; the situation is that I have several queries, but the report all the columns should be grouped by one column, for example (Operator) Like:

Operator | Expr1 | Expr2 | Expr3 | Expr4 |

op1 | ## | ## | ## | ## |

op2 | ## | ## | ## | ## |

op3 | ## | ## | ## | ## |


How can i do this? I am trying to make a separate operator dataset and put it in the first column and add a parameter to all queries, i.e. (Where (operator =?)) To get the Operator from the current row of the operators column. But I can not attach the parameter value in each dataset to the dataset of the operator dataset. Is this strategy right? If so ... how can I do this. If not, what is the right strategy? Million thanks in advance

+4
source share
2 answers

If multiple datasets come from the same data source, I recommend combining queries.

If multiple datasets come from different data sources, you can link them together using the shared dataset feature in BIRT.

To link two separate datasets together:

  • Right-click on the datasets in the Data Explorer panel in the BIRT Report Designer and select New Dataset.
  • In the New Collocated Dataset dialog box, select the dataset and field ("Operator" here) to be combined in the left list.
  • Select the type of connection (internal, left external, right external, full external) from the parameters between the two lists.
  • Select the dataset and field (operator again, here) that will be connected to it in the right list.
  • Give the resulting new dataset a meaningful name in the option at the bottom of the dialog box.
  • Click Finish.
  • Edit the resulting dataset to obtain the result as necessary from the Edit Dataset dialog box.

You can create shared datasets from only two existing datasets. However, shared datasets can be included as input datasets for other shared datasets, so if you need to combine three datasets together, this can be achieved by combining two of them into one shared dataset, and then creating a new shared dataset data based on the first joint data set and the third original data set.

There is no need to fulfill any of the existing queries to join data sets. The parameter condition for the operator in the query should be included only if the goal is to restrict the operators returned in this data set (for example, to return only operators 100-121).

+7
source

You can create as many datasets in a BIRT report as you need. From there, you can create shared datasets that create a single view of the data. Do you have a common field among your data sets that can allow you to create a connection?

If you cannot create a federated dataset, I would recommend setting up the dataset using scripts. The set of scenarios is based on POJO to aggregate data and apply the business logic needed to create the single view you need. From there, you read the data in a POJO report and you are all set up.

+1
source

All Articles