genertaing report through forms [message #125684] |
Tue, 28 June 2005 11:42 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
kcoreyl
Messages: 8 Registered: June 2005
|
Junior Member |
|
|
Hi everyone,
I am trying to generate reports through Oracle Forms. I have already devloped the reports. Basically, what i want to do is have the user select a report from a list box and, when they select it, click the push button to run the report. I have already defined the list by manually typing in the names of the reports using the "Elements in List" property. I just need to know how to pass the List Item Value assoicated with the name of the report i typed in to the push button in order for the user to generate the selected report.
Kendric
|
|
|
|
Re: genertaing report through forms [message #126654 is a reply to message #125684] |
Wed, 06 July 2005 02:27 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
kv_anitha
Messages: 3 Registered: July 2005 Location: Bangalore
|
Junior Member |
|
|
Hi,
say u have 3 reports R1,R2 and R3 in the listbox.
Declare a variable X.
On change of listbox or on selection of report move some id to the variable.
eg. if u select report R1 then move value to X as R1.
similarly for report R2, value of X=R2.
On pushbutton, when button pressed
if x=R1 then
run_report(call the report R1)
else
run_report(call the report R2)
end if;
Pls try the above and let me know. Hope this is what u need.
All the best.
Regards
Ani
|
|
|
Re: genertaing report through forms [message #127979 is a reply to message #126654] |
Thu, 14 July 2005 08:05 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
kcoreyl
Messages: 8 Registered: June 2005
|
Junior Member |
|
|
Hey, a couple of questions...
1) Do I declare the X variable in the WHEN-LIST-CHANGED or the WHEN-BUTTON-PRESSED.
2) How would I call the List Item Value of R1 (the value associated with the name in my listbox) in my push button or in the WHEN-LIST-CHANGED. I understand moving R1, R2, or R3 into some declared variable, but how do you call R1?
|
|
|
Re: genertaing report through forms [message #128069 is a reply to message #127979] |
Thu, 14 July 2005 18:00 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Another Arbitrary Name
Messages: 23 Registered: July 2005
|
Junior Member |
|
|
It looks like you have already done the hard bit and created the dynamic List items (although I would put the data into a database table where its more maintainable!).
place the code on either:
WHEN_BUTTON_PRESSED for your button
WHEN_LIST_CHANGED for an automatic selection
but the only code you need is:
MESSAGE(:r1); --check its what you think it is first.
RUN_REPORT(:R1); --please check syntax.
This will pass the value of the LISTITEM to the RUN_PRODUCT builtin.
|
|
|
|
Re: genertaing report through forms [message #128190 is a reply to message #128085] |
Fri, 15 July 2005 11:01 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Another Arbitrary Name
Messages: 23 Registered: July 2005
|
Junior Member |
|
|
kv_anitha wrote on Thu, 14 July 2005 23:03 | Hi u need to declare a global variable and use it accross the when button clicked and when list changed trigger.
regards
Ani
|
You could, but the list item (should) already hold the value that you would place in the Global, I would just use that.
or am I missing something? (I haven't used client-server for a while)
:listitem
List item label#1: "REPORT 1"
List item value#1: "rep1.rdf"
List item label#2: "REPORT 2"
List item value#2: "rep2.rdf"
WHEN_ITEM_CHANGED:
RUN_REPORT(:listitem); --:listitem = "repX.rdf"
|
|
|
Re: genertaing report through forms [message #128193 is a reply to message #128190] |
Fri, 15 July 2005 11:15 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
kcoreyl
Messages: 8 Registered: June 2005
|
Junior Member |
|
|
ok, so i kinda got things going. for the WHEN-LIST-CHANGED, i have it to where a message comes up telling me the value of the report i'm highlighting in my list box. and for WHEN-BUTTON-PRESSED, i have:
IF :LIST = 'R1' (the value of the list element) THEN
report_id := find_report_object('REPORT13');
ReportServerJob := run_report_object(report_id);
But now I'm having ANOTHER issue (i swear if it's not one thing, it's another). I found out that RUN_PRODUCT is not supported by Forms 10g, so i had to figure out how to use RUN_REPORT_OBJECT. But this is generating an error:
FRM-92101: There was a failure in the Forms Server during startup. This could happen due to invalid configuration...
Anyone have a lead as to what I could be doing wrong? I appreciate your help thus far =)
|
|
|
|
|
|