Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Question on a Loop for Mini-fiscal Year Report
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Question on a Loop for Mini-fiscal Year Report
 Login/Join
 
Master
posted
I am working with summary tables from a relational database.
An example synonym file layout is:

FILENAME=AGEGRP_11_A, SUFFIX=SQLMSS , $
SEGMENT=AGEGRP_11_A, SEGTYPE=S0, $
FIELDNAME=AGEGRP, ALIAS=AGEGRP, USAGE=A60, ACTUAL=A60,
MISSING=ON, $
FIELDNAME=_TYPE_, ALIAS=_TYPE_, USAGE=D20.2, ACTUAL=D8,
MISSING=ON, $
FIELDNAME=JUL10, ALIAS=jul10, USAGE=D20.2, ACTUAL=D8,
MISSING=ON, $
FIELDNAME=AUG10, ALIAS=aug10, USAGE=D20.2, ACTUAL=D8,
MISSING=ON, $
FIELDNAME=SEP10, ALIAS=sep10, USAGE=D20.2, ACTUAL=D8,
MISSING=ON, $
FIELDNAME=OCT10, ALIAS=oct10, USAGE=D20.2, ACTUAL=D8,
MISSING=ON, $
FIELDNAME=NOV10, ALIAS=nov10, USAGE=D20.2, ACTUAL=D8,
MISSING=ON, $
FIELDNAME=DEC10, ALIAS=dec10, USAGE=D20.2, ACTUAL=D8,
MISSING=ON, $
FIELDNAME=JAN11, ALIAS=jan11, USAGE=D20.2, ACTUAL=D8,
MISSING=ON, $
FIELDNAME=FEB11, ALIAS=feb11, USAGE=D20.2, ACTUAL=D8,
MISSING=ON, $
FIELDNAME=MAR11, ALIAS=mar11, USAGE=D20.2, ACTUAL=D8,
MISSING=ON, $
FIELDNAME=APR11, ALIAS=apr11, USAGE=D20.2, ACTUAL=D8,
MISSING=ON, $
FIELDNAME=MAY11, ALIAS=may11, USAGE=D20.2, ACTUAL=D8,
MISSING=ON, $
FIELDNAME=JUN11, ALIAS=jun11, USAGE=D20.2, ACTUAL=D8,
MISSING=ON, $

The MNYY fields (i.e. JUL10) contains monetary value (i.e. $23,000)
for that month, and the elements cover an entire fiscal year.

I am trying to create a report which will loop thru the data file
and select the correct no. of MMYY fields to display in a report if
the report is requested prior to the end of the fiscal year.

I have been trying to code a fex using the CHECK FILE command:

quote:

CHECK FILE AGEGRP_11_A HOLD
-RUN


but I'm not getting far. Frowner Any ideas?

quote:

CHECK FILE AGEGRP_11_A HOLD
-RUN

TABLE FILE HOLD
PRINT FIELDNAME
BY FIELDNAME NOPRINT
WHERE SEGNO EQ 1
ON TABLE SAVE
END
-RUN

TABLE FILE AGEGRP_11_A
SUM
-READ SAVE &Fieldname.A66
-*
-REPEAT :Loop WHILE &IORETURN EQ 0;
-*
&Fieldname
-READ SAVE &Fieldname.A66

-:Loop
END
-RUN


Thanks!

This message has been edited. Last edited by: Kerry,


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Reply With QuoteReport This Post
Platinum Member
posted Hide Post
We are in the fourth fiscal month so right now you would like your report to:

 
TABLE FILE AGEGRP_11_A
SUM JUL10 AUG10 SEP10 OCT10
...
END


Is that what you are getting at?


WF 8.2.06
Win10 / IE11
AHTML EXL2K PDF
 
Posts: 190 | Registered: October 19, 2010Reply With QuoteReport This Post
Expert
posted Hide Post
Assuming the last 12 fields are needed, the financial year, then this may work.

CHECK FILE AGEGRP_11_A HOLD
-RUN

TABLE FILE HOLD
PRINT FIELDNAME
BY FLDNO NOPRINT
WHERE SEGNO EQ 1
WHERE FLDNO GE 3
ON TABLE SAVE AS FY_COLS
END
-RUN

TABLE FILE AGEGRP_11_A
SUM
-INCLUDE FY_COLS
END
-RUN


If the last 12 will not work, then you may be able to try another method, like filtering on the format, USAGE EQ 'D12.2'. You filter on the field names. FIELDNAME LIKE 'JUL%' OR ....


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6309 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Question on a Loop for Mini-fiscal Year Report

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.