her1z.n1a.87 Posted April 10, 2017 Share Posted April 10, 2017 Hello, my name is Heri. I have been working with PHP. I really happy when discovered jasperxml. this class or framework really help to generate reporting with PHP since it is hard to create. i means JASPERXML has ireport designer so we can build some report page very easy and its also can combined with my MySQL Database. i have some question here. And really hope you can help me to solve it. 1. Can i set the today date with my own format? i have saw few tutorial about this. which easily set up the pattern alongside ireport but mine didnt work as example. for example i want to show Pontianak, 10 April 2017(today) from textfield. 2. i have some problem with hexadecimal view. so, one of my field from database called nik field type varchar (18). but it is view as hexadecimal type 6.1710354058E+15 it should be 6171035405800015 Link to comment Share on other sites More sharing options...
Ankur Gupta Posted April 10, 2017 Share Posted April 10, 2017 Hey,The solution to your issues are-1. Related to show today's date into desired format, once you are creating reports in iReport, you can simply write this expression to get this date 10 April 2017new SimpleDateFormat("dd mmm yyyy").format(new Date()) As soon as you have this expression in report, then this expression will give you the desired results. 2. Related to the second issue, you can use the number formatter.For instance if you do not want any decimal place, then either you can set a feild expression as ### or you can set it through a decimal format .for example new DecimalFormat("###").format(expresssion) Hope this helps. Thanks,Ankur Gupta Link to comment Share on other sites More sharing options...
her1z.n1a.87 Posted April 11, 2017 Author Share Posted April 11, 2017 i try to follow your solution mate. and i got this result. (BLANK PAGE) when i set its default expression with new java.util.Date() it showed me like this. am i wrong to adopted your solution? Thanks. Link to comment Share on other sites More sharing options...
Ankur Gupta Posted April 11, 2017 Share Posted April 11, 2017 Hey, you are probably on a correct path, just remember that new java.util.date() gives the current system time or in your case the phone server time that is why you are getting a vague formatted date. wgat you can do us that that create one mor parameter for the current date and via php code pass the current date and keep the parameter instead of the java expression inside ireport try try this out this should work my email id is ankur.gupta.aug@gmail.com cheers !! ankur gupta Link to comment Share on other sites More sharing options...
her1z.n1a.87 Posted April 11, 2017 Author Share Posted April 11, 2017 Still dont get it mate. Hihi. I can pass some database field contain with current date. But still the main issue is i cant change date format into what i want. And about hexadecimal things also still there. Link to comment Share on other sites More sharing options...
her1z.n1a.87 Posted April 18, 2017 Author Share Posted April 18, 2017 Hello Ankur,i have send you some email include some code written on it.do you have received mate?@ankurregards, Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now