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

Preview Problem With DataSets

4 Answers 176 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jim
Top achievements
Rank 1
Jim asked on 12 Feb 2008, 02:44 PM

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? 

4 Answers, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 13 Feb 2008, 03:52 PM
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
0
Ivan
Telerik team
answered on 13 Feb 2008, 04:21 PM
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
0
Terri-Lynn
Top achievements
Rank 1
answered on 24 Feb 2011, 05:13 PM
I get server errors when I try and follow any of the 4 links above.  Are they still active somewhere?
0
Steve
Telerik team
answered on 25 Feb 2011, 01:23 PM
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!
Tags
General Discussions
Asked by
Jim
Top achievements
Rank 1
Answers by
Ivan
Telerik team
Terri-Lynn
Top achievements
Rank 1
Steve
Telerik team
Share this question
or