Developers Guide - Web Report Generator

Execution Steps

Inputs

  • A Template created in one of the Supported Document Formats conforming to Supported Template Syntax.
  • A Connection String in order to connect to a DataBase that can be accessed through DataSet / DataTable etc
  • Type of Data Source. For example, Table / Views etc
  • Data Source. Select a table / view from the connected DataBase

System Processing

  • Verifies Template Document Format.
  • Connects to MS SQL Server Database using connection string
  • Tests Connection according to the provided connection string.
  • Populates all Tables from connected database.
  • Populates all Views from connected database.
  • Allows to enter Custom Query.
  • Passes Template and Data Source to the GroupDocs.Assembly - GroupDocs.Assembly generates a report according to the inputs
  • Serves the report back to the browser

Output

  • A Report generated based on the Template Syntax and the Data Source - This report will be in the same Document Format as that of the source Template Document Format.

Here is a sample report in Microsoft Word Document Format for ‘Products’ table

Code Walkthrough

//<![CDATA[ function debug() { } // ]]>//<![CDATA[ // ]]>//<![CDATA[ // ]]>//<![CDATA[ // ]]>//<![CDATA[ // ]]>//<![CDATA[ Cloak.closeHTML = “<img src=\'/download/resources/net.customware.confluence.plugin.composition:toggle-cloak/img/navigate_down_10.gif\'/>”; Cloak.openHTML = “<img src=\'/download/resources/net.customware.confluence.plugin.composition:toggle-cloak/img/navigate_right_10.gif\'/>”; Cloak.toggleZone = true; Cloak.memoryDuration = 0; Cloak.memoryPrefix = “contentId:34439193”; Cloak.memoryPath = “/"; // ]]>.cloakToggle { cursor: pointer; }//<![CDATA[ // ]]>//<![CDATA[ // ]]>//<![CDATA[ Deck.memoryDuration = 0; Deck.memoryPrefix = “contentId:34439193”; Deck.memoryPath = “/"; // ]]>

Default.aspx.cs

ReportGenerator.cs

Technical References

Creating Templates

An Example Business Case

Note: This business case covers almost all the Supported Data Formats