Parallel unions for columnar reports
Advanced report design
Parallel unions
You can use parallel unions to build easily columnar reports.
Performing parallel unions allow the combination of different datasets into a single dataset, the resulting dataset will have all the fields of the combined datasets, and as many rows as the larger dataset (or dataset rows group if common fields are used). The field names(columns) of joined datasets will be renamed, using a prefix Q01_ for the first joined dataset, Q02 for the second and so.
This feature allow the printing of multiple columns combining different tables.
Example using two datasets (parallel.rep):
- Enter into data access configuration window.
- Open the two datasets. In this sample we use DBDEMOS connection (Borland database engine), animals and biolife tables. There is no need to select a sorting, but you can use parameters to filter the datasets.
- Create a new connection named MEM for example, with connection type Mybase, this connection will used by the new dataset.
- Create a new dataset named COMBINED, check parallel union option, and assign the new connection, when you assign the connection to the dataset the new options will appear, you can select any dataset and include it into the union list. In this case we include ANIMALS and BIOLIFE, when the designer ask for common fields click ok without entering any common fields.
- In main report design window select the COMBINED dataset as the main dataset.
- Drag and drop fields into the detail section from the COMBINED dataset, usually you will drop the fields to build columnar report.
In this case there is no relation between the two datasets, so there is no join.
Example using two datasets (parallel2.rep):
- Enter into data access configuration window.
- Open the two datasets. In this sample we use DBDEMOS connection (Borland database engine), animals and biolife tables. There is no need to select a sorting, but you can use parameters to filter the datasets.
- Create a new connection named MEM for example, with connection type Mybase, this connection will used by the new dataset.
- Create a new dataset named COMBINED, check parallel union option, and assign the new connection, when you assign the connection to the dataset the new options will appear, you can select any dataset and include it into the union list. In this case we include ITEMS and ITEMS again. when the designer ask for common fields write OrderNo and click ok.
- You can click Show dat button to see the result.
- You can sort the resulting dataset by using the indexfields property.
- In main report design window select the COMBINED dataset as the main dataset.
- Drag and drop fields into the detail section from the COMBINED dataset, usually you will drop the fields to build columnar report.