3 Replies - 13428 Views - Last Post: 26 January 2011 - 12:43 PM Rate Topic: -----

#1 ants  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 05-November 10

Visual Studio 2010 Datasets Datasources Confusing

Posted 25 January 2011 - 07:05 PM

Hi
I am using VS 2010 Premium. - I think the problem only relates to 2010
I have created a brand new windows form project (VB)
I am trying to create a windows report in my VB Project.
I have added a report.rdlc file to my project.
I now want to set the datasources
I do the following:
I have the report.rdlc file visible
I go to Datasources - Add a datasource (in the wizeard I use an existing connection to my SQL Database
I Dont change any words and let the wizard name everything - I choose a Stored proecdure (Called test with two fields in it)
The data source is created and yet it is called ....Dataset - My first question why is it called a dataset when I though I just added a datasource.
(I can see the fields in the Data sources window - under the name of Dataaset / Test)

Now bear with me on this...
Now I repeat the same process but this time I grab a different Stored procedure. This creates a new Data source - called Dataset1 and again I can see the stored procedure test1 and its fields

Now I go to my report:
It says on the the report to "drag an item from toolbox to design surface and then drag dataset fields to the item.
I do as I am told
I drag a text box
I then go to one of my datasets and try and drag the Field Client to the Text box. Nothing happens.
I also try dragging the field directly to the canvas and bypassing the textbox - nothing happens
I decide to try a table
I delete the text box - and then place a table on to the canvas of the report.
It prompts me with a Dataset properties box and says "choose the dataset"
Its asks for a name - "Dataset1" (default) and in "DataSource" combo box I have a list of my Datasets - Confused!!! - I am
I choose the first one and click ok.
I now delete the table (pretend that I made a mistake)
I then add a new table - This time I don't get the Dataset properties box. - I dont know why - but just go along with this
But this time I do want to change to the 2nd dataset (or datasource or what ever its called)
I select the top LHS of the Table and then go to the properties window to "Change the DatasetName"
and on the drop down box I only have the option to choose the first Datasource - the 2nd one is not visible.

If anyone is preparred to make a new project and follow these steps I would love to know what is going on or what I am doing wrong.

My main questions are
Why the name confusion datasource and dataset
and why cant I drag and drop
and why cant I select the 2nd Store procedure


Any help with this would be much appreciated.

This is driving me around the bend

or should I install 2008 and just go with that

Cheers

Ants

Is This A Good Question/Topic? 0
  • +

Replies To: Visual Studio 2010 Datasets Datasources Confusing

#2 CharlieMay  Icon User is offline

  • This space intentionally left blank
  • member icon

Reputation: 1623
  • View blog
  • Posts: 5,199
  • Joined: 25-September 09

Re: Visual Studio 2010 Datasets Datasources Confusing

Posted 26 January 2011 - 06:48 AM

Well a datasource is the actual data (the SOURCE of your data if you will)
a dataset is a temporary "Snapshot" of a SET of data from your datasource

When you are trying to drag and drop, are you in the ReportData area of the report or trying to drag fields from the DataSources area? Open the report, Click the ReportData tab, there you should see default items such as "Built-in Fields", "Parameters", "Images". At the top of this window is a New drop-down button. Click it, click dataset and select your dataset and datasource. If successful, your ReportData should have your DataSet in the list. Click the little white triangle to the left of it and it will expand to show the fields of that dataset. Drag field to the report.
Was This Post Helpful? 1
  • +
  • -

#3 ants  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 05-November 10

Re: Visual Studio 2010 Datasets Datasources Confusing

Posted 26 January 2011 - 12:38 PM

View PostCharlieMay, on 26 January 2011 - 06:48 AM, said:

Well a datasource is the actual data (the SOURCE of your data if you will)
a dataset is a temporary "Snapshot" of a SET of data from your datasource

When you are trying to drag and drop, are you in the ReportData area of the report or trying to drag fields from the DataSources area? Open the report, Click the ReportData tab, there you should see default items such as "Built-in Fields", "Parameters", "Images". At the top of this window is a New drop-down button. Click it, click dataset and select your dataset and datasource. If successful, your ReportData should have your DataSet in the list. Click the little white triangle to the left of it and it will expand to show the fields of that dataset. Drag field to the report.

Was This Post Helpful? 0
  • +
  • -

#4 ants  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 05-November 10

Re: Visual Studio 2010 Datasets Datasources Confusing

Posted 26 January 2011 - 12:43 PM

Hi

Thanks for your reply.

Thanks for your explanation - it helped but I still don't understand why if I click "add a datasource" I get a data set - anyway I wont worry about that now.

You where right I was clicking on the datasource not the reportdata, so that made all the difference and the drag and drop worked perfectly. Thankyou

Now my next problem is I have added a new field to my stored procedure but refreshing the datasource/ dataset and reportdata does not reflect this change. ie I can not see my new field.

Do you know how I can rectify this

Ta

Ants
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1