Actuateclub.com

 

  About Actuate   |   Forums   |   Message Board  |   FAQ   |   Jobs    |   Actuate 100   |   Guest Book  |   Feedback  |   Sitemap   |   Home

Techieindex

 
Customer report grouped by state & Parameter State
This is the basic steps to make a simple report using Developer workbench.
Description
In this design you will learn how to make a report by passing a parameter to query at runtime and how to group reports. This report is based on the first report and only changes will be mentioned here. In this Design we are grouping the report with State.
From the First design, remove the frame from Content Slot.
In this slot add Group Section and set Key to [Address.Addrstate]. This will group the report by State value in Database.

By putting a frame in the Before slot, we can display the things required to display at the time when a State is changed.

In this example put one Label control with text ‘State’ and a Text control with ValueExp [Address.Addrstate].
In the content section of this group, put a frame and in it place the control needed to display customers information. Now you may run the report. 
The next step is to change the query at runtime. We perform it by adding parameters.
To add a parameter in View menu selects parameters and click Add button. In this Dialog, specify the Parameter Name and Type. In our Design, set the parameter name to State and type as String.
Before running we will be prompted for a Value for this parameter.
The next step is to add a method to change the query at runtime with the parameter. To do this, double-click on the menu component and select the Methods tab.
Select “Function ObtainSelectStatement( ) As String” from the memo and click Override button.
Select “Function ObtainSelectStatement( ) As String” from the memo and click Override button.

if whereclause <> "" then

      whereclause = whereclause & " and "

end if

whereclause = whereclause & " Address.AddrState = '" &   State & "'"

Whereclause is a variable, which contains the where statements we provide with the SQL. We can modify it to reflect our requirement. The ‘&’ symbol concatenates with the strings. The parameter State can also be added here.

For grouping, Actuate uses control named as GroupSection. This component is placed at the Content slot of the report to group on. We need to give a “Key” value for the report to group on. There are two more important properties for this component. They are 1) Groupinterval, 2) GroupOn. The GroupOn tells whether the report should be grouped for Every Value or with a range. The Groupinterval says that how many units of GroupOn should be grouped as one. For example, if your key column contains the full date that an item was sold and you need to produce a quarterly sales report, use the GroupOn property to group the data by quarter. Actuate extracts the date information from the key column, converts it to a calendar quarter, and creates groups based on calendar quarter. Or, if you need to produce a bimonthly report, set GroupOn to GroupOnMonth and set GroupInteval to 2.
 

 

 

 

 

 

Copyright © 2008 Techieindex