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     [SOLVED] Printing 2 tables as a DOC format
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Printing 2 tables as a DOC format
 Login/Join
 
Gold member
posted
I am trying to print 2 tables as a DOC format.

 -*Table 1
TABLE FILE CAR
SUM 
    RETAIL_COST
BY  COUNTRY
BY  CAR
ON TABLE HOLD AS REPORT1 
END

TABLE FILE REPORT1
PRINT *
ON TABLE PCHOLD FORMAT HTML
END




-*Table 2
TABLE FILE EMPLOYEE
SUM 
     EMPLOYEE.EMPINFO.CURR_SAL
BY  EMPLOYEE.EMPINFO.EMP_ID
BY  EMPLOYEE.EMPINFO.LAST_NAME
BY  EMPLOYEE.EMPINFO.FIRST_NAME
BY  EMPLOYEE.EMPINFO.DEPARTMENT
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/warm.sty,
$
ENDSTYLE
ON TABLE HOLD AS REPORT2
END

TABLE FILE REPORT2
PRINT *
ON TABLE PCHOLD FORMAT HTML
END 


The code here holds both tables and prints them as HTML which will print both tables on the page. When I try to print both of them as DOC format, it only prints Table 1 and not Table 2. Is that a limitation of the DOC format or is there any way to print both files onto one DOC file?

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


WebFOCUS 8.2.01M on Windows 10
 
Posts: 54 | Registered: July 30, 2018Reply With QuoteReport This Post
Virtuoso
posted Hide Post
I would add a -RUN after each report.


WebFOCUS 8206, Unix, Windows
 
Posts: 1846 | Location: New York City | Registered: December 30, 2015Reply With QuoteReport This Post
Expert
posted Hide Post
quote:
add a -RUN after each report

Not sure how that would achieve what is required apart from good practice?

Anyway, back to the question,

@CCollier,

You are essentially trying to create a document so you need to understand what formats you can use for such an output.

Unfortunately for you, DOC format is not one of those Frowner.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5684 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Gold member
posted Hide Post
So what you're saying is that there's no real way to combine the 2 into a DOC format because of the way that format works?


WebFOCUS 8.2.01M on Windows 10
 
Posts: 54 | Registered: July 30, 2018Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Tony A: It's like chicken soup...it couldn't hurt. Smiler

I just tried this and it seemed to work only in HTML. Neither PDF nor DOC will render the second report in the output. I agree that putting the output of several reports in one document makes sense. The only problem is it won't be in a format that'll open in MS Word.


WebFOCUS 8206, Unix, Windows
 
Posts: 1846 | Location: New York City | Registered: December 30, 2015Reply With QuoteReport This Post
Guru
posted Hide Post
try adding a OPEN on the first report and a CLOSE on the last report


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
 
Posts: 398 | Registered: February 04, 2008Reply With QuoteReport This Post
Guru
posted Hide Post
Because doc is a file, you first need to combine it in one file:

 
FILEDEF DOCFILE DISK docfile.doc (APPEND
TABLE FILE CAR BY COUNTRY
HEADING
"REPORT 1"
ON TABLE HOLD AS DOCFILE FORMAT DOC
END

TABLE FILE CAR BY COUNTRY
HEADING
"REPORT 2"
ON TABLE HOLD AS DOCFILE FORMAT DOC
END

EX EDAGET TXT, docfile.doc,T
 


P.s. for your HTML output it would also be better to use compound like RSquared suggested.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 435 | Location: Europe | Registered: February 05, 2007Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Printing 2 tables as a DOC format

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