Content
The "Turnover chart" report determines the turnover of the last 5 years for the selected customers. For the customers with the largest total sales from these 5 years, a chart is created showing the relative size of the customers and the development over time. |
||
Data collection Data collection is identical to the first report Sales. |
||
Layout We create the diagram as a .png file in VB.NET. There are good options for this in VB.NET or you can use one of the numerous graphics packages for VB.NET. We have chosen the ChartDirector Decided. Please note that if you use ChartDirector productively to create your own charts, you will need a "ChartDirector Developer License for Windows" are required. The license used in CIS mobile for standard diagrams does not cover the development of own diagrams. Typical section of VB.NET coding:
Vb.net
|
||
Additional parameters The diagram is first created for the 10 customers with the highest sales. created. The user then has the option in the display to select a different number of customers instead of 10. a different number of customers. In addition, he can tick that the remaining customers are displayed in total in the diagram, so that the relation of the displayed customers to the total sales can be can be seen. The individual report options (up to 10 are possible) are stored in the dictionary object "keys". The name in the Dictionary consists of the report ID, the string ".OPTION." and the number 0,1,2,...9. So in our case Number Of Customers: SALES2.OPTION.0 Other customers in total: SALES2.OPTION.1 When a report is called for the first time, all options are initialized with "". We can assume a default value in this case, e.g. 10 for SALES.OPTION.0, and write the default value back to the dictionary object "keys" so that the option appears with the correct value when the report is first displayed. The VB.NET coding for this looks as follows, where here by Try..Catch for each non-numeric value of the option 0 the default "10". is used:
Vb.net
An Html page is used to display the report options. It is named "SALES2.OTPIONS.HTML" and is located in the config/reports/views.EN directory (German version). If you support additional languages, accordingly in confgi/reports/views.XX, e.g. config/reports/views.EN for English and config/reports/views. FR for French.The HTML page is basically arbitrary. For the options you can use input fields <INPUT>, drop-down fields <SELECT> and checkboxes <INPUT TYPE='CHECKBOX'>. The connection to the respective option is established via the HTML-Id d 'OPTION.0', 'OPTION.1',... of the respective element. In our case, it looks like this:
HTML
Please note:
|