In the last post I show you how create Data Source in Report Builder. In this article I discuss hoow create Dataset, if you have set Data Source. So first go to Report Data window. Right click the
Dataset Properties wizard.
Name field write name for your data set. Check
Use a dataset embedded. From the list select defined DataSource or create new by clicking
New button. In the
Query text area, code SQL query to select data from one or several tables or other objects.
OK button. In the
Report Data window you see new item in
Another way to select data from database is using Query Designer. Instead of write SQL query, you can click the
Query Designer button.
You see conten similar to that below.
You can expand nodes to select names of columns from tables. They will be visible in
Selected fields tab.
OK button. You see generated SQL query.
OK button. InReport Data winow you see new Dataset that can be expaned to see all columns.
In the first example we use select with * sign. You can notice that this Dataset doesn’t allow to see columns. How change it? You have to correct it by give names of the columns. Right click on the concrete Dataset and choose
You see old SQL query:
List all names of columns in the table:
Now the columns are visible.