AutoSearch X Grouping
Hi
1.How do it in end-user report?
select * from xxtable
where not exists (select 1 from xxtable2 where xxtable2.id=xxtable.id)
and <<-- fixed
date_create between '01/01/2006' and '30/01/2006' <--- that
values show in autosearch panel
2. If I put 2 subqueryes in select, other fields goto group by
select idcustomer, date_create, name, phone,
(select count(*) from sales where
sales.idcustomer=customer.idcustomer) as count_sales,
(select sum(Total_Value) from sales where
sales.idcustomer=customer.idcustomer) as total_sales
from customer
that is SQL, but RB show
select idcustomer, date_create, name, phone,
(select count(*) from sales where
sales.idcustomer=customer.idcustomer) as count_sales,
(select sum(Total_Value) from sales where
sales.idcustomer=customer.idcustomer) as total_sales
from customer
group by idcustomer, date_create, name, phone
I?m using FireBird, and get thar message: "Invalid expression in the select
list (not conteined in either an aggregate funcion or the GROUP BY clause."
Delphi 7, FireBird 1.5, RB 10.02
Maikel Budny
1.How do it in end-user report?
select * from xxtable
where not exists (select 1 from xxtable2 where xxtable2.id=xxtable.id)
and <<-- fixed
date_create between '01/01/2006' and '30/01/2006' <--- that
values show in autosearch panel
2. If I put 2 subqueryes in select, other fields goto group by
select idcustomer, date_create, name, phone,
(select count(*) from sales where
sales.idcustomer=customer.idcustomer) as count_sales,
(select sum(Total_Value) from sales where
sales.idcustomer=customer.idcustomer) as total_sales
from customer
that is SQL, but RB show
select idcustomer, date_create, name, phone,
(select count(*) from sales where
sales.idcustomer=customer.idcustomer) as count_sales,
(select sum(Total_Value) from sales where
sales.idcustomer=customer.idcustomer) as total_sales
from customer
group by idcustomer, date_create, name, phone
I?m using FireBird, and get thar message: "Invalid expression in the select
list (not conteined in either an aggregate funcion or the GROUP BY clause."
Delphi 7, FireBird 1.5, RB 10.02
Maikel Budny
This discussion has been closed.
Comments
1. When creating each search condition, you can define which ones you would
like to include as an Autosearch field by selecting the Autosearch checkbox.
2. In my testing with Interbase and IBX, I was able to successfully create
a sub query in the select statement similar to the one you made and did not
receive an error. Are you adding the fields to the group clause manually or
is RB doing this?
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
OK, but how I make a autosearch expression "where exists (select
1......)"? Don´t have an operator "Expression" or similar.
RB is adding fields to group and I not can remote that. When I add one
subquery, it´s work. But two or more, it´s not work.
I´m send a print+screen to e-mail support@digital-metaphors.com (A/C Nico)
Thank´s
Maikel