View Report: Tutorial_1-Building-a-Simple-Listing-Report
Download Report: Tutorial 1: Create Simple Listing Report (172 downloads)
You can’t build a data set if you haven’t already built a data source. If you haven’t completed the lesson on Building a Data Source, you should go there first and then come back to this lesson.
If you have already completed the lesson on Creating a Data Source, then you should be ready to go!
This is going to pull up a window called “New Data Set”. This new data set must be built from a data source. For this lesson, we only have one data source called “ClassicModelsSampleDB”. This was the data source we created in a previous tutorial.
The next thing we are going to do is select the “Data Set Type”. There are 2 options here and we’re only interested in the first one which is the default of “SQL Select Query”. And we’re going to name this Data Set something descriptive and, in this case, we want to call it “Customers”.
We’ll hit the NEXT button and it will take us to a new window.
The New Data Set window advances to the next window and the screen changes. You should now see a text area for Query Text and a list of Available Items. The Query Text dialog box contains the 2 required keywords for a SQL Select Statement, “select” and “from”.
The Available Items lists all the schemas available for use from our data source.
In the Available Items list, left-click the arrow next to “CLASSICMODELS” to display the tables.
We can type the field names into the Text Area. SQL is NOT case-sensitive so you really only need to make sure you are spelling the field names right to get the query to work.
Personally, I rarely type field names into the Query Text Area because BIRT lets us just double click the fields in the Available Items list and pops them into the Query Text wherever the cursor is located. I only need to manually insert a comma between the fields as I double-click them into the Query Text box.
We can also drag drop the whole group of names over at the same time and have the same result. BIRT will automatically insert a comma between the field names for you to prevent syntax errors in your query.
Once you are done, click OK. Be careful, if you hit cancel, all the work you did to create the new data set is lost and you have to start over.
That’s all there is to building a basic data set!