S
SwEdIsH_OfFiCe_UsEr
I have selected a query for my report, and the query asks for the parameters
before presenting data. The query itself works fine and returns all values I
want, but when I run it through the report and want it to present it in a
printable way, some of the data is missing. When I leave some of the
parameters blank (which makes it search for all values), it doesn't add that
information in the report, except for date which is always shown. But if I
search with that parameter, it is shown. This has really gotten me confused,
and I don't know why it is doing this. What is wrong?
Query SQL:
PARAMETERS [startDate] DateTime, [endDate] DateTime, [param1] Text ( 255 ),
[param2] Text ( 255 );
SELECT table1.field1, table1.dateField, table1.field2, table1.field3,
table1.field4
FROM table1.
WHERE (((table1.dateField) Between Nz([startDate],#1/1/1900#) And
Nz([endDate],#1/1/2100#)) AND ((table1.field1) Is Null Or (table1.field1)
Like "*" & [param1] & "*") AND ((table1.field2) Is Null Or (table1.field2)
Like "*" & [param2] & "*"));
before presenting data. The query itself works fine and returns all values I
want, but when I run it through the report and want it to present it in a
printable way, some of the data is missing. When I leave some of the
parameters blank (which makes it search for all values), it doesn't add that
information in the report, except for date which is always shown. But if I
search with that parameter, it is shown. This has really gotten me confused,
and I don't know why it is doing this. What is wrong?
Query SQL:
PARAMETERS [startDate] DateTime, [endDate] DateTime, [param1] Text ( 255 ),
[param2] Text ( 255 );
SELECT table1.field1, table1.dateField, table1.field2, table1.field3,
table1.field4
FROM table1.
WHERE (((table1.dateField) Between Nz([startDate],#1/1/1900#) And
Nz([endDate],#1/1/2100#)) AND ((table1.field1) Is Null Or (table1.field1)
Like "*" & [param1] & "*") AND ((table1.field2) Is Null Or (table1.field2)
Like "*" & [param2] & "*"));