Hello,
I have a requirement as follows:
The user enters data in a page.
I need to use that data to create a pdf file, maybe add a logo based on a specific attribute on a page. The pdf file needs to be served immediately to the user who is outside the firewall. May log from home.
I can use sqr. But then that will not serve the pdf file directly. On needs to go to the process monitor and click the log output. Which is not acceptable to the users. They do not want to click multiple buttons.
Rather, they want the pdf file to be generated and served w/o going through process monitor etc.
Is there a way to do this ?
I understand, XML publisher reports can only be viewed in Report Manager.. -- again not a option.
Is it possible to use application engine to create a PDF file. I am not sure whether this is doable but this was suggested. I am not sure how though. ( the only way I can think of is to use a open source java classes like FOP to generate pdf file.
Have any of you accomplished this?
Title | Under | Posted on |
---|---|---|
Component interface Error: no rows exist for the specified keys | PeopleSoft Technical | 03/15/2019 - 3:54am |
ADD 24 months starting from current month.(peoplesoft) | PeopleSoft Functional | 07/29/2018 - 8:44pm |
TRC values dropdown | PeopleSoft Technical | 04/04/2018 - 12:54am |
how to find missing sequence in GRID and print the mising sequence number while saving through peoplecode | PeopleSoft Technical | 09/11/2017 - 4:49am |
Hi there,
I am assuming that you are using XML Publisher to generate the report
Please proceed as shown below
- Include a button at the end of the page where the user enters the details
- In order for the report to generate automatically after the user clicks the button, you will need to use this code under FieldChange of the same
If &xmlFile.IsOpen Then
If &xmlFile.SetFileLayout(@&Filelayout) Then
&xmlRowset = &xmlFile.CreateRowset();
&xmlRowset = GetLevel0();
&xmlFile.WriteRowset(&xmlRowset, True); /* populates the xml file with the entire rowset*/
Else
Error "SetFileLayout " | &Filelayout | " failed";
End-If;
Else
Error "OpenFile " | &filename | " failed";
End-If;
&xmlFile.Close();
Local PSXP_RPTDEFNMANAGER:ReportDefn &rptDefn;
&rptDefn = create PSXP_RPTDEFNMANAGER:ReportDefn("Pass the report definition ID here")
&rptDefn.Get();
&rptDefn.SetRuntimeDataRowset(&xmlRowset);
- After this, open the App Package PSXP_RPTDEFNMANAGER and open the peoplecode present under ReportDefn. Under this code, the method ProcessReport has to be modified to include one more parameter "Report Name as string".
- Pass this parameter wherever required in the function to generate the output
Danny
Yes, I agree with Danny that XML Publisher is the "best" approach for your requirement. PeopleSoft already does this on some of its delivered pages. One page is the "Development Document" page (Employee Self Service > Performance Management > My Development Document > Create Documents (or Current Documents). You will find a "Printer" icon on the page and once clicked will transform the data on the current page on to a PDF file.
Take a look at the code behind the page (EP_APPR_BASE1) and component (EP_APPR_BASE).
Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog