Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query with dynamic input values

Status
Not open for further replies.

saran26

Programmer
May 20, 2008
173
US
Hi All,

When I execute my report, a query will run request the input values from the user, based on the input values it will display the values in the report.

Example :-

It will ask for a date range if you provide the date range it displays records falls under the date range.

There is a field in the Database called DTEntered which i am using with a between clause.

My requirement is to display the date range given to the query in the report, Is it possible ? If I just display the field DTEntered , it is displaying the last record date on which it is submitted not the range which i provided .

Please help me with that.

Thanks
Saran
 
You mean the query which I use

Here it is

select distinct T1.dbid,T1.id,T1.headline_2,T1.cqproject,T7.login_name,T2.name,T11.login_name,T1.severity,T1.application_1,T1.dtentered from defect T1,users T7,statedef T2,users T11 where T1.owner = T7.dbid and T1.state = T2.id and T1.enteredby = T11.dbid and (T1.dbid <> 0 and ((T1.cqproject = 'CMDX' and T1.dtentered between {ts '2009-01-01 06:00:00'} and {ts '2009-01-29 05:59:59'} and T2.name in ('Closed-Resolved','Open'))))


Let me know if you need more details

Thanks
Saran
 
you want to use parameters,, you do not want them to be dynamic,,, but static. Then you can go thru the selection expert,, and specify the relation of the parameter to the file date. Or you can also do it thru entering a command,, ie sql statement,, you can create "parameters", there,, and by modify your sql statement,, do it all on the server, rather than thru crystal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top