Home » Developer & Programmer » Forms » How to pass parameter from critaria form to report (oralce 8i, 6i forms,Windows XP professional 2000 service pack 3)
How to pass parameter from critaria form to report [message #536433] Wed, 21 December 2011 00:29 Go to next message
zahidbutt
Messages: 13
Registered: January 2011
Location: Lahore
Junior Member
Dear Experts,

I have a customer table with following columns.

1 - Cust_ID
2 - Cust_nam
3 - Cntry_id

I have another table country.

1 - Cntry_id
2 - Cntry_nam
3 - Region

Now I want to view report for all customers of a certain region selected by user in criteria form.

How can I do this?

Thanks
Re: How to pass parameter from critaria form to report [message #536474 is a reply to message #536433] Wed, 21 December 2011 01:40 Go to previous message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
One option is to create a report whose WHERE clause is a lexical parameter, such as
select <column list>
from customer c,
     country t
where t.cntry_id = c.cntry_id
&lex_where

In a form, you'd need to - through several lists of values - create (concatenation) the rest of the report's WHERE clause. It would look like
and c.cust_nam = 'MIKE' and t.region = 'ADRIATIC'
. You'd pass that clause into the report. Report's After Parameter Form trigger would set
lex_where := :form_where_clause;

Executing a report would, if you're lucky, display a desired result.
Previous Topic: Batch creation at 10 records [merged by jd]
Next Topic: Form [32 Bit] Version 10.1.2.0.2 crashed with windows server 2008 64bit
Goto Forum:
  


Current Time: Wed Jul 10 00:33:13 CDT 2024