Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Monthly Auto-update Report Headings

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I was wondering if it's possible to get the headings in WebFOCUS to automatically update each month to reflect the month that it is representing?

For example, the headings are July X, July Y, and next month, they should be August X, August Y.

I'm reading the records from an Excel sheet, so I thought it might have been possible to add in an extra column in the data block, with the month displayed in it (so an extra column by the name of Month that displays July's or August's), and then in the Editor, display the headings thus:

Table File XXXX
Print Results as 'Results in ' <Month>
by whatever

But that doesn't work. Does anyone have any suggestions?
Thanks in advance. ^_^
 
I'm assuming that the month you want displayed is the 'current' month. If that's true, you can use the Dialogue Manager to get the name of the current month, and insert it into each 'AS' phrase. Here's a sample of code, which should give you what you need:

-SET &THISMONTH = CHGDAT('YMD ','MX ',&YMD,'A9');

This uses the CHGDAT routine to transform today's date (&YMD) in YYMMDD format, into the month name (expanded). The format of 'A9' allows for the longest month name (SEPTEMBER).

In my request, I use this variable as follows:

PRINT COUNTRY AS 'COUNTRY, FOR,&THISMONTH'

When executed, the value returned into &THISMONTH is substituted into the AS phrase.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top