QAD Enterprise Edition Training Guides
>
Reporting Framework
>
Introduction
>
Exercise Steps
Exercise Steps
Create a new Sales Order report based on a browse data source
You can use an existing browse as a source of data for a report. For example, you could use the Sales Order Browse. To see this browse, in the QAD .NET UI’s left navigation panel, enter Sales Order Browse. To see where it is in the menu structure, right-click on it and choose Find In Menu. (Note that it is located under the Sales Order Menu - knowing this will come handy later when we add a new report to the menu system.) Double-click on Sales Order Browse to run the browse.
Specify the report resource
First, most likely someone will tell you the description of a browse (for example, Sales Order Browse), but in order to specify the browse as a report resource (that is, as a data source for the report), you will need to know the name (or, Browse ID) of the browse. Here are two ways to do that:
• In the QAD .NET UI’s left navigation panel, locate Sales Order Browse. Right-click on it and choose Properties. Note the Aliases. The first one is the browses numbered location in the menu system, and the second is program (.p) name of the browse, such as sobr009.p. The browse name is the program name with the “br” and the “.p” removed: so009.
• Open Browse Master Browse (as its name suggests, this is a browse of browses). Under Search, on the first pull-down, choose “Description” (default is “Name”), choose “contains”, and then enter “Sales Orders”. Hit the Enter key or click Search. Note that the Name of “Sales Orders” is so009.
Once you know the name of the browse, you can specify it as a report resource using Report Resource Maintenance:
1 Open Report Resource Maintenance.
2 Enter a Report Code that you want to use for this new report. For example, ftp_report_01.
3 In the Report Resource frame, set Category to Report.
4 Set Data Source Type to Browse.
5 Set Data Source Ref to the browse name:so009 (so009 identifies Sales Order Browse).
6 Optionally, enter something in Description (such as “FTP Sales Order Report”).
7 Click Next.
Now you are done specifying the report resource. (Report Resource Maintenance goes back to its original display, inviting you to enter another Report Code, but you are done with using Report Resource Maintenance for now.)
Create the report definition
You can now design the report:
1 Open Report Resource Designer.
2 Click New.
3 Select the report resource you have just defined: for example, select ftp_report_01.
4 Click Next.
5 Select a template. For example, select QAD_Default_Template_Browse.
6 Select the data source. (Under Tables, note that GetBrowseData_tt is selected so you have access to all the records accessed by Sales Order Browse.) Click Next.
7 Select the layout. For instance, set Orientation to Landscape and Layout to Columns. (Note that “Adjust fields to fit page” checkbox.) Click Next.
8 Select the field(s). For instance, select sales order number (so_mstr_so_nbr). Press the Ctrl key to select multiple items. Click > to move the selected fields into the Details box.
9 Click Next.
10 A summary of the new report is displayed, identifying the Report Template, Report Data Source, and Layout.
11 Click Finish.
12 A WYSIWYGish display of the report layout is displayed.
13 Click Save As. Save the report definition as ftp_report_01_definition_A.
You could edit the design now but first let's make sure what we have now actually works.
Test run from Report Resource Designer
1 In the Report Resource Designer, click Preview. The report Filter / Viewer is displayed.
2 Note the drop-down just to the left of the Run button. From the pull-down, select Document. Selecting Document will have the report display on the QAD NET UI Screen, in the Viewer tab. Note there are a variety of other output format options (PDF, Excel, etc.).
3 Click Run.
Export the report to XML
1 Open Report Resource Export.
2 Initially, the screen is mostly blank, but we can change that. At the bottom of the screen, in From Report, enter ftp_report_ (we are going to search for all the reports, starting with reports named “ftp_report_”).
3 Click Search.
4 Now lots of reports are listed, start with “ftp_report” and all the reports after it (most likely, a lot of reports starting with “QAD_”). We just want the ftp_reports, though. You could Uncheck All and then just select the ones you really want to export. You could also enter something in the To Report field to focus the search. Trying entering “g” in the To Report field, with “ftp_report” still in the From Report field.
5 Ok, that's enough fun with that. Just select the report you've created (for instance, “ftp_report_01”). Specify the Export Directory. You can select some location on your machine (click the “...” button).
6 Click Export.
7 The Status column should indicate Complete. (If there were problems, an error message would be in the Error Message column.)
Add the report to the menu
Let's add the new report (ftp_report_01, for instance) to the menu system. As this report is related to Sales Orders, let's put it under the Sales Order Menu. You might recall that the Sales Order Browse is also under the Sales Order Menu.
The QAD Enterprise Applications menu system has a numbered hierarchy. These numbers are called menu keys. You don't need to know everything about this menu system right now, but you do need to know the menu key for the Sales Order Menu so that you can put new items under it (such as your new report).
Find the Sales Order Menu in the menu system, right-click on it, and choose Properties. In the Properties window, find the Key field (yes, this is the menu key). Most likely, it is 7.1.
The Sales Order Menu typically has about 24 menu items under it. Each one has a menu key 7.1.*. For instance, Sales Order Maintenance is typically 7.1.1. and Sales Order Browse is typically 7.1.2.
Let's give our new menu item a menu key of 7.1.50. This will stay out of the way of the existing menu items but also give us some room in case we want to add other Sales Order related reports (for example, we might want to use 7.1.51, 7.1.52, etc.).
Add to menu system
1 Open Menu System Maintenance.
2 Set Language ID to US.
3 Click Next.
4 Set Menu to 7.1
5 Set Selection to 50 (this is how we specify a new menu item identified as 7.1.50).
6 Click Next.
7 Set Label to FTP Sales Order Report.
8 (Leave Name Blank)
9 Set Exec Procedure to: urn:qad-report:c1:ReportCode, for instance: urn:qad-report:c1:ftp_report_01
Set menu system permissions
1 Open Role Permissions Maintain
2 In Role Name, select a role that your user ID is a member of - for instance, select SuperUser. Right-click and choose Permissions.
3 You'll see “Secured items on menu” as an open/collapse item. Currently the check mark appears grey rather than black, indicating there are some items on the menu that are not currently accessible.
4 Click on the + button next to “Secured items on menu.”
5 Click on the + button next to Customer Management, then Sales Orders / Invoices (7), then Sales Order Menu (7.1.).
6 Scroll down as needed to locate the menu item you have added. For instance: FTP Sales Order Report (7.1.50).
7 Click the checkbox on.
8 Click Save.
9 To refresh the menu system display, log off the QAD .NET UI and then log in again.
10 FTP Sales Order Report should now be a menu item under Sales Order Menu. You can now run the report from the menu system.
Note: In Enterprise Edition (EE), you set permissions with Role Permissions Maintain. In Standard Edition (SE), you would use Menu Security Maintenance instead.