This is the second in a series of three tutorials that demonstrate how to configure Microvellum Business Objects in a sample report. This tutorial assumes that you have a basic understanding of Business Objects in Microvellum reports. Click here to see an overview of the subject.
It also assumes that the Business Objects have been set up in the report dataset. Click here to view the procedure for configuring them in the report dataset. This must be finished before attempting the procedure in this tutorial.
We will configure the report to display the following global variables and their associated values from the default Microvellum library.
Global variable location: Cabinet Back Construction / Back Construction Selections
Base Back Construction = Captured Sides and Bottom
Tall Back Construction = Full Captured
Upper Back Construction = Full Captured
Sink Back Construction = Captured Sides and Bottom
- Open the report named Business Objects – Product Detail you created in the first tutorial in this series containing business objects in the report dataset.
- Click the Designer button and then the Dictionary tab to view the available data. Expand the Data Source named "EstimateProject" and view the 'tables' below that parent entry. Verify that the data source tree appears similar to the picture below.
Fig. 1
- We will configure this report to consume the Business Objects data using subreports. Please be aware that there are other ways to use them in a report depending on its structure and the location of the data in the report. In this example, we will locate the data in the Page Header, so it displays on each page of the report for reference.
- Increase the Height property of PageHeader1 by 0.64" inches (or the equivalent metric measurement).
- Click the "Components" button on the left tool strip and select "Sub Report" from the list. Draw the subreport in the area of the Page Header that is now blank because of changing the height. Click OK to link it to the suggested page in the "Sub Report" box. Click on the Properties tab in the lower right corner of the Designer screen and set the subreport Left property to 0.02, the Top property to 1.14, the Width property to 3.83, and the Height property to 0.16 (or the equivalent metric measurements). If your report properties are different from those of our sample, locate it as needed.
Fig 2
- Click on the tab for the page you linked to the subreport component. In our example, click on the tab named "subreport_3" and add a databand to the subreport page. You may add a databand from either the dedicated toolstrip button named Data as in the first picture below by dragging it onto the design area or from the Bands dropdown list as in the second picture below by drawing it in the design area.
Fig. 03a
Fig. 3b
- Set the databand Height property to 0.16" (or the equivalent metric measurement), and the Data Source property to EstimateProject_GlobalVariables.
- Add a text component to the databand with a Left property of 0.0, a Top property of 0.0, and a Height property of 0.16. The Width should match the width of the page. You now have the base components ready and need to add the code to make them work correctly.
-
Add the expression code for the text component you just added. Do this by double-clicking the component and pasting the following expression:
G!{EstimateProject_GlobalVariables.Name & " = "}{EstimateProject_GlobalVariables.Value}
- Create a data filter that limits the data returned in that specific subreport to only that which matches the filter. In this case, that means only a single global variable value per subreport .
- Double-click on the databand you just added and select the tab Filters.
- Make sure the checkbox for Filter On is checked, and click the button Add Filter and set the filter properties as listed below.
- Field Is = Value
- Data Type = String
- Column = Name (full path: EstimateProject_GlobalVariables.Name)
- Equal To
- Base_Back_Construction
- Click the button OK.
- Click the Preview tab and correct any errors in the report before continuing. Save the report using the small save button in the extreme upper left corner of the Designer.
- Once your report is displaying the proper data for that first global variable subreport, you will duplicate that subreport component, and the page linked to it, to create three more subreports that will filter for the three remaining global values. Click on the subreport component you added on Page 1. Right-click and click Copy, or press Ctrl + C.
- Right-click at the location to create the copy and click Paste. Alternatively, press Ctrl + V and select a point.
- Repeat this step until you have four identical subreports within the page header band.
Fig. 4
- Duplicate the subreport page for the remaining global values.
- Right-click on the tab for the page you linked to the subreport component. In our example, the tab named "subreport_3" and click Duplicate.
- Repeat this step until you have four pages to match the four subreports components. The four pages will likely be named: subReport_3, Page 1, Page 2, and Page 3.
- Rename the three new pages that are not already linked to a subreport component to subReport_4, subReport_5, and subReport_6.
- Do this by clicking on the tab for that page, click the Properties tab, and change the Name property for each of the page tabs to the new name.
- Link each component to the similarly named page displayed on the list, as described below.
- Click on Page 1 again and double-click on each subreport component. Double-click the page to establish the link to the subreport.
- Repeat this step for each of the three duplicated subreports.
Fig. 5
- Modify the databand filters for the three duplicated pages to filter out all data EXCEPT that which matches the desired global variable name. The page containing the databand for the original subreport is already correct.
- Click the tab subReport_4 and double-click the databand.
- Click the Filters tab and change the name from "Base_Back_Construction" to "Tall_Back_Construction."
- Click the button OK and repeat this step to ensure that the databand filters for each of the four pages contain the correct global variable name for this report example, as shown below.
- Base_Back_Construction
- Tall_Back_Construction
- Upper_Back_Construction
- Sink_Back_Construction
Fig. 6 (Upper_Back_Construction global shown as an example)
The picture below shows the rendered report created using the procedure above.
Fig. 7
A report import file is attached if you would like to download the sample report to study the internal structure for educational purposes.