Open your report in Object navigator mode (press F3). Select the "User Parameters" under Data Model. Create a new user parameter and change the data type as u required.
In your select statement use that variable as follows. Use the ":" before the parameter name. you can pass the parameter from forms are reports depending upon your requirement.
Select * from TableName where fieldName = :UserParameter
Regards
Krishna Reddy M
mckreddy@visualsoft-tech.com
i've used this way to pass the parameters to report at start up (from the parameter form).
but i'm wondering about how would i have the current cursor location (field value) from the form , then pass it to the report and then the report to be restricted to that value.
plz let me know the whole procedure as i'm new to oracle.
it would b a great help to me.
many many thanks for ur response
Hi tyb,
Following is the code we will using in Oracle forms to call the report and pass the parameters to report.
This code is written in the form wile calling Oracle Reports.
-------------------------------
Declare
CLIENT_PARAM_LIST PARAMLIST;
lv_vcVariableName VarChar2(50);
Begin
lv_vcVariableName := 'Value to be passed to reports';
CLIENT_PARAM_LIST := CREATE_PARAMETER_LIST('LISTFILETAB');
First we will create PARAMLIST, which holds all the parameters to be passed to the report. check the "Add_Parameter" syntax. Use the "Add_Parameter" statement to pass more varibales to the report
We will get all the values to be passed to the form into local variables.
Create the Paramlist
Add the Userparameters/system parameters values to the paramlist. The link between forms and reports are established here.
What ever the 'UserParameterName' in forms is mapped to the reports 'UserParameterName' name. The link is established in the next statement "Run_Product". If you want to mention any system parameters value, you can pass in the same manner.
So the values from form to reports are passed now successfully.
In the reports if you want to use these parameters in the sql statements, just use ":" in front of the 'UserParameterName'. When ever the sql statement is executed the 'UserParameterName' is replaced with the value you passed.
Regards
Krishna Reddy M
mckreddy@visualsoft-tech.com
its working very well, u've given me a great favor.
i've another problem that instead of passing this value directly to the report and run it , the value gets passed to the parameter form and then i've to press enter key to run report. is there a way that i can run it directly.
2ndly i want the reports to be started in maximized window.
Open the Report. In the reports menu, select Tools --> Prarameter Form Builder.
DeSelect the parameters which does not need to display before report running. Press "Ok". A warnning message displays, Press "Yes" to replace the existing Parameter form.
Select the remanining labels ("Report Parameters"...)and delete them. Now your Parameter form looks like empty new form.
Run the report. It will display the report output with out displaying parameter form.
Regards
Krishna Reddy M
mckreddy@visualsoft-tech.com
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.