Focal Point
Compound PDF report

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

February 15, 2005, 02:44 PM
Jen
Compound PDF report
I have three reports that I want to combine into one PDF file. Each report individually works fine, but when I try to run them together, the report does not print. I don't get an error message, it just doesn't open a pdf file. In other words, I just get the message of how many records/lines in my report. This is the syntax I've tried:

TABLE FILE CAR
DO STUFF
ON TABLE PCHOLD FORMAT PDF OPEN
END
TABLE FILE CAR
DO STUFF
ON TABLE PCHOLD FORMAT PDF
END
TABLE FILE CAR
DO STUFF
ON TABLE PCHOLD FORMAT PDF CLOSE
END

I've also tried using this syntax:

SET COMPOUND = OPEN
EX PR_INTERNAL_BYSEG
EX PR_INTERNAL_MM
SET COMPOUND = CLOSE
EX PR_INTERNAL_CONSOL

But that doesn't work because I'm prompting the user for beginning and end dates, and it doesn't seem to know how to pass the values between each focexec.

I know the first way should work, because I have a very similar report that works just fine.

I am stumped. Any ideas?
February 15, 2005, 02:54 PM
j.gross
To stick with the second method, establish the date parameters in the root fex, and pass them through to each of the reports:


-* prompt for the dates
** &START_DATE
** &END_DATE
-* pass then thru
SET COMPOUND = OPEN
EX PR_INTERNAL_BYSEG START_DATE='&START_DATE',END_DATE='&END_DATE'
EX PR_INTERNAL_MM START_DATE='&START_DATE',END_DATE='&END_DATE'

SET COMPOUND = CLOSE
EX PR_INTERNAL_CONSOL START_DATE='&START_DATE',END_DATE='&END_DATE'
The two "**" lines get stacked for execution, after prompting to resolve the & var references, but when executed are treated as comments.

This message has been edited. Last edited by: <Mabel>,
February 15, 2005, 03:29 PM
Jen
Oh, that's a cool technique I did not know! But unfortunately it didn't solve my problem. It did pass the variables just fine, but the end result was that I still don't get a PDF file, just the message telling me how many lines in my reports. And it's only showing the first two reports being generated, so it's like it doesn't recognize the last one somehow.
February 15, 2005, 04:39 PM
j.gross
c'est la vie. Next step, Ask the hotline.
February 15, 2005, 04:45 PM
reFOCUSing
What version of WF are you on? I had problems trying to do this in 5.2 but when we upgraded to 5.3 compound reports work a lot better.
February 15, 2005, 05:55 PM
Jen
We are still on 5.2. My company doesn't let anyone upgrade to newer versions until everyone has agreed to it. Everyone meaning every single last person who uses WebFocus.

I'm not holding my breath.

Thanks for your help.
February 15, 2005, 06:32 PM
Spence
See if this works for you.
This is working with version 5.26 and 5.32

-* File CompoundTest.fex
-* File t1.fex
TABLE FILE CAR
SUM
SALES
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF OPEN NOBREAK
END
-*REPORT 2
-* File t2.fex
TABLE FILE CAR
SUM
SALES
BY
COUNTRY
ON TABLE PCHOLD FORMAT PDF NOBREAK
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
END
-*REPORT 3
-* File t2.fex
TABLE FILE CAR
SUM
SALES
BY MODEL
ON TABLE PCHOLD FORMAT PDF CLOSE
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
END
February 16, 2005, 11:04 AM
Carol Dobson
Hi Jen,
If you send me the program/folder name I'll be happy to take a look.

Thanks,
Carol
February 16, 2005, 01:35 PM
Jen
Spence,

That code works fine. That's what I have tried with my reports, but it just doesn't create the PDF file. No errors, just no report. Very puzzling.
February 16, 2005, 03:50 PM
Spence
Jen,

What happens if you change the output to HTML instead of PDF? See if the reports work with HTML output. Maybe it has something to do with your version of Adobe.
February 16, 2005, 04:35 PM
Carol Dobson
Jen,
in the line that executes each report
take the comma off the end of each line and it works!

EX PR_INTERNAL_FML_CONSOL BEG_DATE='&BEG_DATE', END_DATE='&END_DATE',

on all 3 reports
I think FOCUS is expecting something after the comma.
February 16, 2005, 04:58 PM
Jen
Thanks Carol!! That's weird, I copied and pasted that code from the above post, and it must have stuck those commas in there because I'm pretty sure I didn't put them there.

Oh well, it works now!
February 16, 2005, 07:58 PM
j.gross
I saw the trailing comma and silently corrected it; I should have warned y'all. Sorry.

-Jack.