Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Open Source Projects
Search Coderanch
Advance search
Google search
Register / Login
Win a copy of
OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830
this week in the
Programmer Certification
forum!
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
Tim Cooke
Liutauras Vilda
Jeanne Boyarsky
paul wheaton
Sheriffs:
Ron McLeod
Devaka Cooray
Henry Wong
Saloon Keepers:
Tim Holloway
Stephan van Hulst
Carey Brown
Tim Moores
Mikalai Zaikin
Bartenders:
Frits Walraven
Forum:
Other Open Source Projects
Need help in jxls
Philip Zac
Ranch Hand
Posts: 66
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hello folks,
I am using OpenReports and I have to create new report using excelSheet. I have put this code in it but it shows error. How do I fix it.
<jx:forEach items="${rm.exec('select c.first_name, c.last_name, rn.room_name, rs.check_in_date , rs.check_out_date, (DATEDIFF(rs.check_out_date,rs.check_in_date)) periodOfStay, (rs.adult_pax + rs.child_pax) pax, sum(rd.amount) as amount, sum(pta.element) as tax, pta.mapkey, rs.reservation_id, rs.id from posting_tax_amount as pta, posting as p, rate_details as rd, room_night as rn, room_stay as rs, customer as c, reservation as r where pta.mapkey LIKE ('Luxury Tax%') and pta.posting_id=p.posting_id and p.posting_id=rd.posting_id and rd.room_night_id = rn.id and rn.reservation_status = 'Re-Confirmed' and rn.deleted_date IS NULL and rn.room_stay_id = rs.id and rs.check_in_date >= ' “ + $P{startDate1}+ “ ' and rs.check_in_date <= ' “ + $P{endDate1} + “ ' and rs.check_out_date between ' “ + $P{startDate1} + “ ' and DATE_ADD( ' “ + $P{endDate1} + “ ', INTERVAL 86399 SECOND) and rs.reservation_id = r.id and r.customer_id = c.id group by rs.id; ')}" var="log">
Error message.
* Cant parse an expression rm.exec(select c.first_name, c.last_name, rn.room_name, rs.check_in_date , rs.check_out_date, (DATEDIFF(rs.check_out_date,rs.check_in_date)) periodOfStay, (rs.adult_pax + rs.child_pax) pax, sum(rd.amount) as amount, sum(pta.element) as tax, pta.mapkey, rs.reservation_id, rs.id from posting_tax_amount as pta, posting as p, rate_details as rd, room_night as rn, room_stay as rs, customer as c, reservation as r where pta.mapkey LIKE (Luxury Tax%) and pta.posting_id=p.posting_id and p.posting_id=rd.posting_id and rd.room_night_id = rn.id and rn.reservation_status = Re-Confirmed and rn.deleted_date IS NULL and rn.room_stay_id = rs.id and rs.check_in_date >= ? + startDate1+ ? and rs.check_in_date <= ? +endDate1 + ? and rs.check_out_date between ? + startDate1 + ? and DATE_ADD( ? + endDate1 + ? , INTERVAL 86399 SECOND) and rs.reservation_id = r.id and r.customer_id = c.id group by rs.id; )
Thanks in advance.
Philip
Martijn Verburg
author
Posts: 3285
13
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Have you tried to run the SQL manually in the DB?
Cheers, Martijn,
Twitter
.
I'm not dead! I feel happy! I'd like to go for a walk! I'll even read a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Performence issue:Write query directly in session bean or call storted procedure
How to access Map contents in jsp page
Converting subqueries into JOIN ON
How to make a JOIN without a directly mapped entity?
java code inside sql functions?
More...