Wiki source code of Reports

Last modified by Steffi F on 2026/07/24 06:52

Hide last authors
jklein 1.1 1 {{aagon.floatingbox/}}
2
Sabrina V. 18.1 3 The Report Center is designed to visually present data from the machines you manage with ACMP. This can be very helpful, for example, for presentations or internal reports. With the Report Center, you can create complete reports, including lists and charts.
jklein 1.1 4
5 {{aagon.warnungsbox}}
Sabrina V. 18.1 6 Starting with ACMP 5.1, the Display Fields have been modified. As a result, when updating from an earlier version of ACMP, you will need to customize the following included reports: Hardware Card, Decommissioned Machines, Hardware Card, RAM. To do this, delete the existing field and add it again! Please note that you will also need to customize your own reports if you have been using the “RAM Slot Available” Display Field!
jklein 1.1 7 {{/aagon.warnungsbox}}
8
Sabrina V. 18.1 9 The structure of the Report Center is similar to that of Query Management. Here, too, the existing reports are organized into groups, with the “Hardware” group integrated by default. The remaining groups are linked to the corresponding solution and are displayed only if you have valid licenses.
jklein 1.1 10
11 {{figure}}
Steffi F 17.1 12 [[image:69_Reports_Überblick.png||alt="63_ClientManagement_Reports_1180.png" data-xwiki-image-style-alignment="center"]]
jklein 1.1 13
14 {{figureCaption}}
Sabrina V. 18.1 15 Overview of Your Reports
jklein 1.1 16 {{/figureCaption}}
17 {{/figure}}
18
Sabrina V. 18.1 19 = Scheduled reports =
jklein 1.1 20
Sabrina V. 18.1 21 Scheduled reports help you send reports on a regular basis. To manage scheduled reports, first select “Reports” from the navigation menu, then click the “Scheduled Reports” tab.
jklein 1.1 22
23 {{figure}}
Sabrina V. 13.1 24 [[image:68_ClientManagement_Reports_Geplante Reports_1180.png||alt="63_ClientManagement_GeplanteReports_1180.png" data-xwiki-image-style-alignment="center"]]
jklein 1.1 25
26 {{figureCaption}}
Sabrina V. 18.1 27 Overview of Scheduled Reports
jklein 1.1 28 {{/figureCaption}}
29 {{/figure}}
30
Sabrina V. 18.1 31 Above the hierarchical view of the scheduled reports is the search function, which allows you to find the right one immediately as the number of scheduled reports increases. The scheduled reports are displayed below that.
jklein 1.1 32
Sabrina V. 18.1 33 == Add a Scheduled Report ==
jklein 1.1 34
Sabrina V. 18.1 35 To add a report, first click on an existing folder or create a new one. Then click “Add Scheduled Report” on the ribbon bar. A wizard will open to guide you through the process of creating the new scheduled report.
jklein 1.1 36
Sabrina V. 18.1 37 [[Add a new scheduled report>>image:XWiki.Images.WebHome@hmfile_hash_7d469f72.png||alt="Neuen geplante Reports hinzufügen" data-xwiki-image-style-alignment="center" height="414" width="652"]]
jklein 1.1 38
Sabrina V. 18.1 39 If the output directory is incorrect, you can correct it. You can only select from existing folders. Enter a name and choose which report the scheduled report should be based on. Then specify whether the report should still be sent even if it does not contain any data.
40 You specify the format in which the report should be sent (as an HTML email or as a PDF attachment) and indicate whether the report job should be enabled. If your entries are correct, click Next to proceed to the next configuration step.
jklein 1.1 41
42 {{aagon.infobox}}
Sabrina V. 18.1 43 The scheduled reports support a wide variety of formats (HTML, PDF, XML, XLSX, DOCX, PPTX, ODS, ODT, RTF, TXT, CSV).
jklein 1.1 44 {{/aagon.infobox}}
45
Sabrina V. 18.1 46 [[Set Up Email>>image:XWiki.Images.WebHome@hmfile_hash_35b91239.png||alt="E-Mail konfigurieren" data-xwiki-image-style-alignment="center" height="418" width="659"]]
jklein 1.1 47
Sabrina V. 18.1 48 On this page, you can configure the email to be sent. First, enter a recipient or a recipient group. The “To,” “CC,” and “BCC” fields are available for this purpose. For all three fields, you can access [[users>>url:https://www.deepl.com/de/translator#GlobaleNutzerkonten]] and [[groups>>url:https://www.deepl.com/bin/view/ACMP/610/ACMP-Solutions/System/Benutzerverwaltung/#HGruppenverwalten]] that you have already created in ACMP, or you can manually enter the correct email address. Next, enter the subject line. By default, the name of the underlying report and a timestamp are entered here. You can customize all values to suit your needs and requirements.
jklein 1.1 49
Sabrina V. 18.1 50 Finally, if necessary, enter the actual email text in the corresponding field and click Next to specify the start condition. You have the following options:
jklein 1.1 51
Sabrina V. 18.1 52 |A specific time|Specify a specific time
53 |Start interval|Specify the interval in minutes, hours, or days
54 |Day of the Week|Specify the day(s) of the week along with a “specific time” or a “start interval”
55 |Day of the Month|Specify the days of the month along with a “specific time” or a “start interval”
jklein 1.1 56
Sabrina V. 18.1 57 == Duplicate a Scheduled Report ==
jklein 1.1 58
Sabrina V. 18.1 59 To duplicate a scheduled report, select an existing report from the list and click on it. Then go directly to the ribbon bar and click the //Duplicate// button. This opens another window where you can edit some of the information for the duplicate that you previously entered when creating the scheduled report. This allows you to subsequently change general information (name, output directory, or the report’s category), as well as email information for the recipient list and the email text, the start conditions, and the configuration for the duplicate. Once you have finished changing all desired changes to the duplicate of the scheduled report, click //Save//.
jklein 1.1 60
Sabrina V. 18.1 61 = Advanced Report =
jklein 1.1 62
Sabrina V. 18.1 63 In addition to existing Queries, you have the option to create a new Query directly. The Report Builder also offers additional options for visualizing data. Among other things, various chart types are available to you. The following example illustrates such a scenario. It creates a new report that lists all Clients along with their drives, including capacity information. The new query is set up so that a subquery is automatically created within the report. A chart is then created to better visualize the results.
jklein 1.1 64
Sabrina V. 18.1 65 == Create an advanced Query ==
jklein 1.1 66
Sabrina V. 18.1 67 To create a new report, select a folder in the Report Center where you want the report to be created. Then click the “Add Report” icon in the quick access toolbar. The report creation dialog box opens. Enter ‘Drives’ as the title. The description is “List of all client drives.”
jklein 1.1 68
Sabrina V. 18.1 69 In the next steps, select “New Query” as the query type and “Clients” as the query base. For the query fields, also specify the fields “Drive Label,” “Drive Free Space,” and “Drive Capacity.” You can find these fields under the category “Operating System” -> “Logical Drives.” Click the “Sort” checkbox next to the “Computer Name” field to list all clients alphabetically.
jklein 1.1 70
Sabrina V. 18.1 71 As a filter, select the “Computer Domain” field in the “Client -> Workstation” category. Drag it to the OR filter. Specify “IN” as the operator and check the “Specify at execution” option. This ensures that you are always prompted for the domain whose clients should be listed before executing the report.
jklein 1.1 72
Sabrina V. 18.1 73 Since the query runs across at least two database tables, you must specify the data by which the sorting is to be performed. Enter “Clients” here. You can skip the subsequent security settings. The report will now open in the Editor. You will be prompted to enter the domain, after which the data will be retrieved from the database to generate the report.
jklein 1.1 74
Sabrina V. 18.1 75 The following screenshot shows the created report in the Designer. First, you’ll see the basic sections such as Report Title, Main Header, Main Data, and Footer. However, since a Client can have multiple drives, there are also sections for Detail Header, Detail Data, and Detail Footer. As the names of these sections suggest, details are listed here—in this case, the drives.
jklein 1.1 76
Sabrina V. 18.1 77 [[Generated Report>>image:XWiki.Images.WebHome@hmfile_hash_49916695.png||alt="Erstellter Report" data-xwiki-image-style-alignment="center" height="421" width="478"]]
jklein 1.1 78
Sabrina V. 18.1 79 As described in the section [[Working with the Report Builder>>doc:.Reportbuilder .Mit dem Reportbuilder arbeiten.WebHome]], you can also count group elements here and create a page header and footer. For example, the existing page footer could be expanded to include the current date. In addition, each Client and its drives could be displayed on a separate page.
jklein 1.1 80
Sabrina V. 18.1 81 == Diagram ==
jklein 1.1 82
Sabrina V. 18.1 83 To make the entire report more visually appealing, a chart is a good option. The goal is to create a chart that shows the free disk space on each client’s individual drives in relation to one another. To do this, use the chart tool. Now click in the report preview at the location where you want the chart to be inserted.
84 The chart editor opens in a new window. Here, you can configure the chart.
jklein 1.1 85
jklein 10.1 86 [[image:XWiki.Images.WebHome@hmfile_hash_cfaab069.png||alt="Diagramm konfigurieren" data-xwiki-image-style-alignment="center" height="391" width="495"]]
jklein 1.1 87
Sabrina V. 18.1 88 If you haven't created a chart series yet, click Add Series ().
89 The dialog box contains three tabs: Type, Data, and Labels. Under Type, you can set the chart type and some display settings. The Data section is used to specify report elements that contain the data to be displayed. Finally, under Labels, you can specify how the chart data should be labeled.
90 On the Type tab, select the pie chart. This displays the data in relation to one another. You can leave the options as they are. On the Data tab, specify the report elements that contain the relevant data. The captions of the individual drives serve as the legend. To do this, enter the internal name of the rectangle object labeled [vLogical Drives->Drive Label]. In this case, it is Memo7. Follow the same procedure to specify the values. Here, enter the internal name of the element labeled [vLogical Drives->Drive Free Space]. This element contains the amount of free space on a drive and is named Memo8 here. All other settings can be left as they are for now. The following screenshots show the settings in the dialog:
jklein 1.1 91
jklein 10.1 92 |(% style="width:524px" %)[[image:XWiki.Images.WebHome@hmfile_hash_8a61fe57.png||alt="8.6.4.2 - Diagram 1" data-xwiki-image-style-alignment="end" height="258" width="276"]]|(% style="width:552px" %)[[image:XWiki.Images.WebHome@hmfile_hash_08c464bf.png||alt="8.6.4.2 - Diagram 2" height="258" width="276"]]
jklein 1.1 93
Sabrina V. 18.1 94 To find the internal name of an element, select it and open the Object Inspector. Among other things, the Object Inspector displays the element’s name. The name appears in the top drop-down list.
jklein 1.1 95
Sabrina V. 18.1 96 It is important to note that, when creating charts, only data that is directly related to one another can be used for legends and values. If, in this example, the computer name (Memo3) were entered as the legend, the chart could not be created because the data (free space) directly pertains to the individual drives, whereas the client (computer name) is only indirectly related.
jklein 1.1 97
Sabrina V. 18.1 98 To ensure the chart is displayed properly, resize the chart element using the handle points. To do this, you must also increase the height of the detail footer. Additionally, continuing customization is made to improve the report’s appearance:
jklein 1.1 99
Sabrina V. 18.1 100 * The report title is moved upward to maintain a specific distance from the top margin of the page.
101 * A page header is inserted, which is also moved slightly upward. This creates a space between the report title and the first list. Similarly, a space is created between the top margin and the content on subsequent pages.
102 * The rectangle object in the main header is formatted as bold and italic.
103 * The main data section is advanced downward to create space between it and the actual data. The rectangle object within it is formatted as bold.
104 * The detail header is slightly extended downward so that a horizontal line can be inserted. The Insert Line tool is used for this.
105 * Vertical lines are drawn between the rectangle objects in the “Detail Data” section to create a visual separation between the individual datasets.
106 * The page footer is slightly extended downward to maintain a margin from the bottom edge of the page.
jklein 1.1 107
Sabrina V. 18.1 108 The following screenshot shows what the report looks like in the Designer after these customizations:
jklein 1.1 109
jklein 10.1 110 [[image:XWiki.Images.WebHome@hmfile_hash_4c98300c.png||alt="8.6.4.2 - Diagram 3" data-xwiki-image-style-alignment="center" height="488" width="554"]]
jklein 1.1 111
Sabrina V. 18.1 112 The report could then look like this:
jklein 1.1 113
jklein 10.1 114 [[image:XWiki.Images.WebHome@hmfile_hash_0d77700a.png||alt="8.6.4.2 - Diagram 4" data-xwiki-image-style-alignment="center" height="299" width="560"]]
jklein 1.1 115
Sabrina V. 18.1 116 === Using Charts with Grouped Data ===
jklein 1.1 117
Sabrina V. 18.1 118 If you want to use charts in a report based on nested datasets, you must prepare the data manually. The following example illustrates this process.
jklein 1.1 119
Sabrina V. 18.1 120 The report should list all operating systems. For each operating system, a separate list should also be created showing all Clients running that operating system. At the end of the report, the distribution of operating systems should be graphically represented in a pie chart. However, before this can be done, the number of Clients for each operating system must be calculated manually.
jklein 1.1 121
Sabrina V. 18.1 122 First, create a new report. If the desired Query already exists, you can select it. Otherwise, you can create your own Query for the report. The example used here requires only the “OS Name” and “Computer Name” information.
jklein 1.1 123
Sabrina V. 18.1 124 Next, add a group header and group footer to your report. Enter the operating system name in the group header and create a corresponding field for the number of Clients in the group footer. The associated variable will be created later. If desired, you can also add additional information, such as the date.
jklein 1.1 125
126 (% style="text-align:center" %)
jklein 10.1 127 [[image:XWiki.Images.WebHome@reports_groupdatadiagram_1.png||alt="Reports_GroupdataDiagram_1" height="306" width="597"]]
Sabrina V. 18.1 128 Creating Group Headers and Group Footers
jklein 1.1 129
Sabrina V. 18.1 130 For the chart, you can use the “Report Summary” ribbon. This is only for logical organization and is not required. Then insert the chart. Be sure to select “Fixed Data” as the data source. If necessary, you can also customize the chart further.
jklein 1.1 131
132 (% style="text-align:center" %)
jklein 10.1 133 [[image:XWiki.Images.WebHome@reports_groupdatadiagram_2.png||alt="Reports_GroupdataDiagram_2" height="370" width="417"]]
Sabrina V. 18.1 134 Insert a chart
jklein 1.1 135
Sabrina V. 18.1 136 Now switch to the Code tab of the Report Editor. Here, you must first define the required variables. A total of 4 different variables are needed:
jklein 1.1 137
Sabrina V. 18.1 138 * Count: Contains the number of Clients for a given operating system
139 * Total Count: Contains the total number of Clients
140 * X_Chart: Contains the list of different operating systems
141 * Y_Chart: Contains the list of the number of Clients for the different operating systems
jklein 1.1 142
Sabrina V. 18.1 143 The required source code for the individual sections of the report can now be inserted into the corresponding OnBeforePrint procedures of the individual bands. First, the variables must be assigned initial values. This is done in the ReportTitle or in the GroupHeader. Be sure to set the “Number” variable in the GroupHeader to 0. This allows the correct number of Clients for each operating system to be calculated. You can then increment both the “Anzahl” and ‘Anzahl_Gesamt’ variables by one in the MasterData. In the GroupFooter, the data can now be consolidated into a list. The data is stored as a string and separated by a “;” (example: “Windows 7;Windows XP;”).
jklein 1.1 144
Sabrina V. 18.1 145 Finally, the data can be assigned to the chart in the ReportSummary.
jklein 1.1 146
Sabrina V. 18.1 147 ====== Source code ======
jklein 1.1 148
Sabrina V. 18.1 149 ~/~/Define variables
jklein 1.1 150
Sabrina V. 18.1 151 var
152 Count : int;
153 Total_Count : int;
154 X_Chart, Y_Chart : String;
jklein 1.1 155
Sabrina V. 18.1 156 ~/~/Set initial values
157 procedure ReportTitle1OnBeforePrint(Sender: TfrxComponent);
jklein 1.1 158 begin
Sabrina V. 18.1 159 Total_Count := 0;
160 X_Chart := ‘’; 
161 Y_Chart := ‘’; 
jklein 1.1 162 end;
163
Sabrina V. 18.1 164 ~/~/Reset the counter to 0
165 procedure GroupHeader1OnBeforePrint(Sender: TfrxComponent);
jklein 1.1 166 begin
Sabrina V. 18.1 167 Number := 0;
jklein 1.1 168 end;
169
Sabrina V. 18.1 170 ~/~/Count Clients
171 procedure MasterData1OnBeforePrint(Sender: TfrxComponent);
jklein 1.1 172 begin
Sabrina V. 18.1 173 Number := 1 + Number;
174 Total_Number := 1 + Total_Number;
jklein 1.1 175 end;
176
Sabrina V. 18.1 177 ~/~/Add to the list of Clients and the quantity
178 procedure GroupFooter1OnBeforePrint(Sender: TfrxComponent);
jklein 1.1 179 begin
Sabrina V. 18.1 180 X_Chart := X_Chart + Memo4.Value + ‘;’ ;
181 Y_Chart := Y_Chart + IntToStr(Count) + ‘;’ ;
jklein 1.1 182 end;
Sabrina V. 18.1 183
184 ~/~/Pass data to the chart 
185 procedure ReportSummary1OnBeforePrint(Sender: TfrxComponent);
jklein 1.1 186 begin
Sabrina V. 18.1 187 Chart2.SeriesData[0].XSource := X_Chart;
188 Chart2.SeriesData[0].YSource := Y_Chart; 
jklein 1.1 189 end;
190
Sabrina V. 18.1 191 begin
192
193 end.
194
jklein 1.1 195 {{aagon.infobox}}
Sabrina V. 18.1 196 If a chart displays incorrectly, this is often due to insufficient display space. In this case, try hiding any captions you don't need, for example, under Pie -> Marks -> Visible = “False”. It may also be helpful to change the position of the legend under Chart -> Alignment = ‘laBottom’ or “laTop”
jklein 1.1 197 {{/aagon.infobox}}
198
Sabrina V. 18.1 199 Example:
jklein 10.1 200 [[image:XWiki.Images.WebHome@reports_groupdatadiagram_3_zoom75.png||alt="Reports_GroupdataDiagram_3" data-xwiki-image-style-alignment="center" height="469" width="376"]]
© Aagon GmbH 2026
Besuchen Sie unsere aagon-Community