Focal Point
Emailing a PDF Report

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

March 08, 2007, 06:33 AM
gkata
Emailing a PDF Report
I have an java application that creates a WebFOCUS report (PDF format). Prior to the report being created, the user can enter email addresses into a text box (one or many). I'd like to email this report to the email addresses that were entered into the text box. I thought about doing this thru report caster, but I'm not sure how to set this up (thru the URL or ?)
March 08, 2007, 09:04 AM
BlueZone
gkata ;
I have never done it myself, but looks like the "ReportCaster API" is what you are looking for. Please search the Forums & the IBI techsupport site for that term to find necessary manuals and such.

Sandeep Mamidenna


-------------------------------------------------------------------------------------------------
Blue Cross & Blue Shield of MS
WF.76-10 on (WS2003 + WebSphere) / EDA on z/OS + DB2 + MS-SQL
MRE, BID, Dev. Studio, Self-Service apps & a dash of fun !! Music
March 08, 2007, 12:35 PM
Darin Lee
The ReportCaster API would probably be the best way to go, but requires knowledge of a lot of additional information about Java as well as how to use the API. Way back when, we were trying to come up with a quick solution, so we just took those values, wrote them out to a file, and then used the dynamic address feature of ReportCaster. This allows you to run a procedure that send the distribution list back to RC. It's in the docs how to do this, but basically here it is:

Output your addresses to a file using some FEX (probably use a -WRITE) or Java procedure
Create metadata for that file
Create a server procedure like the following:

SET HOLDLIST=PRINTONLY
DEFINE FILE dstlist
DEST/A50=DESTINATION_ADDRESS;
END
TABLE FILE dstlist
PRINT
DEST
ON TABLE PCHOLD
END

1. The output field must be named DEST/A50,
2. DESTINATION_ADDRESS is the field that contains the email address, printer IP, or FTP location
3. You must use ON TABLE PCHOLD

We use this for dynamic printing and email (where the user specifies to which printer it should be sent or to whom it should be emailed) and for FTP.

It works well enough that we never bothered to go back and learn the API.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
March 09, 2007, 11:25 AM
Lusheng
Sun has a java class sendfile which you may use. Then you save the email address typed in the textbox to a .bat file with the report name including its path. From that .bat file, you can call java class to mail the report to the receipant, and that .bat file can be called from your focexec.