Actuateclub.com

 

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

Techieindex

 
Parameter for purchase volume
In this design we run the report using parameter.
Description
In this report the data reading from a Flat File. As in all languages we have to open a file before we can read from it. Actuate uses file numbers to identify a file. To get the next unused system file number, we use FreeFile function. The value returned by the FreeFile function is Integer. Its value is not changed until you actually open the file. So it is always returns the current file number
First of all create a simple report with one frame, a connection and SQL component.

In this design we should create parameter named purch. That was already discussed in the lesson 2.

Double click the New Report Design and select its method tab. Select the Build( ) function and click override button.

Sub Build( )

               ‘ Insert your code here

                 On Error GoTo ErrorHandler 
                
Super::Build( )
                 Exit Sub
                 ErrorHandler:
                 MsgBox"The error that occured was" & Error()

           End Sub


   Build ():

                 This function is used build objects that do not use data rows.

   Error ():

                 This function returns the error message for the recent run-time error.

Double click the Query component and select its method tab.   Select “ObtainSelectStatement()” and click   Override button.
Type the remaining lines to the function before ObtainSelectStatement =       Super::ObtainSelectStatement( ) 

select case Ucase(Purch)

Case "HIGH"

            WhereClause = WhereClause & " and 
            Address.purchvolume IN (8,9,10) "

    Case "MEDIUM"

            WhereClause = WhereClause & " and 
            Address.purchvolume IN (5,6,7) "

    Case "LOW"

            WhereClause = WhereClause & " and 
           Address.purchvolume IN (1,2,3,4) "

    Case Else  

 


ObtainSelectStatement( ) : This function create custom SQL select statements. Before running we should   enter HIGH, MEDIUM or LOW in its parameter.
 

 

 

 

 

 

Copyright © 2008 Techieindex