Skip to content

rmittraining/CounterCompliance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents

Counter Compliance implementation

This is RMIT Training's Open Source implementation of Counter Compliance server for Release 4.

Includes

  1. Web Service
  2. Sushi implementation
  3. Support for formats like CSV, TSV and HTML
  4. Ability to customise to your choice using XSLT files provided
  5. Ability to connect to your live data using your custom SQL Queries or any other data source.

Getting Started

Download and Compile

  1. Download project from github to “C:\Temp\”. If you choose another location then change “C:\Temp\” to download location in web.config files of CounterReports and SushiService projects
<add key="Sushi.CounterXsltFolder" value="C:\Temp\RMIT.Counter\Libraries\Reporting\Reports\Xslt" />
  1. Open solution in visual studio and compile it.
  2. Make sure it compiles without any errors.

View CSV, TSV and HTML Counter Reports

  1. Click and run CounterReports web project (Ctrl + F5)
  2. Select Report_Format to HTML
  3. Select Report_Template to JR1
  4. Click Generate Report
  5. It will display the report as HTML.
    • Please note as this is sample data, we are serving same report data always.
    • User Authentication is authorized if ID is 123ABC and customer name is guest.
    • We encourage you to add your data and authentication logic.
    • Therefore changing date range or username will not produce different report. 1 Change the Report_Format to CSV or TSV and also change the Report_Template to other report type and try to submit the form again and wait until download dialog pops up.
    • You can add additional formats by adding new XSLT files

Retrieve Sushi reports with sushi client

  1. Run Sushi Service project (Ctrl + F5)
  2. Navigate to http://localhost:54676/SushiService.svc and make sure service is running
  3. Now run Sushi client (Ctrl + F5). It would open a windows form
  4. Click on invoke service button and it would display sushi report for JR1
  5. Change the report definition name from JR1 to JR5 or MR1 or BR1 or BR2 and invoke service again.
  6. Report Response window will display appropriate result.

Customisation

Custom authentication and Authorization

AuthorizationAuthority.cs class inside the project Sushi, under Libraries folder is responsible for providing authorization. Navigate to this class and add Custom Authorization. Currently, its sample data with username: “guest” and Id: “123ABC”.

Using your Data

This project uses Sample data from Data folder to produce Counter and Sushi reports. However, it can be change by updating ReportDataBase.cs class's GetDataset() method. You can connect your data and start producing Counter Compliant reports. ReportDatabase.cs class is in Reporting class library project under Libraries folder. Navigate to the GetDataset() Method and start adding different SQL Query/StoredProcedure for different reports (Jr1,Jr5 etc). SQL Query or StoredProcedure added make sure it return appropriate dataset. Dataset’s data must conform to XML Schema file (.xsd) in Data folder.

For e.g. jr1 sql query must return dataset same as JR1.xsd in Data folder.

Project Structure

Applications Folder

Applications folder Contains following applications

  • CounterReports : Asp.net 4.5 WebApi/MVC web application. It presents counter reports in html, csv and tsv format.
  • Sushi Client : Windows Form application that calls Sushi Service (WCF Service) and displays counter reports in sushi xml format
  • Sushi Service : it is web applications that host the WCF Service.

Data folder

  • Contains Sample xml data to be used to produce counter reports

Libraries folder

  • Library : class library contains commonly used classes
  • Reporting : class library contains implementation for counter reports generation
  • Sushi : class library that contains Sushi Authentication and Sushi Service partial implementation
  • Sushi Core : class library that contains Sushi Service complete implementation with WSDL

Tests folder

We use NUnit for testing framework and NSubstitute for Mocking framework.

  • Unit : contains testing code for Unit tests to test smallest possible source code
  • Integration : contains Integration tests to test more than Units

Dependencies

Authors and Contributors

Thanks to RMIT Training's contributing developers

Support

Please log any support queries as issues. As this is open source effort, we will provide support as best efforts.

About

An implementation of Counter Compliance server for Release 4

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published