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!

Global Variables Reports 6i

Status
Not open for further replies.

AlexGov

MIS
Nov 11, 2005
2
GB
Hi

I am fairly new to Oracle in general, so please forgive me if this is an easy one.

I have a bunch of global variables that are defined and updated by various forms in the application.

I would like to use these global variable as parameters in reports, but form globals are not accessible from reports.

Do I have to initiate the report with a form and pass the value?? If so what is the best way to do this?

Hope you can help.

Thanks

Alex
 
In the report you need to define user parameters of appropriate type and size, and then pass the variable as parameters when calling the report.
 
Nagornyi is correct. Here is a sample from loosely taken forms help:
Code:
DECLARE
  /* Variable to store the parameter List ID */ 
  List_id ParamList;
BEGIN
  -- Create a parameter List named "input_params"

  List_id := Create_Parameter_List('input_params'); 

  --Add two parameters to the List to pass values for each
  --user-defined parameters defined in the target form;
  --for each ** parameter, specify its key, type
  --(text or data), and value

  Add_Parameter(List_id,'CITY',TEXT_PARAMETER,'BOGOTA');
  Add_Parameter(List_id,'CATEGORY',TEXT_PARAMETER,'EXPORTS');  

  --Now call the form, referencing the parameter List ID
  --in the last argument to the CALL_FORM procedure
  Open_Form('trade',ACTIVATE,NO_SESSION,List_id);
END;
You will need to modify the last bit to call your report instead.

[sup]Beware of false knowledge; it is more dangerous than ignorance.[/sup][sup] ~George Bernard Shaw[/sup]
Consultant Developer/Analyst Oracle, Forms, Reports & PL/SQL (Windows)
My website: Emu Products Plus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top