Focal Point
Report to display Current Year vs Last Year and Current quarter vs Last Quarter data

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6357008716

March 13, 2012, 07:07 PM
guru
Report to display Current Year vs Last Year and Current quarter vs Last Quarter data
Hi all,

I have the following requirement.

I need to display the data in this order


2012 2011 q1-2012 q1-2011
------------------------------------------
Income
Expense

i will not pass any parameter but the report has to calculate the current year and current quarter values. Is it possible to do this in webfocus?

Thanks,
Guru
webfocus 7.7.03


WebFOCUS 7.6
Windows, All Outputs
March 13, 2012, 08:22 PM
j.gross
Yes.

Here's something to start with:

-SET &YEAR=EDIT(&DATEYYQ,'9999');
-SET &QTR=EDIT(&DATEYYQ,'$$$$$99');

DEFINE FILE CAR
 SEQ/I2 WITH MODEL = SEQ+1;
 TODAY/YYMD='&YYMD';
 DATE/YYMD=TODAY + 91 * (SEQ-1);
 YEAR/YY=DATE; 
 Y/I4=YEAR;
 QTR/Q=DATE;  
 Q/I6=QTR;
END

TABLE FILE CAR
HEADING
" TODAY: &YYMD  YEAR: &YEAR   QTR:  &QTR"
PRINT DATE YEAR  Y QTR   Q  
BY SEQ 
WHERE QTR EQ '&QTR';
END