Error while Running report with Report Parameters

0

Hi Team,

I have created a report with parameter called - CustometID

I want to pass this value to the where clause. So i have changed my SQL query as below :

SELECT * FROM JSW_LOCATION_MASTER WHERE ID_NO=$P{CustometID}

if I preview the report from Jasper Studio, Input controll is coming and after entering data, report is generated successfully.

After that I published the report in Jasper Server and created a Input Controll called - CustometID and mapped to report.

if i run report, its giving below error :

2018-02-21 23:21:20,166 ERROR AsyncJasperPrintAccessor,pool-6-thread-20:321 - Error during report execution
net.sf.jasperreports.engine.JRException: Error executing SQL statement for: CrossCheck
 
JRXML Gist link: https://gist.github.com/anonymous/85ee2e3ee09952b6d8f3d1875b51096a
Log file : https://gist.github.com/anonymous/55b56496b3df5b3b12d66cfb0b9688d0
 
 
Could you anybody please help me out. I facing this problem from couple of days.
 
Thank you.
 
Regards,
Naresh. Naredla
nareshbangaram24's picture
Joined: Feb 20 2018 - 11:25am
Last seen: 1 year 8 months ago

Could anybody please suggest me on the above error please...

Thank you :)

nareshbangaram24 - 1 year 8 months ago

Please help me somebody. Thank you.

nareshbangaram24 - 1 year 8 months ago

Cool, glad you could figure it out

 

joseng62 - 1 year 8 months ago

2 Answers:

1

Thnaks  joseng62 for replying.

I resolved it by specifying schema name before table name.

Thank you.

nareshbangaram24's picture
Joined: Feb 20 2018 - 11:25am
Last seen: 1 year 8 months ago
1

Hi Naresh. First of all I know how you feel, needing help and no one is answering. When I started my Jaspersoft journey, I made a promise to myself to assist Jasper Dev that started like me with answering question and passing over knowledge in the forums. 

Ok so you strack trace error is clearly SQL related. 

So your query is "select * from JSW_LOCATION_MASTER where ID_NO=$P!{CustometID}"  
First of all you tested the datasource connection your created ? 
2nd you assigned the correct data soure the report when deplying to JasperServer. 

Then are you planning on injecting SQL or building the SQL query as you are using $P! which is used in such case. If you just passing over a normal parameter value then  $P{CustometID}, would surfice. 
I would recommend adding a default correct Customer ID in the parameter expression section, just to test with. 

Then the CustometID input control data is it gotten from list or another query ? And is that setup correctly. 

Trouble shoot and test the report apart. First test report with default value, and declaring the input control as single select first. 
Then if that works more on to improve the import control data fill. 

Also to help troubleshoot sql queries. In jasperserver as admin, go to manage tab, then under log settings set SQL query executer to debug level and set Input control value queries to debug level. That would at least assist you with the SQL. 

joseng62's picture
732
Joined: Dec 5 2014 - 2:43am
Last seen: 2 days 18 hours ago
Feedback