Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 /report/remote does not have any NTLM or Kerberos filters applied, by updating the filterChainProxy to include the following (before the last /** catch-all entry)

        /report/remote=httpSessionContextIntegrationFilter,authenticationProcessingFilter,securityContextHolderAwareRequestFilter,rememberMeProcessingFilter,anonymousProcessingFilter,jsonExceptionTranslationFilter,filterInvocationInterceptor

Also, ensure that the /report/remote URL pattern is listed in the objectDefinitionSource as being accessible anonymously (again, before the last /** catch-all entry)

        /report/remote=IS_AUTHENTICATED_ANONYMOUSLY


Once you click Finish you will have a new data source connection available for retrieving data from a Weave server

...

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.

...

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

Image Added

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
Image Added

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.

Image Added

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

Image Added

Info

The report design was formatted slightly to improve readability