6i to 10g report button code conversion [message #550189] |
Fri, 06 April 2012 13:47 |
|
lb2mt
Messages: 6 Registered: April 2012 Location: USA
|
Junior Member |
|
|
We are converting Oracle 6i reports to 10g. I have a report with a button on it that when clicked, it runs PL/SQL code in a program unit defined within the report.
The only documentation I have run across says to replace buttons with a hyperlink but this seems to refer to when a report calls another report. This is not the case for this situation.
The button on the report came into 10g as a Text Item. I tried applying the following documentation to the hyperlink property:
"Example 5: Static hyperlink The following example shows a value for the Hyperlink property that specifies a link to a destination identified as LINK1: #LINK1"
The program unit is named: U_UPDATEBUTTONBUTTONACTION and I referenced it as #U_UPDATEBUTTONBUTTONACTION in the hyperlink property.
The open browser window is not what I need. Any advice on how to invoke a user-interactive action from a report would be greatly appreciated.
thank you
|
|
|
Re: 6i to 10g report button code conversion [message #550216 is a reply to message #550189] |
Sat, 07 April 2012 01:46 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
I wouldn't know how to do that, sorry.
However, maybe you could use the following workaround: if users know - before even running the report - that they will want to push that button, you could create another report parameter (let's call it PAR_PUSH_BUTTON; possible values are Y and N). Then, in After Parameter Form trigger, depending on parameter's value, run that code or not:
if :par_push_button = 'Y' then
prc_my_plsql_stored_procedure; -- or whatever it is
end if;
Another idea, which might not be useful at all (but, reading these forums, I learnt that I'd rather not say "it is impossible" based on my current knowledge, as other people proved me wrong): I'm not good at JavaScripting, but it might be possible to call an Oracle stored procedure from JavaScript (for example, see this OTN Forums discussion; I'm sure you can find some more).
So: you'd convert a 6i button into a hyperlink, as suggested. Hyperlink would open another page, which would run a JavaScript, which would call a stored procedure. There are these JavaScript events, and "onLoad" might be used here. The problem is - you'd have another page opened in a browser, which you probably don't want. Can it be closed programatically? No idea, but I hope it can.
Sorry for not being very useful. Best of luck!
|
|
|
|
|