Standard reports

Three reports are already defined as a default in CIS mobile. These reports combine data pertaining to several customers, i.e. the sales, pricing and credit overview of the customers assigned to the current user ("my customers").  

These three reports are included in the CIS mobile setup with VB.NET example code.



Extending CIS mobile with reports

How to implement

Four simple steps are required to implement your own reports:

1. Define text and internal identifier within the project s10cisaddon (VB.net) (method "DefineReport")
2. Request some data from the ERP system in an additional method
3. Embed the recieved data into some HTML formatting string
4. Choose an icon for the new report (optional)

Please see the examples in the following chapters.

Define a report

Open the VB.net project "s10cisaddon.sln" that is delivered with CIS mobile.
It can be found in the directory config\s10cisaddon.

Look at the method "DefineReport" and add another case for the new report.
In this example the id of the report is "credit" which defines the name of the method that needs to be implemented. The text appearing next to the button in CIS mobile is saved in the variable "text". It is language dependent so we read it from the text repository on runtime (file texts.txt).
 

VB.net
            Case 2
                id = "CREDIT"
                text = ic.MessageText("REPORT_CREDIT")
                Return True

Implement the report

To implement the report, add a new method and choose the name according to this pattern:
CreateReport + id of the new report

Example:

VB.net
    ' Report Credit
    Public Function CreateReportCredit(ByVal keys As Dictionary(Of String, String), _
       ByVal id As String, ByVal customernumbers() As String, ByVal customernames() As String) As String
				
				        ' We use ABAP report RFDKLI40 to display basic credit data
				


Parameters of the method:

keys: In this dictionary object you can find all keys and their values that are available in the current context. Access them by using  GetItem(keys, "Name of the key")
id: This is  the id of the report e.g. CREDIT for the credit overview report
customernumbers: All numbers of the customers in the list "my customers"
customernames: The names of the customers in the list "my customers"

The method returns an HTML5 formatted string that will be displayed within CIS mobile.
 

Choose an icon

The icon for a report is saved as an image file in the directory reports\icons. The filename needs to correspond to the id of the report and the image type is .PNG (e.g. credit.png).