Direct Reporting workflow

Libraries of imbACE and imbSCI package offer wide range of reporting utilities, available at several layers of the framework.

Reporting workflow titled Direct Reporting utilizes imbSCI.Core’s declarative data annotation pattern (imbAttribute) and high-level Object(s)-to-Data conversion extensions. This approach is the best choice in a situation when you want to:

  • publish data from an object or collection of objects in self-documented spreadsheet files (Excel) with minimum coding and customization
  • document your report with plain-text descriptions of columns & properties
  • importable to software environments like: Excel/Calc, R Studio or IBM SPSS
  • make “granular” reports, meant for user that will explore its directory structure with basic OS file browser

Direct Reporting workflow, using imbSCI and imbACE libraries

Let’s consider example below:

[cc lang=”csharp” tab_size=”3″ lines=”20″ width=”1000″] DataTable midt = record_moduleImpact.GetDataTable(null, “Module impacts”);

midt.AddExtra(“The last benchmark metrics entry [” + imbAnalyticEngineManager.index.experimentEntry.CrawlID + “] inserted on ” + DateTime.Now.ToLongDateString() + ” / ” + DateTime.Now.ToLongTimeString());

midt.GetReportAndSave(imbAnalyticEngineManager.index.experimentEntry.sessionReportFolder, imbAnalyticEngineManager.authorNotation, “fra_modules_impact_”.add(fileprefix, “_”));
[/cc]

The record_moduleImpact property is a class inheriting the DataTable generic type wrapper class (imbSCI.DataComplex) objectTable<T>. The objectTable<T> provides seamless storage, thread safe read/write and DataTable/DataView way to query instances of the T class, using well-known Filter Expression strings. Its method GetDataTable(DataSet, String) creates a  regular DataTable object (midt), populated with data from the contained instances (btw. objectTable<T> automatically maps all writable public properties of the generic type T). Then, we use one of many imbSCI.DataComplex extension methods: AddExtra(String) to add a line of textual information about the data in the table.

And finally we create a spreadsheet report using GetReportAndSave(folderNode / DirectoryInfo, aceAuthorNotation, String) extension method call. By default settings, it will create three files:

  • Excel spreadsheet with two worksheets: data and legend

In subdirectory “data” (relative to the specified folder), it will create:

  • “Clean data” export in CSV format, having only one header row at beginning of the table
  • Text file (markdown) with meta information on each DataColumn of the DataTable

Let’s take a look on the Excel report first:

Main worksheet of the created Excel report

By default configuration, the first three rows it writes: Category name, Caption of the column and Unit of measure. Cell format here is set according to the settings in imbAttribute declared to the corresponding properties of the class. Below is screen capture of the Legend worksheet, that contains more data annotations – derived from imbAttributes and the DataTable reported. Note that content of the row 26 is actually text line we added with .AddExtra() extension method.


Update: New Excel formatting options are available now (with: imbSCI nuget package 0.1.2.35)

New report formatting options (imbSCI 0.1.2.35)

Spread the love