alexmarshall
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forum
Events
Featured Visualizations
Knowledge Base
Documentation (PDF Downloads)
Blog
Documentation (Test Area)
Documentation
Dr. Jaspersoft Webinar Series
Security Advisories
Downloads
Posts posted by alexmarshall
-
-
Hey everyone,
I need some help with the $P! syntax but you should probably have some context first:
I'm creating reports to which I'm passing Calendars as parameters which are reflectively bound to the report parameter map from my Spring form backing objects. I want to keep everything as Calendars because they're better for internationalizing my application and normalizing dates / times to timzones. That said, is there a good way of using the $P!{calendarTimestamp} syntax from within queries ? As I understand it, $P!{} essentially just calls .toString() on the passed object to get the text that's inserted into the query at run time and I want to be able to apply formatting for dates. Currently I'm creating extra parameters in my report with expressions like 'new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format($P{calendarTimestamp})' and inserting those strings into my queries using the $P! syntax. I find it a kludgy way of doing things and I was wondering if there's a better way to get date / calendar parameters into my queries ? I've looked and looked on Google and other forums for help with the $P! syntax but there just doesn't seem to be much out there. Can anybody here help ? Thank you kindly in advance.
Alex Marshall
Specification of a single style across reports
in Products
Posted