cancel
Showing results for 
Search instead for 
Did you mean: 

Jasper Ireports Compile error for SAP IDM 7.1

Former Member
0 Kudos

Hi ALL,

As per the document How to Create Reports with SAP NetWeaver Identity Management , on page 45, On Jasper Ireports 1.3.1 when we click on u201C read fieldsu201D on u201CReport Query u201C window , it prompts that MSKEY parameter have no default value.

When we put a default value say u201C 2008u201D for MSKEY , then read fileds on Report query works fine. However when we run the u201Cexecute with active connection u201C, we are getting following error.

##

Errors compiling .\HowTo.jasper.

net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:

1. Cannot cast from int to String

value = (java.lang.String)(2008);

<----


>

2. Cannot cast from int to String

value = (java.lang.String)(2008);

<----


>

3. Cannot cast from int to String

value = (java.lang.String)(2008);

<----


>

3 errors

at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:193)

at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:105)

at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:127)

at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:109)

at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:535)

at java.lang.Thread.run(Thread.java:534)

Compilation running time: 109

##

If we remove the default value say u201C2008u201D from the parameter MSKEY and run u201Cexecute with active connectionu201D, we are getting below error. Error: Please set a default value for the paramter 'MSKEY' in the report query

Please advice how to solve this issue

Regards

Sahad

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sahad,

I also got the same message while following that document... i ignored the message and ran the report, and it worked fine for me...

What value you are entering ? the error is for conversion from int to string... have you added " " " while entering the query or parameter value ?

Cheers !!

Zaheer

Former Member
0 Kudos

Hi Zaheer

I put the value 13 with out quotes now and I am getting a blank report.

I am using the query "SELECT ExtMSKEY, AttrName, ExtValue FROM MXUV_ENTRIES WHERE MSKEY=$P AND AttrName IN ('MXREF_MX_PRIVILEGE','MX_AUTOPRIVILEGE','MX_AUTOROLE') " When I am using a simple query like this "SELECT aValue as AVALUE FROM MXIV_SENTRIES WHERE (MSKEY=$P) ", it is not showing the report.

>nd ran the report, and it worked fine for me...

How you run the report? from Jasper ireports or from IDM UI?

Former Member
0 Kudos

Hi Sahad,

I ran the report from IReports, the MSKEY that i used had many roles and privileges assigned, so the report had data..(a lot of )

make sure that "17" MSKEY has roles / privileges assigned...

TIP: Use one of the existing Identity Store which has data

Cheers !!

Zaheer

PS: This tool is real adventure... you never know what you may face next 😛

Former Member
0 Kudos

Hi Zaheer

I have made sure that person having mskey=13 have lots of privileges assigned.

When I run the query in sql "SELECT ExtMSKEY, AttrName, ExtValue FROM MXUV_ENTRIES WHERE MSKEY=13 AND AttrName IN ('MXREF_MX_PRIVILEGE','MX_AUTOPRIVILEGE','MX_AUTOROLE'); "

it returned 324 rows.

So the query is working but still when I click on "execute with active connection" , it is giving blank report.

Have you done anything on page 46 of the configuration guide with topics like " 6.2.2.3 Library for Fields" and " 6.2.2.4

Add Information to your Report"

Former Member
0 Kudos

Nopes, i just did as it was in the guide.... i presume that you are not getting any compilation errors, or are you ?

Other thing is that, i already had kept iText 1.3.1 and other required JAR files in the JAVA_HOME library...

Cheers !!

Zaheer

Former Member
0 Kudos

Hi Zaheer

I was able to solve the issue.

I pull the 3 fields using drag and drop and placed it in the report. I put AttrName

ExtValue on details field and ExtMSKEY in Header. Now the report is working fine.

Thank you for the help.

Regards

Sahad

Former Member
0 Kudos

Hi Sahad,

Good to know that the issue got resolved...drag and drop vs band properties...

Cheers !!

Zaheer

Answers (0)