F
Frustrated in AL
With much help, I have set up the parameters to select a date range for my
query. Now I need the date range to appear on the query and subsequent
reports.
In the Expression Builder, if I click the Show box, I get an error: You
tried to execute a query that does not include the specified expression 'Date
Worked On' as part of an aggregate function. If I am reading that correctly,
this is the only place that I am using this field in my query, so it would
not be part of an aggregate function.
Here is the SQL that I am working with. I thank you in advance for all of
your assistance.
PARAMETERS [Enter Start Date] DateTime, [Enter End Date] DateTime;
SELECT Count([Resolved by Hospice Date Worked]!Responsibility) AS [Total
Appeals], Sum([Resolved by hospice Date Worked]![Sales Amount]) AS [Total
Appealed Money], Sum([Resolved by hospice Date Worked]![Credit Amount]) AS
[Total Credits to Hospice], Sum([Resolved by hospice Date Worked]![Pharmacy
Credit]) AS [Total Pharmacy Credits], Sum([Sales Amount])-[Total Pharmacy
Credits]-[Total Credits to Hospice] AS [Total Non-Credits]
FROM [Resolved by hospice Date Worked]
WHERE ((([Resolved by hospice Date Worked].[Date Worked on]) Between [Enter
Start Date] And [Enter End Date]));
query. Now I need the date range to appear on the query and subsequent
reports.
In the Expression Builder, if I click the Show box, I get an error: You
tried to execute a query that does not include the specified expression 'Date
Worked On' as part of an aggregate function. If I am reading that correctly,
this is the only place that I am using this field in my query, so it would
not be part of an aggregate function.
Here is the SQL that I am working with. I thank you in advance for all of
your assistance.
PARAMETERS [Enter Start Date] DateTime, [Enter End Date] DateTime;
SELECT Count([Resolved by Hospice Date Worked]!Responsibility) AS [Total
Appeals], Sum([Resolved by hospice Date Worked]![Sales Amount]) AS [Total
Appealed Money], Sum([Resolved by hospice Date Worked]![Credit Amount]) AS
[Total Credits to Hospice], Sum([Resolved by hospice Date Worked]![Pharmacy
Credit]) AS [Total Pharmacy Credits], Sum([Sales Amount])-[Total Pharmacy
Credits]-[Total Credits to Hospice] AS [Total Non-Credits]
FROM [Resolved by hospice Date Worked]
WHERE ((([Resolved by hospice Date Worked].[Date Worked on]) Between [Enter
Start Date] And [Enter End Date]));