Picking up Variables in SQL Text?
I have a frxDBXQuery object with SQL text in it. I want to pass the contents of a variable I've created to it (this contains a date).
The variable can be used else where without any problem but when running the report it says the variable doesn't have a value.
I'm using the syntax:
...
COUNT(CASE WHEN DateOpened >= :StartDate THEN 1 END)
...
The variable is set in Delphi with:
frxReport1.Variables := StartDate;
Is this wrong or is it not possible to pass variables in this way?
If not I guess you'd have to set the SQL string in code somewhere. Perhaps when the report starts?
Thanks for any help...
Mark
The variable can be used else where without any problem but when running the report it says the variable doesn't have a value.
I'm using the syntax:
...
COUNT(CASE WHEN DateOpened >= :StartDate THEN 1 END)
...
The variable is set in Delphi with:
frxReport1.Variables := StartDate;
Is this wrong or is it not possible to pass variables in this way?
If not I guess you'd have to set the SQL string in code somewhere. Perhaps when the report starts?
Thanks for any help...
Mark
Comments
I didn't spot that in the manual (I'm using the Studio V3 manuals at present) but it was under my nose all along!
Mark