Basic Project Tutorial

This tutorial walks through the basic steps for creating a Project in the Project Editor.

Scenario

We have a report that lists sales figures for a given date range. At the beginning of each day we need to:

Steps

1. Start the Project Editor and it will show a new, empty project.

Add a report to the project

2. Click the Add Report button () to add a report to the project. You can find the "SalesExample.rpt" report file in the Report Commander program folder. You can use the report file to follow this tutorial, but you won't be able to preview or export data since the report won't be connected to a database. Or you can follow along with a similar report of your own.

Set database logins

3. After the report is added, the first thing we need to do is set the database login information. To do this, select the report name in the Project Navigator and click the Properties () button (or double-click the report name) to open the settings page for the report, then select the Data Sources tab.

4. The Data Sources tab lists all of the database connections found in the report. This report is configured to use integrated security, but if you needed to run the report under explicit user credentials instead, or to point to a different database or server, you would click the Edit button for each connection to open the Data Source Properties window and supply the necessary information.

Configure Output Group with parameters for the export

5. Report Commander has automatically created the first Output Group for the report, called "Output Group 1." Each Output Group is a collection of Outputs that use the same parameters for the report.

Select "Output Group 1" in the Project Navigator and click the Properties () button (or double-click the group name) to open the settings page for the group.

6. We will use this group to produce the report of yesterday's sales. Change the Group Name to "Yesterday's Sales."

7. The report takes StartDate and EndDate parameters to tell it which dates to select records for. First click the Edit button next to the StartDate in the parameter list to open the Parameter Editor.

8. We don't want to have to update the project every day to give it the correct dates, so we will make use of functions to automatically insert the date when the report runs. Check the Use variable or functions box, then paste in this text in the value box: @now("yyyy-MM-dd",-1,day). Click OK to save the parameter value.

This is supposed to be a quick tutorial, so take our word for it on the text you just pasted in. For a detailed explanation of where that value came from, see the advanced tutorial.

9. Repeat step 8 for the EndDate parameter.

10. Click the Save button () on the Output Group page to save the settings for this group.

11. At this point you can use the Preview button () to preview the report with the specified parameters and database logins. (It won't work for this tutorial because there is no database for the report.)

Configure PDF export

12. Next we need to tell Report Commander how to export the report. With the "Yesterday's Sales" Output Group selected in the Project Navigator, click the Add File Output button () to add a new File Output to the group. This will open a new File Output page.

13. Change the Format to "PDF," set the Name to salesreport.pdf and check the Export to temporary file box.

In out scenario we're just e-mailing the export and not saving it for future use. So we use the Export to temporary file to tell Report Commander not to keep the export file after it has been e-mailed. We don't need to specify a folder for the export file, because it will get saved to a temporary location.

14. Click the Save button () on the File Output page to save the settings for this output. At this point you can use the Run button () on the File Output page to test the export using the settings so far. (It won't work for this tutorial because there is no database for the report.)

Configure e-mail message

Next we will create the e-mail message to deliver the export file.

15. Click the Add E-Mail Task button () to add a new E-Mail Task to the Project.

16. On the Message tab, configure the message settings as follows:

17. On the Attachments tab, under Include the output files from these exports, check the box next to "Yesterday's Sales." This will attach the exported PDF to the message.

18. On the From/To tab, add one or more recipients to the To list for the message.

19. If you have not already configured a mail server for Report Commander to use, click the mail server settings link to open the e-mail settings for the Project, where you can do this.

Save and test the Project

20. If you haven't already done so, click the Save Project button () on the top toolbar to save the project. Give it the name "sales tutorial" and save it to a convenient location.

21. You can test the entire project by clicking the Run Project () button on the top toolbar. This will run the entire project, creating both export files and sending the e-mail message, and will show you any problems encountered.

Schedule the Project

The Run Project button lets you run the Project from within the Project Editor, but once you've finished building the project you probably want to run it automatically. Report Commander doesn't have a built-in scheduler, but you can easily schedule the project using your favorite scheduling or automation tool.

On the Help menu, select the How to execute project... link and Report Commander will show you the command you need to have your automation tool run to execute this project.