Consultor Eletrônico



Kbase 20159: Using AD-HOC Date Range in Actuate Report Headers
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   16/10/2008
Status: Unverified

GOAL:

How to use and pass Ad-Hoc selection range parameters to an Actuate report header.

FACT(s) (Environment):

Actuate 4.x

FIX:

To pass a date-range to the header, follow these steps:

1) Define, at the AcReport class level of your design, 2 new static, public, string variables (say FromDt and ToDt). These are your global variables.

2) In the Start method of your DataStream, assign your AD-HOC parameters to your new global variables.


For example:


FromDT = orders_forcastOrderDate

(where orders_forcastOrderDate is one of the AD-HOC parameters.)

3) Use the FromDt and ToDt global variables wherever you need to in your report design.

Actually, there is no need for extra variables. Use just the parameters themselves (they are nothing more than global variables whose initial values can be set externally).

For Or/And use InStr() to find the "-" character in the ad-hoc value. Use Left$() and Right$() to get the two  substrings, and use ParseDate() to convert those into dates for display (This allows precise formatting of the dates).

If you are doing this, then creating pseudo-global variables (static variables at the root level of the design) is required in order to pass the results around.

You can define a text control and have this in the value expression:


"From " & Format$(Start_Date, "mm-dd-yy") & " To " & Format$(End_Date, "mm-dd-yy")