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,
Excel, HTML, PDF
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
HTML, PDF, Excel etc
SQL Server 2000 / 2008
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.)
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
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.
Excel, HTML, PDF
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.
TThis message has been edited. Last edited by: Tony A,
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.
Thank you to both of you for your suggestions.
Excel, HTML, PDF
|Powered by Social Strata|