Jump to content
We've recently updated our Privacy Statement, available here ×

Error while Running report with Report Parameters


nareshbangaram24
Go to solution Solved by nareshbangaram24,

Recommended Posts

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}[/code]

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 executionnet.sf.jasperreports.engine.JRException: Error executing SQL statement for: CrossCheckJRXML Gist link: https://gist.github.com/anonymous/85ee2e3ee09952b6d8f3d1875b51096aLog file : https://gist.github.com/anonymous/55b56496b3df5b3b12d66cfb0b9688d0Could you anybody please help me out. I facing this problem from couple of days.Thank you.Regards,Naresh. Naredla[/code]
Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

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. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...