• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Report will Not Read Parameters

 
Ranch Hand
Posts: 2206
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am calling JasperReport from a servlet. I am sending two strings as parameters. The report fails and returns this message:

SystemOut O 5/1/2008
SystemOut O 5/5/2008

SystemOut O net.sf.jasperreports.engine.JRException: Error preparing statement for executing the report query :

Select ftdatem, task, webprddt6.resmngt3.projindex, jobno, assigned, hours2, remhours From webprddt6.resmngt3 Join webprddt6.resmngt2 On webprddt6.resmngt3.projindex = webprddt6.resmngt2.recseq Join webprddt6.resmngt3b On webprddt6.resmngt3b.taskindex = webprddt6.resmngt3.recseq Where deptno = ? And ftdatem >= ? And ftdatem < ? Group By ftdatem, task, webprddt6.resmngt3.projindex, jobno, assigned, hours2, remhours Order By ftdatem

This is my Select string:

Select ftdatem, task, webprddt6.resmngt3.projindex, jobno, assigned, hours2, remhours From webprddt6.resmngt3 Join webprddt6.resmngt2 On webprddt6.resmngt3.projindex = webprddt6.resmngt2.recseq Join webprddt6.resmngt3b On webprddt6.resmngt3b.taskindex = webprddt6.resmngt3.recseq Where deptno = $P{deptno} And ftdatem >= $P{sd1} And ftdatem < $P{fd1} Group By ftdatem, task, webprddt6.resmngt3.projindex, jobno, assigned, hours2, remhours Order By ftdatem
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you have correctly named <parameter> tags for all three of the parameters?
 
Steve Dyke
Ranch Hand
Posts: 2206
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. I have tested this every way I know how and no success. I changed the two parameters in the SQL statement to hard coded strings and ran the report with to fields to display the two parameters I am sending and it looks like the values are getting to the report okay. However, tt looks like the SQL statement doesen't interpret the parameters correctly. Thanks for helping me figure this out.
 
reply
    Bookmark Topic Watch Topic
  • New Topic