...
Adding data to a BIRT report that is generated by Weave is done in the same manner as data from any other data source that BIRT supports, but you need to choose the "Cohga Weave Oda Data Source" driver when creating a new data source, which is done by right clicking on the Data Source item in the Outline panel in the BIRT designer and selecting New Data Source.
From the next screen you need to enter the URL of a Weave server that is currently running and will be serving the data that you wish to include in the report.
...
Info |
---|
The Test Connection button will check if a connection can be established to the Weave server pointed to by the URL parameter |
Warning |
---|
If the Test Connection button does not successfully connect to the server, and you know that the URL parameter is correct, it could be that the connection is being blocked by by the security.xml file, particularly if you have enabled NTLM or Kerberos security (i.e. Windows single sign-on). If you do have NTLM or Kerberos security enabled then you can disable it just for the BIRT report designer by ensuring that the URL pattern
Also, ensure that the
|
Once you click Finish you will have a new data source connection available for retrieving data from a Weave server
...
Info |
---|
The map component in the report design was hidden in the design |
Linking data sets
The filter setting in the data set property pages allows us to display additional details for each row of another data set, for example if we wanted to display registered animals at each property in our sample report we'd create a new data set, which would be linked to an animal registration data definition, but we'd filter it based on the property id and link that filter to the property id of the data set we've already created.
Here we've created a new data set from some sale data and this time setup a filter based on the _id column. It doesn't have to be the _id column but in this case the _id column is directly linked to the _id in the property details table we've already created, so we'll be joining them.
Info |
---|
It's important that a filter column be selected when creating the data set. |
Warning |
---|
You may receive a warning when you go to save the new data set, telling you that a value has not been set for the id parameter. This warning can be ignored because we'll be setting the value for the id parameter from its parents data set in the next few steps. |
Now that we've created the new sub-data set we need to create some room in the existing table to add the new data.
Select the table and right click on the row handle for the detail row and select Insert|Row|Below to add a new row below the current detail row, this way the sale details for each property will be listed below the address.
Then we merge the cells together by clicking and dragging across the visible cells in the new row
and then right clicking in the selected cells and selecting Merge Cells from the menu
This way when we add the new data set to the existing table it'll fill up the width of the parent table. You don't have to do it this way, and you may find better methods of laying out your report pages, but this is to demonstrate linking data sets, not how to layout pages.
From here we can just drag and drop the new data set into the area we've just created in the existing table
Info |
---|
Remember to hide the _id column if you don't want it to appear in the final report |
The important step here is to link the new table to the parent one, this is done in the Bindings for the tables data set
By editing the bindings for this tables "_id" parameter and setting it to the value from the "_id" field in the parent table, which is done by setting the value to row["_id"], you'll link the sub-table to the parent table.
If it was a different column from the parent table that contained the value to use to filter the child table then you would use the name of that column, for example row["sale_id"].
Finally, if we generate the report we'll have sales information for each property
Info |
---|
The report design was formatted slightly to improve readability |