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.
-
Create
a new Java package for:
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.
-
Compile
TableListingReport.java to create class files.
-
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.
-
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.
-
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
-
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.