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] Email and save reports in ReportCaster
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Email and save reports in ReportCaster
 Login/Join
 
Silver Member
posted
We have few long running reports that emailed out Excel files to users. We want to save the outputs on the server(not in Reports Library) while emailing out to users. Is there a way to do this without running reports twice?

Thanks,

This message has been edited. Last edited by: Kerry,


WebFOCUS 8.2.05
Windows 2003
Excel, HTML, PDF
 
Posts: 47 | Registered: April 22, 2009Reply With QuoteReport This Post
Gold member
posted Hide Post
Hi,

Maybe try something like this:

  
FILEDEF FILE DISK \\FILELOCATION\FILE.XLS

-*this part will output to the file
TABLE FILE MYTABLE
PRINT
STUFF
ON TABLE HOLD AS FILE FORMAT EXL2K
END

-*this part will send in the email
TABLE FILE MYTABLE
PRINT
STUFF
ON TABLE PCHOLD FORMAT EXL2K
END



Jinx.


7.6.11
Windows
HTML, PDF, Excel etc
DevStudio/Webfocus/Focus IBM
SQL Server 2000 / 2008
DB2
 
Posts: 78 | Location: UK | Registered: February 07, 2008Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Actually, you don't need to do another table file. The file still exists in memory so yo can output it a second time without a new request against the data.
FILEDEF FILE DISK \\FILELOCATION\FILE.XLS

-*this part will output to the file
TABLE FILE MYTABLE
PRINT
STUFF
ON TABLE HOLD AS FILE FORMAT EXL2K
END

PCHOLD FORMAT EXL2K
END


This works fine in WF. Haven't actually tried that in RC, so I don't know what the behavior there would be (since RC seems to have its own set of rules sometimes.)


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
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Reply With QuoteReport This Post
Silver Member
posted Hide Post
Thanks to both of you for your quick replies. I can't do another table file request as they are compound reports with two to three tabs(reports) in Excel. I've tried Darin's method but it gives me an error. Currently, we have same report running twice in ReportCaster for emailing and saving.


WebFOCUS 8.2.05
Windows 2003
Excel, HTML, PDF
 
Posts: 47 | Registered: April 22, 2009Reply With QuoteReport This Post
Expert
posted Hide Post
JJ,

We had a similar situation with compound Excel reports built using templates but our users requirement was that they would need to decide which ones were emailed or not. My solution was to write the files to the network drive and, as each one was created, write a VB Script file that would open each one in Excel (requires Excel on the server). This ran the WorkBook_Open macro which reformated each worksheet as necessary and then save the workbook as "normal" Excel - reduces the size by around 66%. The final action deletes all the macros within the workbook. Another Web Page interface allowed the end users to choose which ones were to be emailed and the submission of that form ran another .fex which created a batch file (again VB Script) that created a CDONTS object with the required file as an attachment.

You could easily combine this approach so that the CDONTS process was created at report creation and then executed at the end of the batch process so that your files were emailed to respective recipients - basically doing what RC does internally but controlling it yourself.

I have previously given example VB Script CDONTS code to send files as attachments here, combining it with your WebFOCUS code should be quite straight forward.

T

This message has been edited. Last edited by: Tony A,



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: 5694 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Master
posted Hide Post
I had a similar request and what I did was copy/ftp the HOLD FORMAT EXCEL output to a network drive and send the users an email with a file link to the file.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 971 | Location: Oklahoma City | Registered: October 27, 2006Reply With QuoteReport This Post
Silver Member
posted Hide Post
Thank you to both of you for your suggestions.


WebFOCUS 8.2.05
Windows 2003
Excel, HTML, PDF
 
Posts: 47 | Registered: April 22, 2009Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Email and save reports in ReportCaster

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