Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Crystal Report Configuration Using xCP Designer 2.1
1. Abstract
This white paper explains how to configure Crystal Reports using
xCelerated Composition Platform (xCP) Designer 2.1 and how to
troubleshoot common errors while configuring Crystal Reports in
the xCP Designer2.1.
February 2014
Crystal Report Configuration
using xCelerated Composition Platform
Designer 2.1
3. 3Crystal Report Configuration
using xCelerated Composition Platform Designer 2.1
Table of Contents
Executive summary.................................................................................................. 4
Audience............................................................................................................................4
Introduction ............................................................................................................ 4
Steps to Configure Crystal Report............................................................................. 4
Create Crystal Report Artifact..............................................................................................4
Configure Data Sources in RPT file ......................................................................................5
Bind Crystal Report Widget to the Crystal Report Artifact.....................................................5
Steps to Configure Crystal Filters.............................................................................. 5
Configure Parameter...........................................................................................................5
Limitations with Filters .......................................................................................................7
Impact of Artifact Rename/Move.............................................................................. 7
Crystal Report Migration .......................................................................................... 7
FAQs on Troubleshooting......................................................................................... 8
I don’t get to see the XML and XSD files generated in the gen folder? .............................8
In Crystal Report designer “Verify Database” doesn’t update my table in the rpt file? .....8
I don’t see all records in Crystal Report...........................................................................8
Where do I get the logs for Crystal Report?......................................................................9
4. 4Crystal Report Configuration
using xCelerated Composition Platform Designer 2.1
Executive summary
This white paper explains the Crystal Report integration with xCP Designer® 2.1 and
how to configure and create Crystal Report using xCP Designer 2.1. The white paper
also explains troubleshooting steps.
Note: We vouch that the content in this document is accurate at the time of
publication. However, as information is added, new versions of this document may be
released to the EMC online support website. Check the website to ensure that you are
using the latest version of this document.
Audience
The audience for this white paper comprises personnel responsible for the designing
xCP application and using Crystal Reports for reporting. This document is intended for
internal EMC personnel, partners, and customers.
Introduction
In xCP Designer 2.1, Crystal Report design is changed to provide more flexibility to
users. Crystal Report is an artifact in xCP Designer 2.1. The user needs to create a
Crystal Report artifact and then add data sources to it. In 2.1, multiple data sources
are allowed to be added. Also its support has been extended to the following data
sources:
Historical Data Sources
Real time Query
Alert Query
Stateless Process
In xCP Designer 2.1, the way table gets added to the rpt file, has also been changed.
Now we make use of xml connections to bind the data source to the rpt file. For each
datasource bound to the Crystal Report artifact, an XML and XSD file would get
generated. xsd file contains the information on the datasource meta data ( column
names , type etc). xml file contains the elements of the xsd file with no data.
Steps to Configure Crystal Report
Create Crystal Report Artifact
In the xCP Navigator, under the Data Services tab, right click on the "Crystal Reports"1.
node to create a Crystal Report artifact.
Go to the "Sources" tab on the Crystal Report editor and add data sources to the CR2.
artifact.
5. 5Crystal Report Configuration
using xCelerated Composition Platform Designer 2.1
Save the CR artifact.3.
It will create an empty RPT file under CR artifact node.4.
Note: The rpt file is an empty file. One needs to open it and add the tables to it and
design the report.
Configure Data Sources in RPT file
Open the rpt file by double clicking on it.1.
It will open the RPT file in the Crystal Report native software called Crystal Report2.
designer.
Within Crystal Report designer, Go to Database->Database Expert3.
Create new connection using "Xml and web Services".4.
Select the XML and XSD files from "<xCP application5.
location>genmainresourcescrystalreport connections<cr namespace>".
<cr namespace> is the namespace of the application or project where Crystal Report
artifact is residing.
The format of the file name will be
<cr artifact name>_<namespace of the datasource>_<datasource name>
<namespace of the datasource> is the namespace of the application or project where
datasource artifact is residing.
Add the tables and design the report and then save it.6.
Bind Crystal Report Widget to the Crystal Report Artifact
Within xCP Designer, add a Crystal Report widget to the page.1.
Go to the properties editor of the CR widget2.
Specify the Crystal Report artifact and save.3.
Steps to Configure Filters
Configure Parameter
Crystal Report is not integrated with xCP user input filter. User has to use Crystal
Report inbuilt filter capabilities provided by SAP. Below are the basic steps to create
a filter in Crystal Report. For more details please refer to the SAP documents on “How
to create a Parameter and bind it to a column”.
Open the rpt file in Crystal Report Designer and create a parameter.1.
Open the parameter dialog and specify a default value. It is required to specify a2.
default value once you have created a parameter, otherwise Crystal Report won't work
at runtime.
6. 6Crystal Report Configuration
using xCelerated Composition Platform Designer 2.1
The default value can be based on your need.3.
Make sure "Show on( Viewer) panel is set to "Editable".4.
In the Crystal Report Designer pane, select the field , right click and "Select Expert5.
Record…" and add the formula based on your requirement. Below is an example of
the formula where default value used is 'all' to show all the customers.
(if({?custname} = 'all') then true
else {c11_customers_list.name} = {?custname})
Parameter panel in the Crystal report designer
Bind the field with the parameter:
7. 7Crystal Report Configuration
using xCelerated Composition Platform Designer 2.1
Limitations with Filters
No support for picklist values for input filter. Picklist will be treated as text field.1.
Date Field: Date values will be shown in UTC time zone. Conversion to browser time2.
zone needs to be taken care by user while designing the report.
The Stateless process bound to Crystal Reports should not have any process variables3.
as input type.
First all the records are fetched on the app server and then filter is applied.4.
Impact of Artifact Rename/Move
You must set the data source location and map the new XML and XSD files again in
the .rpt file if you:
rename or move a datasource
rename or move a Crystal Report artifact and make any changes in bound
datasources.
import any application and make any changes in the bound datasources.
If you do not see the new XML and XSD files then save the Crystal Report artifact. This
regenerates the XML and XSD files. To enable the save option for the Crystal Report
artifact, on the Sources tab, click Browse to select the data source again.
In the rpt file table name would still show the old name even after applying the new
mapping. You can rename the table manually in case you would like to do so.
Crystal Report Migration
xCP 2.0 applications having Crystal Reports, will be migrated smoothly into xCP
Designer 2.1. However below are few things to know:
User input filters designed on Crystal Reports in xCP 2.0 will not be migrated. User
will have to create filter as specified in section "Steps to Configure Filters".
The table name in the rpt file would still show as "dataSource" instead of showing
the actual data source name. However this will not create any problem and the
application will get deployed successfully and run without any problem.
In case user wants the table in the rpt file to match with the data source name, he
can do so by following the steps mentioned below:
In the Crystal Report designer, right click on the "dataSource" table in the
"Field Explorer" window on the right hand side. Select "Set Datasource
Location…"
Create new connection using "Xml and web Services".
8. 8Crystal Report Configuration
using xCelerated Composition Platform Designer 2.1
Select the XML and XSD files for the corresponding data source from
"<xCP application location>genmainresources<cr namespace>crystalreport
connections"
Once the table is mapping is updated, go to Database -> Database Expert.
Select the table on the right side and right click. Select the "Rename" option
from the popup menu.
User needs to Set Datasource Location… for the "dataSource" table in the rpt file
as specified above, in case he would like to make the following modifications to
the Crystal Report artifact or the bounded data source:
Add a new data source to the Crystal Report artifact, otherwise an error would
be shown in the "Problems" tab.
Delete a field in the data source.
Add a new field to the datasource to be added to the rpt file.
FAQs on Troubleshooting
I don’t get to see the XML and XSD files generated in the gen folder?
Make sure there is no error in the Problem tab for the files to be generated. Other
alternative is to save the Crystal report artifact again. This would re-generate xml files.
To enable the save for Crystal report artifact go to “Sources” tab and click on
“Browse” button.
In Crystal Report designer “Verify Database” doesn’t update my table in the rpt file?
Close and reopen the rpt file or use Database -> log off server option, so that latest
XML and XSD is picked up by Crystal Report designer.
In case it still doesn't show the latest data, this means the xml xsd files are
outdated. Follow the steps mentioned in FAQ point one.
If the problem still persists, then XML/XSD location or name would have been
changed as a result of Crystal Report or datasource rename or move operation as
mentioned in the section "Impact of Artifact Rename/Move". You need to update
the datasource location to new XML/XSD files.
I don’t see all records in Crystal Report
Depending on which is the data source Crystal report is bound to, the max no of rows
fetched for Crystal report differs:
Realtime Query/Alert Query: By default the maximum no of rows shown in Crystal
report is 1000. This can be configured in rest-api-runtime properties file. The
configuration parameter is “rest.paging.max.size”
9. 9Crystal Report Configuration
using xCelerated Composition Platform Designer 2.1
Historical Query: By default the maximum no of rows shown in Crystal report is
10000. This can be configured in bam properties file. The configuration parameter
is “bam.jdbc.preference.maxRows”
Stateless Process: The maximum no of records shown in Crystal report is 1000
and this is not configurable.
Where do I get the logs for Crystal Report?
There are no separate logs for Crystal Report. At design time xCP Designer log and at
runtime app server log configured in the application’s log4j should be referred.