Click here to Skip to main content
15,893,508 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a form in C# where user inputs @Receivername, @StartDate and @ Enddate.
Now i have this stored procedure to run my reportviewer.

SQL
create proc GenerateInvoice
@StartDate date ,
@EndDate date ,
@ReceiverName varchar(30) 

AS

SELECT         Waybills.SenderName, Waybills.SenderAddress, Waybills.SenderContact, Waybills.ReceiverName, Waybills.ReceiverAddress, 
                         Waybills.ReceiverContact, Waybills.UnitDescription, Waybills.UnitWeight, Waybills.DateReceived, Waybills.Payee, 
                          Payments.Amount, Payments.PaymentDate, Cycle.CycleNumber, Cycle.StartDate, Cycle.EndDate
FROM            Waybills CROSS JOIN
                         Payments CROSS JOIN
                         Cycle
WHERE Waybills.ReceiverName = @ReceiverName
AND (Waybills.DateReceived BETWEEN (@StartDate) AND (@EndDate))
GO


How to i link this sp to my reportviewer

My 3 textboxes is already linked to my parameter in my form like this:

this.WaybillsTableAdapter.Fill(this.DataSet1.Waybills, textBox1.Text, textBox3.Text, textBox4.Text)

What am i missing to link
Posted
Updated 16-Sep-12 2:23am
v4

1 solution

 
Share this answer
 
Comments
Maciej Los 16-Sep-12 12:06pm    
YES! +5
Sandeep Mewara 16-Sep-12 13:46pm    
Thanks! :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900