Copy Report Output to Path Specified in PO

RajeshGarg

Active Member
I have a huge output, some 200 column CSV report that I need to print in a location specified in the PO.

The obvious option would be write one line to flat file and go on creating.

However, I was thinking if it is at all possible to do this ?
Access the output on the server, read the PO path and copy it to specified location using the business function.
I kind of think it can be done in the Print Section of the Report or End Section of report level Event Rules but don't know the code to access the current job output.

Can somebody help me with this piece of code ? Thanks.

Regards,
Rajesh
 
If you have a third-part 'Forms' tool - you may be able to populate the header with the location, then have the tool export the UBE output to that location (at least, that one way I've seen it done).

(db)
 
Rajesh,

There are two main ways to produce csv files. One is to get the UBE to produce a csv file as output. This file is put into the PrintQueue directory (where the PDF and any UBE logs are put). The other way, and my personal preference (it is more flexible, though more work), is to write ER to build the output line and write it to the csv file in the desired location with the desired filename.

What you need to do is possible using both methods. Using the first method will probably involve a driver UBE that calls the UBE that produces the csv. The call would have to be in such a way that the job number of the CSV UBE can be retrieved (this has been discussed alot on JDEList) so that the filename in the PrintQueue directory can be built and then the csv file can be moved/copied to the desired location with the desired filename.
 
Thanks Pete for your reply.

I am looking at around 90 columns in CSV file so was keen to avoid the manual work i.e. ER to write it to CSV.

I guess will need to search the JDEList to retrieve filename from PrintQueue.
One question though, how do I get the path of the Print Queue ? Do I hardcode the path in PO or is there a way to retrieve the Server path also ?

Thanks for your help.

Regards,
Rajesh
 
Rajesh,

Firstly, when you are searching for information on how to retrieve the filename from PrintQueue, you will need to look for information on getting the job number for the run of a UBE. Using the job number you will then have to build the filename, which is something like: <UBEName>_<VersionName>_<JobNumber>.csv

Secondly, post 131103 will help you to get the path to the PrintQueue.
 
Back
Top