I have problem get sum total in Year

Posted by Nuwan under ASP.NET on 3/28/2012 | Points: 10 | Views : 806 | Status : [Member] | Replies : 2
Dear All,

I have sql table, it have contract,amount,date like field.
I create a asp.net web page with gridview bind a data in that sql table.
if i select some month i can show data in gridview.

now i want to get a bought forward balance in a variable.

our financial year is a 01/April. if I select date is Mar/2012 i want to get a total amount in sql table in 01/April/2011 to 29/Feb/2012.
How i do it...

Please help me.......

Rathnayake


Responses

Posted by: Sksamantaray on: 3/28/2012 [Member] Silver | Points: 25

Up
0
Down

In your stored procedure evaluate the period taking the the input year and month
suppose input year is 2012 and monthno<4 then set start date to 01-apr-2011 and enddate to 31-mar-2012

Then return the resultset and then bind it to gridview

Thanks,
Sanjay

Nuwan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nuwan on: 3/28/2012 [Member] Starter | Points: 25

Up
0
Down
Dear,
thanks for answer. but i want to select different month and year, like 02/2012, 01/2012, 12/2011.

Rathnayake

Nuwan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response