Printing the Timeframe on a Report

Printing the Timeframe on a Report

Postby LMCBeth on Sun May 23, 2010 5:38 pm

At Engage, I was asked about how to print the timeframe on a Reportbuilder report.

I suspect that this can be done using the "GPSCubeDate2DateTime" function however I do not have a good reference on how to implement the GPS functions.

Can anyone direct me to a quick guide on the use of GPS functions and/or answer whether this function can be used to print the report timeframe on a reportbuilder report?
LMCBeth
 
Posts: 11
Joined: Fri Jul 06, 2007 6:17 pm

Re: Printing the Timeframe on a Report

Postby jackie on Thu Jun 03, 2010 3:46 pm

1. From the Report Writer - Design view, create a new variable.
2. Click on 'Calc' tab and go to the Report Bands. The windows in the right shows the variables associated with the selected Item in the Report Bands.
3. The first step is to assign the value of the variable and return its value.To set Value in the field named Value. To set Value to something the ' := ' (colon & equal) is used.
4. All available GPS functions including "GPSCubeDate2DateTime" can be found on the "Code Toolbox:Language" section and these GPS functions can be used in your variable code/procedure by clicking the field and dragging it into the variable code.

Here are some good examples for TimeFrame(Calendar or Fiscal) Functions:
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
GPSViewTimeframeCount (integer) - returns the number of timeframes in the view. This should be used for error handling purposes. For example:
if (GPSViewTimeframeCount > 0) then do something 
GPSViewIsTimeframeCalendar (Boolean) - returns if a given timeframe is a calendar timeframe or fiscal timeframe.
if (GPSViewTimeframeCount > 0) then
  result := GPSViewIsTimeframeCalendar(0);
GPSViewTimeframeCalendarFromDate (TDateTime) - returns a given timeframe's from date (assuming it is calendar) - it is your responsibility to handle if a timeframe is calendar or not.
if (GPSViewTimeframeCount > 0) then
  if GPSViewIsTimeframeCalendar(0) then
    result := GPSViewTimeframeCalendarFromDate(0);
GPSViewTimeframeCalendarToDate (TDateTime) - returns a given timeframe's to date (assuming it is calendar) - it is your responsibility to handle if a timeframe is calendar or not.
if (GPSViewTimeframeCount > 0) then
  if GPSViewIsTimeframeCalendar(0) then
    result := GPSViewTimeframeCalendarToDate(0);
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Hoe this helps.
Jackie
Davis Controls
jackie
 
Posts: 3
Joined: Thu May 21, 2009 2:42 pm

Re: Printing the Timeframe on a Report

Postby LMCBeth on Thu Jun 03, 2010 3:50 pm

Thank you Jackie!
LMCBeth
 
Posts: 11
Joined: Fri Jul 06, 2007 6:17 pm


Return to GPS/EBA Product Discussion

Who is online

Users browsing this forum: No registered users and 1 guest