on 06-09-2008 12:09 PM
hi all,
how can i open the pdf file through the button click(ie function call)?
Thanks,
John R
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John,
Please check the function code below to open PDF file from button,
function Print()
{
var QryObj=document.generatePDFfileApp.getQueryObject();
QryObj.setParam(1,vCurrentDate);
document.generatePDFfileApp.executeCommand();
window.open("../reports/PDF"vCurrentDate".pdf");
}
or
function Print()
{
document.generatePDFfileApp.executeCommand();
window.open("pdfFile.pdf");
}
-Here Print() is Function name given to button.
-"generatePDFfileApp" is an Applet that calls the Xacute Query which has PDF file Generation Transaction.
- In transaction u have to use Image saver for storing Path of PDF File.And u need to Specify that file name in window.open() with .pdf Extention
-Above Example has timestamp attached each PDF generation hence passing vCurrentDate variable which holds date and time stamp.
- See the Second fuction code to understand better.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Set an onClick event for the button and add
window.open('<pdffilename>','_blank');
inside the function
Regards,
Ravi Kumar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
13 | |
7 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.