Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Panel | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Panel | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
JASPERSOFT STUDIO BASICS Project Explorer View: Displays your projects and associated reports in your MyReports folder. Repository Explorer: Displays your Data Adapter connections to your Database(s). Report Editing Area: Working area showing a view of your current report. It has three preview tabs, two of which are editable and one displaying the final preview. Design Editor Tab loads by default. Design Editor Tab: Displays your report with an overlay allowing you to edit its appearance, drag to align boxes, text boxes for Headers, etc. Source Editor Tab: Displays your report in raw jrxml code. Preview Editor Tab: Displays your report in its current form were it to be printed, uploaded for viewing, etc. Outline View: Displays the pieces of your report seen in the Design Editor Tab in a list format. You can edit various aspects of your report by selecting an object from the list and adjusting its parameters in the Designer Palette and/or Properties View. Objects in this pane include embedded parameters (e.g. date ranges), fields corresponding to columns in the source table(s) of your report, and formatting objects like textboxes (e.g. Title textbox). Designer Palette: Contains insertable elements such as text fields, images, subreports etc. Properties View: Allows for aesthetic customization of objects including size, color, font, etc. The target object for customization can be selected either from the Outline View or directly clicked in the Report Editing Area when the Design Editor Tab is active.
Navigate to File Menu > New > Jasper Report After selecting a template that suits your needs, a blank report template will appear in your Report Editing Area. The view will use the Design Editor Tab by default. This mode should feel familiar to anyone with experience in InDesign and other creative publishing software. The next step will be to connect our report template to a dataset. In the top-right section of the Report Editing Area is the Dataset and Query editor dialog button shown below: This will bring us to our Dataset and Query Dialog window. From here, we can make a Data Adapter (Database) Selection from where our query will gather its results. We can also make a Query Language Selection for our query which will be written in the Query Editor section. Once we’ve written our query, we can click the Read Fields button which will auto-populate our Query’s results’ features which will be displayed in the bottom of the window. From here, we can inspect aspects of our query such as its fields to ensure it encompasses everything intended. The Read Fields button also functions as a quick sanity check as it will throw an error if there are any problems with our query. Once satisfied with your report, File > Save your .jrxml with a unique name, then click the Compile Report button. This will create a .jasper file with a name matching its .jrxml file name. You can now navigate to the Preview Editor Tab and see a finalized version of your report. Your report is now ready to be uploaded to VetView!
Select Report Setup from the Navigation menu, then click the Add button: Fill out the next screen as needed. Make sure the report is marked active and report type is Local Report: Click the Add button and the following window will appear to the right. Here we will upload the .jrxml and .jasper files we created. Jaspersoft Studio creates a MyReports folder in which it stores report files by default. This folder is typically found in the user’s directory in JaspersoftWorkspace > MyReports. Navigate to this folder to find your .jrxml and .jasper files and upload them to their respective places: |
Panel | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
To bring all the above information together, and practice with some of the features described, we will walkthrough the creation of a new report containing a list of employees’ first names, last names, and usernames. Start a new report by going to File> New > Jasper Report and choose the Blank_A4 template. For the purposes of this tutorial, we won’t need any of the template design features other than the Title, Detail 1, and Background boxes. Navigate to the Outline View and delete each element by right-clicking and selecting delete until only Title, Detail 1, and Background remain: Next, click the Dataset and Query editor dialogue button. Make sure you choose a Data Adapter and we will use sql SQL as our language of choice. Type the following exactly as it appears in the Query Editor, and click the Read Fields button: Notice the populated fields are the three columns we’ve queried from the Employee table. Click OK to return to the main window. In the Outline View, expand the Fields tab to see the columns from our query. Drag and drop these into the Detail 1 tab. As you do, you should see them appear in the Report Editing Area. These boxes are where their respective values from the Employee table will populate in a list. Arrange them in the Detail 1 box by dragging them. You can shrink and expand them just as you would a textbox or picture in other programs. The same for the Title and Detail 1 boxes. Arrange them how you would like, ensuring they stay inside the Detail 1 box. Next, do the same with the same Fields and the Title tab in the Outline View. You will see three more boxes appear this time in the Title box. These will not populate the names from our Employee table and are instead the titles for our report data to keep everything organized. Arrange everything so that the titles are above their corresponding detail boxes. Play with the sizes of the boxes to get the spacing that you would like. Here is how I have mine arranged: Once you have a layout you are happy with, go to File > Save As.. and save it to your MyReports folder with a unique name. Your .jrxml report template is now saved, and to produce the .jasper file, click the Compile Report button at the top of the Report Editing Area. As a final “sanity check” to make sure everything looks nice and neat with proper spacing, click the Preview tab at the bottom of the Report Editing Area to see your list of employees’ names. If everything looks good, navigate to VetView and follow the steps to upload the .jrxml and .jasper files. |
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Info |
---|
To see commonly used terms in VetView Hospital, please visit our Hospital Glossary of Terms. |
Panel | ||
---|---|---|
| ||
|