How to pass the value of parameter of SQL

9 posts, 1 answers
  1. Kem Arda
    Kem Arda avatar
    49 posts
    Member since:
    Jul 2009

    Posted 25 Aug 2009 Link to this post

    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...

     

     

  2. Answer
    Massimiliano Bassili
    Massimiliano Bassili avatar
    323 posts
    Member since:
    May 2006
  3. DevCraft banner
  4. Kem Arda
    Kem Arda avatar
    49 posts
    Member since:
    Jul 2009

    Posted 25 Aug 2009 Link to this post

    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...
  5. Massimiliano Bassili
    Massimiliano Bassili avatar
    323 posts
    Member since:
    May 2006

    Posted 25 Aug 2009 Link to this post

    The link opens fine on my end and is also available in the KB section. You can orientate by its name ..
  6. Kem Arda
    Kem Arda avatar
    49 posts
    Member since:
    Jul 2009

    Posted 26 Aug 2009 Link to this post

    What is KB section?  Is it knowledge base?
  7. Massimiliano Bassili
    Massimiliano Bassili avatar
    323 posts
    Member since:
    May 2006

    Posted 26 Aug 2009 Link to this post

    Yes Kem, KB stands for Knowledge base - http://www.telerik.com/support/kb/reporting/general.aspx
  8. Kem Arda
    Kem Arda avatar
    49 posts
    Member since:
    Jul 2009

    Posted 26 Aug 2009 Link to this post

    Thanks...
  9. AkAlan
    AkAlan avatar
    121 posts
    Member since:
    Jun 2009

    Posted 26 Aug 2009 Link to this post


    Take a look here at  My solution. It works pretty good for me using Session Variables.
  10. Kem Arda
    Kem Arda avatar
    49 posts
    Member since:
    Jul 2009

    Posted 28 Aug 2009 Link to this post

    I will...
Back to Top
DevCraft banner