Preview Problem With DataSets

5 posts, 0 answers
  1. Jim
    Jim avatar
    19 posts
    Member since:
    Feb 2008

    Posted 12 Feb 2008 Link to this post

    I can not get a report with a dataset datasource to preview with data.  Here is the recipe that shows my problem.

    1. Create Solution & Create Class Project
    2. Add DataSet (XSD) to Project
    3. Add one table adapter with simple SQL (SELECT Field1 FROM Table1) to the DataSet - make sure it returns data
    4. Add Telerik Report 2.0 to Project
    5. Add a text box with a value of [=Fields.Field1]
    6. Drag a Toolbox DataSet to the Report, select the typed dataset from step 2
    7. In the report's properties, select the report's data source instance
    8. Also in the report's properties select the table adapter from step 3
    9. save
    10. look at the data explorer to make sure the report knows about your data - verify that Field1 appears properly.
    11. Click preview or preview HTML and see no data.
    12. Sigh
    13. Remove datasource and datamember properties from report & delete the dataset from the report
    14. Drag a Toolbox SqlDataAdapter to the report & enter the same SQL used in step 3
    15. In the report properties, selecte the report's data source instance
    16. save
    17. click preview or preview HTML and see the data

    I am a fairly new user.  Can someone please tell me what I am doing wrong? 

  2. Ivan
    Admin
    Ivan avatar
    519 posts

    Posted 13 Feb 2008 Link to this post

    Hi Jim,

    Following your step-by-step manual I found the DataSet object was not filled. You should do only one thing in order to preview (and run) your report with data - in the report's constructor, after the call of InitializeComponent method, place the code for filling DataSet object:

    MyProjectNamespace.MyDataSet1TableAdapters.MyTableTableAdapter tableAdapter =
        new MyProjectNamespace.MyDataSet1TableAdapters.MyTableTableAdapter();
    tableAdapter.Fill(this.myDataSet11.MyTable);
     
    // please note that names like
    //  MyProjectNamespaceMyDataSet1TableAdapters,
    //  MyTableTableAdapter and MyTable

    //  are generated by MSVS wizards.
    // myDataSet11 is auto generated when we assigned
    //  report's DataSource property the MyDataSet1 in Properties Window
    .

    If you use our DataSource wizard (from Properties window as shown on the picture bellow) then such a code will be written automatically.


    Please try this approach and let me know if you have other questions.

    Sincerely yours,
    Ivan
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. DevCraft banner
  4. Ivan
    Admin
    Ivan avatar
    519 posts

    Posted 13 Feb 2008 Link to this post

    Hi Jim,

    Here are the links with more information about connecting report's data source:

    Sincerely yours,
    Ivan
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. Terri-Lynn
    Terri-Lynn avatar
    45 posts
    Member since:
    Dec 2010

    Posted 24 Feb 2011 Link to this post

    I get server errors when I try and follow any of the 4 links above.  Are they still active somewhere?
  6. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 25 Feb 2011 Link to this post

    Hello Terri-Lynn,

    This thread is from 2008 and is marked as old and possibly containing obsolete information. However our online help contains search capability, so you can easily find what you're looking for. Counterparts of the obsolete links below are:

    Regards,
    Steve
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top
DevCraft banner