Creating Your Own Report

Problem

You want to create a custom report in SAS Data Integration Studio.

Solution

You can create a custom report by using SAS Data Integration Studio software's plug-in functionality. The Java plug-in report can generate the content of the report by using SAS code, Java code, or both.

Tasks

Create a Report Category

Perform the following steps to add your own report category to the Reports window. Note that these steps create the Tables Report, which you can find in the table in the Reports window.
  1. Create a new Java package for:
    com.sas.reports
    that contains the file:
    TableListingReport.java
    The TableListingReport class extends an abstract class called AbstractReport. AbstractReport contains the implementation of the reporting plug-in interface called ReportingInterface. TableListingReport shows an implementation of only the mandatory methods that have not been implemented in AbstractReport. It is recommended that when creating a custom report to extend AbstractReport class. For an example of the TableListingReport, see Example Java Code for a Report Plug-in. For explanations of the methods in the report plug-in interface, see Reporting Interface Methods.
  2. Compile TableListingReport.java to create class files.
  3. Create a manifest file, called MANIFEST.MF, that describes your compiled classes, and add the following line to the MANIFEST.MF file:
    Plugin-Init: com.sas.reports.TableListingReport.class
    If you do not add this line to MANIFEST.MF, then SAS Data Integration Studio software cannot recognize this plug-in.
  4. Build a compressed JAR (Java ARchives) file (not an "executable" JAR file) that contains your compiled class files, and the MANIFEST.MF file. Before adding the manifest file to the JAR file, create a folder called META-INF, and put your manifest file in this folder. Now add the META-INF folder to your JAR file.
  5. Navigate to the folder called 'plugins' in the 'SASDataIntegrationStudio' folder. If SAS Data Integration Studio is installed in your Program Files, a likely path for the 'plugins' folder is:
    C:\Program Files\SAS\SASDataIntegrationStudio\4.2\plugins
    Once inside the plugins directory, create a new folder. You do not need to name the folder anything in particular. Add your JAR file into the folder that you just created. SAS Data Integration Studio software cannot find your JAR file if you just add it to the plugins directory, or if your JAR file is two or more directories deep from the plugins folder. You must put your JAR file inside a folder that you create in the plugins directory. If the name of the folder you created is 'reports', and the name of your JAR file is 'sas.reports.jar', then the complete path of this JAR file based on the previous example path, would be:
    C:\Program Files\SAS\SASDataIntegrationStudio\4.2\plugins\
    reports\sas.reports.jar
  6. Start SAS Data Integration Studio to populate the Reports window with the category that corresponds to your plug-in code in the JAR file that you created. If you do not see a report for your plug-in code in the Reports window, make sure the perspective in the Reports window is set to All in the drop-down menu in the Show field.
You can add multiple reports to your package. If you want to add multiple reports, compile class files for each report category that you want to create, and add the compiled classes to your JAR file. Modify the Plugin-Init line of code in your manifest file by adding each class, and separating each class by a semi-colon.