Skip to content
AEteve edited this page Oct 18, 2016 · 12 revisions

Welcome to the CAST ReportGenerator wiki!

ReportGenerator is a C# application developped with Visual Studio (master branch is 2015, 1.4.0 branch is 2013). It connects to the CAST REST API from CAIP (CAST Application Intelligence Platform - http://www.castsoftware.com/), and generate word, powerpoint or excel reports based on templates.

The deliverable is a signed setup.exe file that install the CAST ReportGenerator on your machine.

To start the project inside Visual Studio, right click on the project CastReporting.UI.WPF.V2 (in the solution explorer) and click on ‘Set as startup project’. You can now start the application.

Code Structure

Presentation (UI)

CastReporting.UI.WPF.V2 : The user interface

It uses XAML to define the screens, and the View-ViewModel philosophy.

CastReporting.Console

used to call the Report Generator by command line

Data Access

Domain [CastReporting.Domain] : contains the objects needed by the application DataObject : objects regarding the assessment (result, quality rule,….) and portfolio models (application, module, snapshot,…) WSObjects : objects regarding the application (connection, generated file path,…)

Mediation [CastReporting.Mediation and CastReporting.Mediation.Interfaces] : The layer calling the WebClient utilities to send request to the rest api.

Repository [CastReporting.Repositories and CastReporting.Repositories.Interfaces] : the link between the Rest API and the model The CastProxy is called by the CastRepository that contains the different url formats to send to the rest api, depending on the data to get. The CastRepository is used by the Business Logic Layer to populate the domain objects.

Business Logic

the process of datas that are needed to fill up the reports

CastReporting.BLL

The BLL objects contains the logic to populate the results for an application, a snapshot (and a previous one).The BLL logic is called by the console or the UI application to get at the beginning of the report generation.

CastReporting.BLL.Computing

Contains specific objects needed for calculation (DTO), and utility methods to complete the blocks processing.

Reporting : CastReporting.Reporting

The reporting layer is essentially composed in 2 parts :

  • The blocks processing
  • The office builder

Office Builder

This part is in charge to transform the data given by the block into the right place in the office document. It can be a Word or a PowerPoint document. This part is « black box » as it has been developped long time ago, and nobody change anything in it, as we don’t find bug in it. It is based on OpenXML technology.

Block processing

The mechanism get the blocks in the template file. For each block, it process the data needed to populate it. Block can be a string, a table, or a graph. Each block should construct a data table, that will be given to the builder, with its block type.

Each block is defined by parameters :

  • Type : text, table or graph
  • Name of the block
  • Optional parameters depending on the block

Each block correspond to a class into the block folder.

There are separated between Text, Graph and Table.

The block is independent from the format of the template (doc or ppt file)

Each block has a method content that return a string for a text block, or a data table for table and graph blocks, which will be called by the document builder

Simple example : text block ‘Application Name’

The ‘Block’ Annotation correspond to the name of the block, as defined in the component of the template file.

Templates

Templates are located in the folder : CastReporting.Reporting\TemplatesFiles

Templates are word or powerpoint files.

2 templates contains all possible blocks, also called components, and explain how to change parameters :

  • 1- Powerpoint-components-library.pptx
  • 2- Word-components-library.docx

The other templates are some example of report that can be done for the customer. The parameters of the blocks should be verify to match to what you want.

Setup

The setup is done using the tool « Innosetup 5 », this technology is easy to read and understand.

The definition of the setup is done in the file setup.iss in the folder Setup.

The setup install the application and the template files.