Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can a PSP be invoked from a form? 1

Status
Not open for further replies.

BJCooperIT

Programmer
May 30, 2002
1,210
US
My client uses PSP's to create reports for their web applications on a Oracle 9ias server. They have an 8.1.6 database and use Forms [32 Bit] Version 6.0.8.22.1. Can a form use HOST (or some other built-in) to "run" a PSP report?

Right now they force the user to close the form, return to the web page, and then run a PSP report by clicking on a link. I would like to be able to run a report by clicking on a button in the form. Is this possible?

[sup]Beware of false knowledge; it is more dangerous than ignorance.[/sup][sup] ~George Bernard Shaw[/sup]
Systems Project Analyst/Custom Forms & PL/SQL - Oracle/Windows
 
Hi,
I have not worked with PSP but if you know what executable is used to run a PSP report then you may simply use Host command to run your report.

If you want that after executin command the focus should come back to form then make use of DDE.APP_BEGIN as if you use Host then the Focus will not comeback to form until you close the called application.

Here is an example where we have used DDE.APP_BEGIN to run a CSV report from Form.

Regards
Himanshu

Code:
Begin  
    AppID := DDE.App_Begin(L_BROWSER||' '||L_SERVER||'\ALSR6020_'||TO_CHAR(L_RUNDATE,'YYYYMMDDHH24MISS')||'_'||USER||'.CSV',DDE.App_Mode_Maximized);
         P_RUNCODE := 1;
/**L_BROWSER can be replaced with the name of Executable file, in our case excel.exe & L_BROWSER is the Location of CSV file**/
Exception
   WHEN DDE.DDE_APP_FAILURE	 then
    Message('E: Error while opening  Report.',NO_ACKNOWLEDGE);
   Raise Form_Trigger_failure;			   
end;
 
Hi,
One more thing.
If this deployed on WEb then I think you may make use of WEB.SHOW_DOCUMENT.

Regards
Himanshu
 
Thanks HimanB, I will investigate your suggestions.

[sup]Beware of false knowledge; it is more dangerous than ignorance.[/sup][sup] ~George Bernard Shaw[/sup]
Systems Project Analyst/Custom Forms & PL/SQL - Oracle/Windows
 
Hi,
You are Welcome BJCooperIT.
Here is some more input for you which I found at Metalink.

If the PSP page is converted into a stored procedure in the database,
it is possible to pass in the parameters through the CGI mechanism :
either the POST method or the GET method.
From the Doc : 117423.1 (An Introduction to LOADPSP and PL/SQL Server Pages ) :
----------------
With the POST method, the parameters
are passed directly from an HTML form and are not visible in the URL. With the
GET method, the parameters are passed in the query string of the URL, separated
by '&' characters, with most non-alphanumeric characters in encoded format
(such as %20 for a white space). You can use the GET method to call a PSP page
from an HTML form, or you can use a hardcoded HTML link to call the stored
procedure with a given set of parameters.
-----------------
Hope this helps.



 
Thanks again.

[sup]Beware of false knowledge; it is more dangerous than ignorance.[/sup][sup] ~George Bernard Shaw[/sup]
Systems Project Analyst/Custom Forms & PL/SQL - Oracle/Windows
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top