Introduction to User defined reports

advertisement
White Paper
For
User Defined Reports
[CCS 10.0]
Introduction to User defined reports
User defined reports provides an ability for user to create and register his own report template
(New Template created in Crystal reports 2008 (.RPT file)) with system and he should be able to
generate the processed report through CCS 10.0 system. It also provides the ability to export
existing report templates and update their template definitions with modifications to layout and
formatting.
The prerequisites for designing predefined reports are:

Crystal Reports 2008 SP1 installed

Control Compliance Suite 10.0 installed (Fresh Install or Upgraded from CCS 9.0.1)

Be able to access the Reporting database on SQL Server using either Windows or SQL
Server authentication.

Reporting database is populated with information required for report.
Typical Layout of CCS reports
Logo
User can add a company logo with recommended size. The maximum size is 44x42 pixels at 72
DPI resolutions. The logo file can be of .jpg, .png format.
Report Header
Report header should contains the information specific to the report definition itself like report
name, description. This information should be such that it should not be repeated on all the
pages.
Grouping and Formulas
Formulas should be used only when it is necessary. This indirectly affects report performance.
Grouping should be providing on the fields for which the data can be grouped. For example IP
Address is unique to the computer. If report has a list of IP address and user creates group on it
then it does not make sense. But if computers are grouped based on location, department then
it provides valid field for grouping
Details Section
Detail section is the place where user can provide list of records in tabular form.
Report Footer
Report footer can be used to information like copyright information, page number etc.
Using Crystal Reports 2008 SP1 to create User-defined reports.
The following step illustrates the general flow for creating user defined reports:
1) Connect to Reporting database using Crystal Reports 2008 SP1.
2) Verify access to Reporting database through Crystal Reports 2008 SP1.
3) Add tables to report from reporting database depending on report requirements.
4) Link those tables using Crystal Reports 2008.
5)
Specify parameter on the report and define record selection formula
6) Register report with CCS 10.0 system
Each of the above steps is detailed below:
Setting up Crystal Reports 2008 SP1 Environment for creating User defined reports
1. Connect to Reporting database using Crystal Reports 2008 SP1.
1. Create a new report with Crystal Reports 2008 SP1.
2. In the Database tab, select Set Data source Location…
3. Update the source with the new database server information.
2. Verify access to Reporting database through Crystal Reports 2008 SP1
Click Database - > verify to check the database.
3. Add tables to report from reporting database depending on report
requirements
Add the required tables in to the report through database expert provided in Crystal
Reports 2008 SP1.
For more information on tables in Reporting database please refer a document on Reporting
database schema in the references section.
Click Database -> Database Expert
4. Link tables using Crystal Reports 2008
Verify the link between the selected tables. The reporting database tables are
described in the Reporting Database Documentation. For example if your report
supports assets and Standard business objects then you should link reportjob table with
vAssets on AssetId column and reportjobstandard to vStandard on StandardId and
standardversion column.
Select the fields for the report.
Add grouping of required as shown below.
Select the filters, if required
5. Parameter Usage
On the View menu, click Field Explorer.
Tip: Another way to do this is to click the Field Explorer button on the Standard Toolbar.
The Field Explorer dialog box appears.
1. Select Parameter Fields and click New.
The Create New Parameter dialog box appears.
2. Enter a name for the parameter in the Name field (up to 255 alphanumeric characters).
3. Select the appropriate Type from the list.
Note: When creating a parameter whose Type is either Date or DateTime, you can
change the date format to suit your needs.
4. From the Value Field list, select a value.
5. Click Actions, and select Append all database values to move all of the applicable values
to the Values area.
This example will enable the user to choose from any of the values. If you want to limit
the selection, manually enter only the values that you would like the user to choose
from.
6. Click OK.
7. Return to the Field Explorer dialog box, and drag the parameter onto your report.
The Enter prompt values dialog box appears.
Note: If you don't want to see the parameter field you dropped in your report, place it in
a section you can suppress, such as a report header or footer.
Tip: You don't need to drag the parameter onto the report if you plan on referencing it
in a conditional formatting formula or a selection formula. If you have set the parameter
options to Editable or Read only on the Parameter Panel, using the parameter in a
formula will automatically activate it on the panel.
6. Creating Formulas
Formulas in crystal can be used for modifying, combining, calculating new data using
the single or multiple columns that are in the report.
To create a formula on the field explorer right click and select new.
A window will open up as shown below. You can add your custom formula in that. You
can also select the field from the data source or from the existing filed in the report.
While creating a formula user should use the “iscurrentversion” column of the reporting
database views to get the latest results for any entity.
Save the report after the requisite formulas have been defined.
7. Registering User defined reports in CCS
Please refer to the CCS 10.0 product documentation for details on this process.
CCS 10.0 Business Object specific Parameter information
This section specifies the list of predefined and mandatory parameters that must be
present on a user defined template for the particular business object.
Asset or Asset Group:
Parameter Name
Description
AssetJobID
This parameter will be set to a unique identifier value to be used for
joining assets related data tables in the CSM_Reports database with
the ReportJob table in the CSM_Reports database.
AssetGroup
This parameter will take the ID of the asset group which will be
present in the scope of the report
Folders
This parameter will take in the ID of the folder in the asset system
that needs to be used as scope in the report
ReportRunBy
The name of the user who executed the reporting job for this report
ReportRunDate
The date on which the reporting job was run for this report.
Standards:
Parameter Name
Description
StandardJobID
This parameter will be set to a unique identifier value used to join
standards related tables in the CSM_Reports database with the
ReportStandardJob table in the CSM_Reports database.
ReportRunBy
The name of the user who executed the reporting job for this report.
ReportRunDate
The date on which the reporting job was run for this report.
For reports that combine Assets and Standards business object the user will have to specify all
parameters that are mandatory for the Asset business object as well as those mandatory for the
Standard business object.
The ReportRunBy and ReportRunDate parameter must appear only once on the report.
Entitlements Control Points:
Parameter Name
Description
ControlPointType
The display name of the control point type for e.g. symcwnt-file.
Status
The status of the control point
DataOwner
The owner of the control point.
Tags
The tags associated with the control point.
EntitlementsControlPointJobID
This parameter will be set to a unique identifier value to be
used for joining assets related data tables in the
CSM_Reports database with the ReportJob table in the
CSM_Reports database. This parameter is a part of the
filter set definition XML that is used to filter out control
point types.
ReportRunBy
The name of the user who executed the reporting job for
this report.
ReportRunDate
The date on which the reporting job was run for this report.
AssetGroup
The asset group to be used as scope in the report
Folders
The folders that will be used as scope in the report.
Entitlements Review Cycles:
Parameter Name
Description
CurrentOrSnapshotted
This parameter will determine whether the scope of the
report contains the current review cycles or does it contain
snapshot review cycles.
Status
The status of the review cycle
ReviewCycleID
The ID of the review cycle.
ControlPointType
The display name of the control point type for e.g. symcwnt-file
DataOwner
The owner of the control point.
Tags
The tags associated with the control point.
EntitlementsReviewCycleJobID
This parameter will be set to a unique identifier value to be
used for joining assets related data tables in the
CSM_Reports database with the ReportJob table in the
CSM_Reports database. This parameter is a part of the
filter set definition XML that is used to filter out control
point types.
ReportRunBy
The name of the user who executed the reporting job for
this report.
ReportRunDate
The date on which the reporting job was run for this report.
AssetGroup
This parameter will take the ID of the asset group which will
be present in the scope of the report
Folders
This parameter will take in the ID of the folder in the asset
system that needs to be used as scope in the report
Policy:
Parameter Name
Description
PolicyJobID
This parameter will be set to a unique identifier
value to be used for joining policy related data
tables in the CSM_Reports database with the
PM_PolicyUser table in the CSM_Reports database.
ReportRunBy
The name of the user who executed the reporting
job for this report.
ReportRunDate
The date on which the reporting job was run for this
report.
Create New Reports for CCS 10.0 by Example
To create a template for Standards Module it will require the following parameters.

StandardJobID

ReportRunBy

ReportRunDate
(Refer to the CCS 10.0 Business Object specific Parameter information section given above)
Add all the above parameters to the report template.
Link the parameter StandardJobID with JobId column of ReportStandardJob table.
(ReportStandardJob.JobID)
You can link the parameter with table column from
Reports tab -> Select Expert -> Record
Save the report template.
Business object specific table linkages
Business Object
Asset
Standards
Entitlement Control Point
Entitlement Review Cycle
Policy
Parameter Name
AssetJobID
StandardJobID
EntitlementsControlPointJobID
EntitlementsReviewCycleJobID
PolicyJobID
Table Link
ReportJob.JobId
ReportJobStandard.JobId
ReportJob.JobId
ReportJob.JobId
PM_PolicyUser.JobId
Creating a user-defined report using assets
You can follow these steps to create an asset-based report:
1. The asset input selection is available in ReportJob table
2. Join the ReportJob table with the vAsset using fields AssetID and Assetversion, and
vAssetAttributelookup views to return all the asset attributes.
3. Join with the vStandardCheckResults view to return all of the checks against which
this standard is evaluated.
4. Add isCurrentVersion = 1 as record selection formula for all of the views to return
the current values.
Creating a user-defined report using standards
You can follow these steps to create a standard-based report:
1. The standard input selection is available in the ReportJobStandard table.
2. Join the ReportJobStandard table with the vStandardChecks view, using fields
StandardID and StandardVersion, to return all of the check attributes.
3. Join with the vStandardCheckResults to return all of the checks against which this
standard is evaluated.
4. Add isCurrentVersion = 1 as record selection formula for all of the views to return
the current values.
Creating user-defined reports using policies
You can follow these steps to create a policy-based report:
1. The policy input selection is available in the PM_PolicyUser table.
2. Join the PM_PolicyUser table with the vPolicy view, using fields PolicyID and
PolicyVersion to return all of the check attributes.
3. To return the mapping between control statement and various controls, you should
use the following views:

vPolicyStatementToCheck

vPolicyStatementToQuestion

vPolicyStatementToEvidenceProvider
4. Add isCurrentVersion = 1 as record selection formula for all of the views to return
the current values.
Reusing CCS Templates for User defined reports.
You can reuse the existing CCS 10.0 report templates. User has to export the pre-defined report
template and modify it in Crystal Reports 2008 SP1. The modified templates can be registered as
a new template to CCS 10.0 system using Add/Update template functionality (Provided the
template contains all the mandatory parameters for the selected business objects).
User can add it as a new template or can update an existing template (Please refer to
the CCS 10.0 product documentation for details on this process)
References.
1. Please refer to CCS 10.0 User Guide for more details on Reporting Database Schema design.
(Under Section “About the Unified Data Model”)
Download