report parameter

To discuss Oracle Forms & Reports related technical issues.
Post Reply
AIMAM
Posts: 139
Joined: Thu May 17, 2007 6:04 am
Location: Egypt

report parameter

Post by AIMAM »

Hello,

I have created an independent value set "TESTING" that contains a list of values, which i have added, for the descriptive flexfield "Transaction history" in the "miscelleneous issue" form in the invetory module.
I have attached the value set "TESTING" to the column "Attribute 1" in the table "mtl_material_transactions".
I have also created a report that select "Attribute 1" Column from "mtl_material_transactions".

Now, I need to create a parmeter that allows the user to enter one of the values of the value set "TESTING" and if the parameter left blank it will result in all the records of the original query.
Kindly note that in all the historical rows "Attribute 1" column is NULL.


What do I have to add in the query, report builder, and applications?

Please help...
Pirzada
Posts: 30
Joined: Fri Dec 07, 2007 2:04 am
Location: Pakistan

Post by Pirzada »

Dear Aimam,
You need to add the same value set 'TESTING' in report parameters where you define the report.
For quering all results if the parameter is left blank add this in your report's where clause
WHERE ATTRIBUTE1 = NVL(:P_ATT1, ATTRIBUTE1)
AIMAM
Posts: 139
Joined: Thu May 17, 2007 6:04 am
Location: Egypt

Post by AIMAM »

hello,

I 've tried that clause and it does not give me the records were attribute 1 is null,.
what can i do so the user will get all the records, even where attribute 1 was null, when he does not enter a value for the parameter???
Pirzada
Posts: 30
Joined: Fri Dec 07, 2007 2:04 am
Location: Pakistan

Post by Pirzada »

Hey,
Try this
WHERE NVL(ATTRIBUTE1,0) = nvl(nvl(:P_ATT1,ATTRIBUTE1),0)
Hope this solves your problem

Regards
Ali Pirzada
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests