Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Compound Reports PCHOLD Format Alpha

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Compound Reports PCHOLD Format Alpha
 Login/Join
 
Member
posted
Because I needed a header row in a report and because saving as a text file from WebFocus will not bring the header row to the report I am creating, I created compound report with an output to 'ON TABLE PCHOLD FORMAT ALPHA' so I can download the report and save to a txt file with the header row at the top. Have not found any other output format that will keep the fields in the absolute position needed for the file. It will be used in another application and file layout cannot change.

Long story short, using a compound report, the header is in the report, but I am losing the first row of detail. Anyone else had this problem, and if so, how did you fix?

HEADER RECORD - NO. OF RECS 000071 TIMESTAMP 08-24-2018, 13:20
[FIRST ROW OF DETAIL S/B HERE - MISSING].....
91341196967640119811630625NPE24AFXHH562755SONATA W000000 .....
9134119696762011981976612KNMAT2MT2HP560133ROGUE W000000 .....

CODE:

DEFINE FILE FOCTPUL8
LINE1/A150 = 'HEADER RECORD - NO. OF RECS' | ' ' | COUNTER |' ' | ('TIMESTAMP ' | ' ' ) | RUN_DATE;
END
-*******************************************************************************
SET COMPOUND = OPEN
-*******************************************************************************
TABLE FILE FOCTPUL8
PRINT
LINE1
WHERE RECORDLIMIT EQ 1;
ON TABLE PCHOLD FORMAT ALPHA
END
-RUN
-*******************************************************************************
SET COMPOUND = CLOSE
-*******************************************************************************
TABLE FILE FOCTPUL8
PRINT
(ALL FIELDS ARE LISTED. CUT FOR VIEWING)
BY FIELD1 NOPRINT
BY FIELD2 NOPRINT
BY FIELD3 NOPRINT
ON TABLE PCHOLD FORMAT ALPHA
END
-RUN
-EXIT

This message has been edited. Last edited by: FP Mod Chuck,


Web Focus Developer Studio Release 7.6.1 Output formats include Excel, PDF, HTML, XML.
 
Posts: 25 | Registered: September 05, 2008Report This Post
Guru
posted Hide Post
Try this:

 
FILEDEF TXTFILE DISK txtfile.txt (APPEND


DEFINE FILE FOCTPUL8
LINE1/A150 = 'HEADER RECORD - NO. OF RECS' | ' ' | COUNTER |' ' | ('TIMESTAMP ' | ' ' ) | RUN_DATE;
END
-*******************************************************************************
SET COMPOUND = OPEN
-*******************************************************************************
TABLE FILE FOCTPUL8
PRINT
LINE1 
WHERE RECORDLIMIT EQ 1;
ON TABLE TXTFILE FORMAT ALPHA
END
-RUN
-*******************************************************************************
SET COMPOUND = CLOSE
-*******************************************************************************
TABLE FILE FOCTPUL8
PRINT 
(ALL FIELDS ARE LISTED. CUT FOR VIEWING)
BY FIELD1 NOPRINT
BY FIELD2 NOPRINT
BY FIELD3 NOPRINT
ON TABLE TXTFILE FORMAT ALPHA
END
-RUN

EX EDAGET TXT, txtfile.txt,T
 


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report This Post
Virtuoso
posted Hide Post
Have you tried using FORMAT COMT or DFIX ?


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2410 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Compound Reports PCHOLD Format Alpha

Copyright © 1996-2020 Information Builders