This topic is locked
[SOLVED]

  user input of a startDate and an endDate in aspRunner 6.

10/27/2011 6:44:37 PM
ASPRunnerPro General questions
T
thj author

I have a simple SQL query which works fine in aspRunner
SELECT LocationID, poCust, SKU, SUM(qty) as QTY

from zPo

GROUP BY LocationID, poCust, SKU

ORDER BY LocationID, poCust, SKU
based on this table
CREATE TABLE [dbo].[nameOfTable](

[LocationID] [int] NOT NULL,

[poReceiptID] [int] NOT NULL,

[poDate] [smalldatetime] NOT NULL,

[poCust] varchar NOT NULL,

[SKU] varchar NOT NULL,

[Qty] [numeric](10, 2) NOT NULL

) ON [PRIMARY]
Now the user want to be able to query within a date range, say between 2011-05-01 and 2011-05-15.
In SQL I could write it like this:
DECLARE @DateFrom date, @DateTo date

set @dateFrom = '2011-05-01'

set @dateTo = '2011-05-15'

SELECT LocationID, poCust, SKU, SUM(qty) as QTY

from nameOfTable

WHERE podate >= @dateFrom and podate <= @dateTo

GROUP BY LocationID, poCust, SKU

ORDER BY LocationID, poCust, SKU
Any suggestions how to make aspRunner to "prompt" the user to input dateFrom and dateTo so it is used in the query above - preferbly in the Advanced Search Page.
A thanks in advance from my users who will really be grateful for your help.

Sergey Kornilov admin 10/28/2011

I'm not sure what you mean "prompt user" in this context. If you point user to advanced search page first they will be able to enter dates.
Check this article just in case:

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

It applies to both ASPRunnerPro and PHPRunner.

T
thj author 10/28/2011



I'm not sure what you mean "prompt user" in this context. If you point user to advanced search page first they will be able to enter dates.
Check this article just in case:

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

It applies to both ASPRunnerPro and PHPRunner.

T
thj author 10/28/2011

Thanks - let me clarify:
Here's the query I want to enter into aspRunners SQL tab:
SELECT LocationID, poCust, SKU, SUM(qty) as QTY

FROM nameOfTable

WHERE podate >= @dateFromand podate <= @dateTo

GROUP BY LocationID, poCust, SKU

ORDER BY LocationID, poCust, SKU
which produces a result SUM(qty) per the GROUP BY statement for a date interval.
My problem is how to program aspRunner so the user can enter (input) @dateFromand @dateTo.

Sergey Kornilov admin 10/28/2011

If you have a valid support contract post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.
We'll see how we can help.

T
thj author 10/28/2011