This topic is locked

Reports/Charts

9/27/2012 9:00:53 AM
ASPRunnerPro General questions
H
hsan author

How can I construct Chart (or report) so user can chose "between dates" (the time period) for the final result? For now, i have set date range in the query, but I would like the user to select it.
Help greatly appreciated.
Nash

Sergey Kornilov admin 9/27/2012

Nash,
point user to advanced search page to let them choose the date range. You can do the same using the search panel.
This article can provide some additional advice:

http://www.asprunner.com/forums/topic/17530-automatically-search-between-dates-on-advanced-search-page/

H
hsan author 9/28/2012

Well I do not have dates field available. This is my query for the chart/report:
SELECT TOP(15)

CustDesc,

SUM(InvoiceTotal) AS TotalInv,

SUM(AmtPaidSoFar) AS PaidSoFar

FROM dbo.Billing

WHERE (InvDate BETWEEN '2012-01-01' AND '2012-07-01')

GROUP BY CustDesc

ORDER BY TotalInv DESC
How can I, at runtime, assign values to "between" and "and" to user's choice?
Thanks for help,

Nash

Sergey Kornilov admin 10/2/2012

Nash,
what you saying doesn't make much sense. According to your query you do have date field available and field name is InvDate.