Cuberry Reporting & Printing Features
 
The report viewer runs reports directly from a reporting server and can also open local reports directly from the file system where no reporting server is needed. In latter case the entity objects must be handed over to the report.

The print functionality which can be found in all DetailViews uses local reports. The location of the local reports is configured in the XAppConfig table (ConfigName: "ReportLocation").

The server based reporting module FiAccountingReport uses the reporting server.
The reporting server URL and the folder for the reports is set up in the XAppConfig table (ConfigName: "ReportServer"). 

Cuberry's reporting module groups reports in categories. Categories, report names and their descriptions can be customized for all configured languages.
 
Currently this customization has to be done directly in the database (in the tables FiReport and FiReportCategory) as there is no user interface for the renaming yet.
 
Report access permission is given on user group basis and managed in the FiReportUserRights table.
 
 
WordML

The WordML functionality is implemented in the P2WordXMLFiller class in the Helper assembly.
 
For the usage of the WordML functionality a MS Word file must be saved in the XML format and can be used as a template. The location of all templates can be configured in the XAppConfig table ConfigName: "WordTemplateLocation".
 
An example can be found in the FiTransaction module OnFiTransactionPrintExecute. A sample template can be downloaded here.

P2.Cuberry.Framework.Helper.WordMailMerge.P2WordXMLFiller filler = new P2.Cuberry.Framework.Helper.WordMailMerge.P2WordXMLFiller();

filler.fillWordXML("FiTransactionX2.xml", Path.ChangeExtension (Path.GetTempFileName(),"xml"), Service.RetrieveFiTransactionWithItemsAsDataSet(this.FiTransactionHeaderID));

The filler method takes the name of the xml template and a DataSet with all DataTables used in the template.
 
In our sample template file we use mail merge fields. Sometimes MS Word saves additional information so the replacement functionality failes to replace all fields. In this case the XML file needs to be edited in Notepad or in another editor.
 
I our example we use a header DataTable and two Sub-DataTables (TransactionHeader, TransactionItems Debit and TransactionItems Credit). To locate the tables for the two Sub-DataTables we have to place a bookmark in the template file at the first cell of each table.
 
The bookmark must include the name of the Sub-DataTable and the string "WMLRepeat", e.g. "FiTransactionItemCreditWMLRepeat2".
To find the bookmarks in our sample template you have to open the template in MS Word and click on "Bookmark" in the menu.
 
 
The Local Cuberry Reporting Module
 
Currently a new reporting module is under construction which uses local reports.
 
The advantage of local reports is that no installation and configuration of the Reporting Service and its perquisites (e.g. IIS) is needed. Local reports are independent of the database used. So other database server vendors may be used.
Beside that the layout of the user interface can be adapted to be in line with the application.
Local reports should be used if a small number of PCs is using Cuberry and only a small amount of data is expected to be processed in the reports.
 
Its disadvantage is that timeouts may occur depending on the amount of data processed. Small layout changes may be done in the report file. But when it comes to new parameters the code needs to be adapted, so the complete module needs to be re-deployed.