This is a migrated thread and some comments may be shown as answers.

How to pass the value of parameter of SQL

8 Answers 87 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kem Arda
Top achievements
Rank 1
Kem Arda asked on 25 Aug 2009, 11:44 AM
I need to pass  values to parameters (@date) there in SQL of DataSet of my Report. I tried following, however it threw exception that "object refrence not set to and instance of object"

Two parameter i added to  my report from Reports design > Properties > ReportParameters is  pCode1 and pCode2 , and i assing their values as follows:

(ReportViewerMizan.Report

as RaporMuhMizan).ReportParameters["pCode1"].Value = TextBoxHesapKodu1.Text;

 

(ReportViewerMizan.Report

as RaporMuhMizan).ReportParameters["pCode2"].Value = TextBoxHesapKodu2.Text;

 

 


No problem upto now, then after that in the following lines i assign values of parameter in SQL of DataSet of my Report(RaporMuhMizan) as follows:

(ReportViewerMizan.Report

as RaporMuhMizan).ReportParameters["pDate1"].Value = RadDatePickerDate1.SelectedDate;

 

(ReportViewerMizan.Report

as RaporMuhMizan).ReportParameters["pDate2"].Value = RadDatePickerDate2.SelectedDate;

and it throws the exception i mentiond above.

 

RaporMuhMizan is the dll of my reports calss library project.

So how can i handle this? Thanks...

 

 

8 Answers, 1 is accepted

Sort by
0
Accepted
Massimiliano Bassili
Top achievements
Rank 1
answered on 25 Aug 2009, 01:14 PM
0
Kem Arda
Top achievements
Rank 1
answered on 25 Aug 2009, 02:59 PM
When i click the link y ou posted, it says "Sorry, we couldn't find the page you're looking for."
Would you pls chech it out. Thanks...
0
Massimiliano Bassili
Top achievements
Rank 1
answered on 25 Aug 2009, 04:27 PM
The link opens fine on my end and is also available in the KB section. You can orientate by its name ..
0
Kem Arda
Top achievements
Rank 1
answered on 26 Aug 2009, 07:12 AM
What is KB section?  Is it knowledge base?
0
Massimiliano Bassili
Top achievements
Rank 1
answered on 26 Aug 2009, 07:30 AM
Yes Kem, KB stands for Knowledge base - http://www.telerik.com/support/kb/reporting/general.aspx
0
Kem Arda
Top achievements
Rank 1
answered on 26 Aug 2009, 09:36 AM
Thanks...
0
AkAlan
Top achievements
Rank 2
answered on 26 Aug 2009, 03:51 PM

Take a look here at  My solution. It works pretty good for me using Session Variables.
0
Kem Arda
Top achievements
Rank 1
answered on 28 Aug 2009, 02:22 PM
I will...
Tags
General Discussions
Asked by
Kem Arda
Top achievements
Rank 1
Answers by
Massimiliano Bassili
Top achievements
Rank 1
Kem Arda
Top achievements
Rank 1
AkAlan
Top achievements
Rank 2
Share this question
or