Reporting Services 2005 101 with a Smart Client

  • Comments posted to this topic are about the content posted at temp

  • Simple and easy to understand language used... 

    Good article

  • Am I missing something (like it wasn't meant to be perhaps), or has this not actually got anything to do with report server? I initially saw reporting services 2005 and read it as report server 2005, but this appears to be about the report designer built into VS2005, which is not connected at all with the SQL Server application.

    Not meant as a criticism, just wondering if I've got the wrong end of the stick


  • Vasant,


    I am glad that you found the language of article easy.  Trust me it is much more challenging to address beginner audience compare to pros.




    Yes, you are right.  This article is not addressing “server-side” of reporting services.  With introduction of VS 2005, Microsoft has empowered developers to design and host reporting services as “client-side” or local.  Perhaps report extension .rdlc (c-client?) says it all; on sever-side we continue to have the extension as .rdl.


    Please feel free to get in touch, if I can be any help further at:




  • I found this article interesting and so I thought I would give it a go.  After working through some connnection and data population issues I have found something I can't seem to get past....I get all the way to the point where the report is going to render and I get the following message where the report should be showing...."A data source instance has not been supplied for the data source".  If you have any ideas about what I have done wrong I would love to know because it is bugging me that I can't seem to get something that appears so straghtforward to work.  I found several refrences to this on the web but none seemed to help....



  • Hi Judie,


    Looks like you are having difficulty binding your dataset with the report.  Makes sure you have following code done properly:


    //prepare report data source

    ReportDataSource rds = new ReportDataSource();

    rds.Name = "dsProduct_dtProductList";

    rds.Value = dsReport.Tables[0];



    Make sure the rds.Name property reflect the exact name of your dataset_datatable.


    If you don’t mind, you can always send me your code; I can help you debug it.  My email:





  • Asif
    first thank you very much for the nice useful article.
    i've one question,you said in ur article that 
    When new report is added to project, by default, all you will see in report designer is the body section. Right click on report designer surface anywhere other then body and select Page Header.
    but if i right click i dont get any option for "page header" !! why ?
    btw am using VS2005 standard edition.
  • Hi..

    Thank you very much for your tutorial. it is very clear ..

    But to me.. I am quite new to C#. so I cant get that part.

    What I did, i just copied your code to my Form1_load event. Do I have to do anything more to get the class working.

    Its giving me error like:

    at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.CodeTypeDeclarationFromCodeClass(CodeClass vsClass)

    at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.Parse(TextReader codeStream)

    at Microsoft.VisualStudio.Design.Serialization.CodeDom.MergedCodeDomParser.System.CodeDom.Compiler.ICodeParser.Parse(TextReader stream)

    at System.CodeDom.Compiler.CodeDomProvider.Parse(TextReader codeStream)

    at Microsoft.VisualStudio.Shell.Design.Serialization.CodeDom.CodeDomDocDataAdapter.get_CompileUnit()

    at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)

    at System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)

    But I managed to get that error out somehow.

    and it is giving me error:

    a datasource instance has not been supplied for the data source 'dsProduct_DataTable1'


    can u help...



  • Sqlpro,

    Please make sure to right-click on non-designer surface.. anywhere on gray area.


    Please make sure to have this following fixed:


    It should be your dataset name and '_' and your datatable name.

    Thanks for your feedback



  • Yes, am on non-designer surface.
    btw when i creating solution i chose "Windows Application" from templates.
    does it make any difference ?
    btw i need to use it as "Windows Application" bcoz i've other forms ,classess etc., in my solution not just this report.
  • Hi Asif,

    I chaged my database name exactly same and it is showing the error again.

    any idea,


  • I have tried numerous times to resolve the error I am getting with this and put up my watch window and it says my reader object drReport is throwing an exception but the application runs and displays the report viewer with the message  "The source of the report definition has not been specified.  I am forwarding my code...any help appreciated.


    private void Form1_Load(object sender, EventArgs e)


    //use following if you use standard security

    string cnString = @"Data Source= sparrishlpt2\stacy;Initial Catalog=northwind; Integrated Security=SSPI";

    //declare Connection, command and other related objects

    SqlConnection conReport = new SqlConnection(cnString);

    SqlCommand cmdReport = new SqlCommand();

    SqlDataReader drReport;

    DataSet dsReport = new dsProduct();



    //open connection


    //prepare connection object to get the data through reader and populate into dataset

    cmdReport.CommandType =


    cmdReport.Connection = conReport;

    cmdReport.CommandText =

    "Select TOP 5 * FROM Products Order By ProductName";

    //read data from command object

    drReport = cmdReport.ExecuteReader();

    //new cool thing with ADO.NET... load data directly from reader to dataset


    //close reader and connection



    //provide local report information to viewer

    reportViewer1.LocalReport.ReportEmbeddedResource =


    //prepare report data source

    ReportDataSource rds = new ReportDataSource();

    rds.Name =


    rds.Value = dsReport.Tables[0];


    //load report viewer



    catch (Exception ex)


    //display generic error message back to user





    //check if connection is still open then attempt to close it

    if (conReport.State == ConnectionState.Open)





  • Hi Stacy,

    Please make sure you have the correct project name specified, I hope it is "rsWin1"?

    reportViewer1.LocalReport.ReportEmbeddedResource = "rsWin1.rptProductList.rdlc";

    If you wish, you can zip the entire project and email it to me at: at gmail dot com.



  • Asif,

    your email you reference is, correct?  I zipped the project and I am getting failure from the postmaster

    My project name is rswin1, any other thoughts?



  • Thats strange! I am getting email regularly on gmail account, never got any complaint.  If you are sending through Gmail then make sure to change the file extension from .ZIP to anything else as Gmail will not let you attache ZIP file, which has any executables in side. Or try sending me at



Viewing 15 posts - 1 through 15 (of 16 total)

You must be logged in to reply to this topic. Login to reply