In this blog, i will briefly touch upon the steps to create a report in Jaspersoft Studio. I will be using this Report to explain all the workarounds I will be posting in future.
Lets Get Started.
Prelude : Jaspersoft Studio can create report from any database connection. The Image below shows different data source connections available in JS Studio.
1) I will be using SQL Server Database “Adventure Works DW 2012” to create the report. For first time Jasper Studio Users, Please refer to my page “How to create a SQL Server database connection” for step by step process to connect to the database using Jaspersoft Studio
2) Once the connection is successful, Click File –> New –> Jasper Report
3) This will open a Report Creation Wizard called “New Report Wizard”. In the First Page Select the Size and Type of your report.
4) Next Step is to Name the report and save it in the Work Group Folder. By Default it will be ” My reports”. Name the report as you wish and Click “Next”
5) This will Open the Data Adapter selector and Query Editor window. From the Data Adapter drop down select “Adventure Works DW” and the Metadata section would then appear with the Table details. Write a query like “select * from dbo.FactInternetSales” in the query editor and click “Next”.
6) this window will display all the fields available from the query you wrote in the previous step. Select fields from which you want to create a report and click > button to send them to the right side of the window. Click “Next”
7) In this window you can specify the Fields on which the Reports gets grouped by. (Actually Jaspersoft Studio will create Groups based on your selection here). Lets leave it empty. Click “Next”
8) This brings us to the end of the wizard with “Congratulations” Message. Click “Finish”. Jaspersoft Studio will now create its basic layout for you.
9) From the “Outline” section present in the Left Bottom Corner, Expand “Fields” section and select all the fields, drag them and drop them in the “Detail” section.
10) Select Preview tab to check the result of your query.
Congratulations!!! You have created your first Report using SQL Server database connection using Jaspersoft Studio.