Error while creating adhoc view reports in jaspersoft

Document ID : KB000005154
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

"An error occurred while creating the connection. Try again." is observed when creating Ad Hoc reports like below:

Jasper_error_2.PNG

Environment:
Spectrum 10.1.2 integrated with CABI 6.1
Cause:
  1. CR_user does not have privileges
  2. Jasper Repository spectrum_domain_ds does not:
    1. use CR_user
    2. point to the Spectrum Report Manager (SRM Server)
Resolution:

Part 1. Assign privileges to CR_user from Spectrum Report Manager (SRM) as below:

  1. Login to Spectrum Report Manager, from command prompt, navigate to $SPECROOT/mysql/bin running the below command:
    • cd $SPECROOT/mysql/bin
  2. Now, login to mysql by running the below command:
    • mysql.exe –uroot –proot 
  3. Assign all privileges on to the user CR_user as below:
    • grant all privileges on *.* to 'CR_user'@'<CABI Hostname or IP address>' identified by '0n3cl1Ck';
    • Example:  grant all privileges on *.* to 'CR_user'@'testserver.xyz.com' identified by '0n3cl1Ck'; where testserver.xyz.com is the CABI 6.1 hostname, the below screenshot provides another example:
    • grant_privilege.png

Part 2. Point Jasper Repository spectrum_domain_ds to the Spectrum Report Manager and change the user to CR_user 

  1. From browser (preferably Chrome), login to Jasper Console as superuser
  2. Navigate to View >> Repository >> Organizations >> spectrum >> capability >> datasources
    • The below screenshot provides the view of the same:
    •  domain.png
  3. Right click on spectrum_domain_ds data and click on Edit, or click spectrum_domain_ds and click on Edit beside Run
  4. In "Set Data Source Type and Properties" page, make sure:
    1. Host is set to the <SRM server hostname>
    2. username is set to CR_user
    3. password entered is 0n3cl1Ck
  5. Perform "Test Connection"
  6. On success, click Save.

Note: 

  • If performing the "Test Connection" (Step 5) fails, try providing the FQDN (Ex:hostname.domainname.com) of the CABI Server while assigning privilege to CR_user mentioned in Step 3 under Part 1
Additional Information:

For Spectrum release 10.1.1, please refer:

http://www.ca.com/us/services-support/ca-support/ca-support-online/knowledge-base-articles.tec1612786.html

 

https://docops.ca.com/ca-spectrum/10-1-and-10-1-1/en/managing-client-applications/report-manager/generating-ad-hoc-reports