Focal Point
[SOLVED] 4 Focus DB Same Date will not report

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

August 20, 2009, 03:09 PM
YKK
[SOLVED] 4 Focus DB Same Date will not report
Hi every one

I'm stock with a problem and i'm sure one of you expert can help me

I have 4 focus DB i'm trying to combine

File 1 is SRTST03

JoinLbl03 ( A12 )
Year3 ( P4 )
TypeLbl3 ( A25 )
DivLbl3 ( A5 )
Sales3 ( D12.2 )

File 2 is SRTST04

JoinLbl04 ( A12 )
Year4 ( P4 )
TypeLbl4 ( A25 )
DivLbl4 ( A5 )
Sales4 ( D12.2 )

File 3 is SRTST05

JoinLbl05 ( A12 )
Year5 ( P4 )
TypeLbl5 ( A25 )
DivLbl5 ( A5 )
Sales5 ( D12.2 )

File 4 is SRTST06

JoinLbl06 ( A12 )
Year6 ( P4 )
TypeLbl6 ( A25 )
DivLbl6 ( A5 )
Sales6 ( D12.2 )


I am trying to make a report which will combine all similar field into one field

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


7.6. / Win 7 / Excel
August 20, 2009, 03:45 PM
YKK
sorry, incomplete, i continue.

In file STRTST03 there is 10 records containing data for year 2008 ( Year3 field )
In file STRTST04 there is 10 records containing data for year 2009 ( Year4 field )
In file STRTST05 there is 3 records containing data for year 2008 ( Year5 field )
In file STRTST06 there is 3 records containing data for year 2009 ( Year6 field )

I am trying to create a report to show 26 record with data as

SRTST7

JoinLbl07 ( A12 )
Year7 ( P4 )
TypeLbl7 ( A25 )
DivLbl7 ( A5 )
Sales7 ( D12.2 )

All i tried so far has failed.

So i realy need help.

Thank you.

Dev studio 764 on XP


7.6. / Win 7 / Excel
August 20, 2009, 04:08 PM
Tom Flynn
Please update your signature via the link above.

This is not tested, BTW...

  
SET ASNAMES = ON
-SET &CNTR = 3;
-REPEAT GET_DATA 5 TIMES
TABLE FILE SRTST0&CNTR
PRINT 
   TypeLbl&CNTR AS 'TYPE_LBL'
   DivLbl&CNTR  AS 'DIV_LBL'
   Sales&CNTR   AS 'SALES'
BY JoinLbl0&CNTR AS 'KEY_COL'
BY Year&CNTR     AS 'YEAR'
  ON TABLE HOLD AS HOLD&CNTR
END
-RUN
-SET &CNTR = &CNTR + 1;
-IF &CNTR GT 7 GOTO DONE;
-GET_DATA
-DONE
TABLE FILE HOLD3
PRINT
  TYPE_LBL
  DIV_LBL
  SALES
 BY KEY_COL
 BY YEAR
   ON TABLE HOLD AS FINAL
MORE
FILE HOLD4
MORE 
FILE HOLD5
MORE
FILE HOLD6
MORE
FILE HOLD7
END
-RUN
TABLE FILE FINAL
PRINT
  TYPE_LBL
  DIV_LBL
  SALES
 BY KEY_COL
 BY YEAR
END
-EXIT


hth

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
August 20, 2009, 05:15 PM
GinnyJakes
Here's another idea. Since the formats for the four files are the same, use a single master and the USE statement to 'concatenate' the four FOCUS files to that master.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
August 20, 2009, 05:42 PM
Tom Flynn
Ginny, I would have suggested that if all the column names were the same.

If programmers create FOCUS DB's like above, instead of creating them with the same column names and different file names, then, the code above, or something similar, is my thought.

Of course, creating "another" MFD with common names will work also.


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
August 20, 2009, 06:15 PM
Waz
Another option would be to define the column names the same, then just do TABLE MORE.


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!

August 24, 2009, 12:09 PM
YKK
Thank you.

All column name same and TABLE MORE worked


7.6. / Win 7 / Excel