Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Two tables in ne PDF file

Status
Not open for further replies.

kaeserea

Programmer
Feb 26, 2003
164
DE
Hello!

Strange problem I have here. I'd like to show two tables in one PDF file. It all work well when I chose HTML as output format but not for PDF. Here is how I do it:
[tt]
DEFINE FILE XYZ
FIELDS....
END

TABLE FILE XYZ
SUM ...
BY ...
IF ...
ON TABLE PCHOLD FORMAT PDF
END

DEFINE FILE ABC
FIELD ...
END

TABLE FILE ABC
SUM ...
BY ...
IF ...
ON TABLE PCHOLD FORMAT PDF
END
[/tt]

Each table has another file as database. The data for table one is stored in a db2 database and the for the second table it is stored in sequential files.
However, I guess the place of storage does nothing to it because all works fine with HTML output.

When I call the report then only the first table is displayed but not the second table.

Does anybody know what to do?
Eva
 
Hi,
This isn't a direct answer but it may be of some use.
If you generate 2 postscript files (format PS) instead of PDF files, you can then use DOS copy to get both files into one file which can then be made into a single PDF file - providing you have access to Adobe Acrobat Distiller (which creates the PDF's from postscript files). The only problem might be that, while you get just 1 PDF file, it may contain 2 pages. I've used this facility to merge several reports into one file for e-mail circulation.
Peter.
 
If you are using WebFOCUS Developers Studio there is an article in the WebFOCUS Newsletter Special Edition 2001 page 8 regarding Creating Compound Reports in Developer Studio. This talks about creating multiple PDF reports through separate FOCEXECs which are compounded into one PDF.
You can get to the Newsletters from IBI's site. Look under publications.
 
Unfortunately I don't have the WebFOCUS Developers Studio. And I need to create the PDF dynamically, so the solutin to merge two separate PDF files with the distiller does not work either.

jthtx, maybe you can tell me how the merging works in the background so that i can write it in a fex myself?

Eva
 
If you don't have a release which supports Compound Reports, then you'll HAVE to use some program to put multiple PDF outputs together. This is due to the internal structure of PDF files. The fact that a straight concatenation works in HTML is ACTUALLY a bug with HTML, since the first report ends in a </HTML>, and anything following should be ignored.

What release and platform are you using, and have you tried compound reports:

SET COMPOUND = 'OPEN <NOBREAK>'
<request 1>
<request 2>
SET COMPOUND = 'CLOSE'
<request 3>
 
Hi Focwizard,

Can u give some example for the compound document, that combines multiple PDF's into a single PDF.

Looking for your help.
 
Try using
ON TABLE PCHOLD FORMAT PDF OPEN

and

ON TABLE PCHOLD FORMAT PDF CLOSE
 
Hi FocWizard,

I tried with your response. This is working with two files that generate single pdf output format. But I want to generate single pdf file from three seperate hold file. If I am using your code then it is showing only last two file and not the first one. Can u pls give me help on that...

 
Hexcot,

Try

TABLE FILE TABLE1
...
ON TABLE PCHOLD FORMAT PDF OPEN
END
TABLE FILE TABLE2
...
ON TABLE PCHOLD FORMAT PDF
END
TABLE FILE TABLE3
...
ON TABLE PCHOLD FORMAT PDF CLOSE
END
 
Hi,

Thanx all of you for giving me the support...

gizzy17.... It is working fine with this solution..

I am very happy...

Once again Thanx.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top