Jason Charette
|
| Posted: 06/19/2002, 6:13 AM |
|
Using PHP 4.1.2, Apache 1.3.20, Postgres 7.2 and MySQL 3.23.41 out of Redhat 7.1.
First, have used the query builder (Source type table), and Procedures
(Source type procedure) without any difficulty. I am trying to generate some
custom reports (using grids), and am having problems passing off either
form-based or URL-based variables. Example: trying to enter the following as
an SQL datasource:
select
a.column_a,
a.column_b,
b.column_a
from
table_a a inner join table_b b on a.column_c=b.column_c
where
b.column_c > 500
and b.column_d="user-supplied input or URL defined variable"
Now under the parameter window, I have tried several combinations of
options, and have failed to get it to work properly. I get anything from
"parse errors" to it simply not working at all.
At this point, I'm beginning to feel like a turnip. Any and all help
appreciated.
Jason
|
|
|
 |
Nicole
|
| Posted: 06/21/2002, 1:29 AM |
|
Jason,
you can try the following: select SQL Data Source type in dialog window and type custom sql like (note, that you should use curl braces for parameter name):
select
a.column_a,
a.column_b,
b.column_a
from
table_a a inner join table_b b on a.column_c=b.column_c
where
b.column_c > 500
and b.column_d="user-supplied input or URL defined variable"select
a.column_a,
a.column_b,
b.column_a
from
table_a a inner join table_b b on a.column_c=b.column_c
where
b.column_c > 500
and b.column_d={column_id}
then click on plus icon under Parameters section and new column_id parameter with the settings:
Name: column_id
Type: Integer (I suppose)
Parameter Source:
Name - the name of parameter passed through url, e.g. s_column_id
Type: URL
You can aslo specify Default value that will be used if no parameter was passed through URL.
Save the settings anc check resukts by clicking on Review Data.
|
|
|
 |
|