sweet_babylhyn
September 22nd, 2006, 10:57 PM
Need help for the passing of parameter in CR9.
How to pass the "record_id" from main report to the sql command of subreport. To clarify, i add a sql command in database expert in fmy subreport. This is my query.....
For the main report..
Select record_id, distributor_name.... from distributor
In the sql command of my subreport.....
Select record_id, distributor_name, customer_id, sum(sales) as amount where record_id =2 group by record_id, distributor_name, customer_id
order by amount desc limit 20.
All i want to do is how to pass the record_id from the main report into the sql command of my subreport to look like this.....
Select record_id, distributor_name, customer_id, sum(sales) as amount where record_id =("record_id from main_report") group by record_id, distributor_name, customer_id
order by amount desc limit 20.
My goal is how to view the top 20 accounts per distributor
Thanx a lot!!!
How to pass the "record_id" from main report to the sql command of subreport. To clarify, i add a sql command in database expert in fmy subreport. This is my query.....
For the main report..
Select record_id, distributor_name.... from distributor
In the sql command of my subreport.....
Select record_id, distributor_name, customer_id, sum(sales) as amount where record_id =2 group by record_id, distributor_name, customer_id
order by amount desc limit 20.
All i want to do is how to pass the record_id from the main report into the sql command of my subreport to look like this.....
Select record_id, distributor_name, customer_id, sum(sales) as amount where record_id =("record_id from main_report") group by record_id, distributor_name, customer_id
order by amount desc limit 20.
My goal is how to view the top 20 accounts per distributor
Thanx a lot!!!