Home » Developer & Programmer » Reports & Discoverer » 6i to 10g report button code conversion (Oracle 10g DS on Windows XP)
6i to 10g report button code conversion [message #550189] Fri, 06 April 2012 13:47 Go to next message
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 Go to previous messageGo to next message
Littlefoot
Messages: 19508
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!
Re: 6i to 10g report button code conversion [message #572076 is a reply to message #550216] Wed, 05 December 2012 21:45 Go to previous messageGo to next message
lb2mt
Messages: 6
Registered: April 2012
Location: USA
Junior Member
I apologize. I don't think I ever responded with a thank you. my "posting" etiquette is lacking. The person who really wanted this information ended up developing a form. the user selects a checkbox for each records they want to print a report for. Information linking the row is stored in a details table and the report module was modified to call the details table. I believe there is a call to modify each record in the table as processed after each report is generated.

I appreciate your willingness to assist me. Smile
Re: 6i to 10g report button code conversion [message #572091 is a reply to message #572076] Thu, 06 December 2012 01:13 Go to previous message
Littlefoot
Messages: 19508
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
No problem; until now, you were just "one of many" who never post any feedback, so - I'm used to it. Anyway: thank you for coming back and letting us know what happened.
Previous Topic: Data to be taken in different format
Next Topic: migaration of oracle reports 11g in unix
Goto Forum:
  


Current Time: Wed Aug 27 12:51:27 CDT 2014

Total time taken to generate the page: 0.09019 seconds