on 06-15-2016 10:05 AM
Hi everybody,
has anybody an idea, how to realize this: "+new SimpleDateFormat("MMMM yyyy").format($P{MONTH_YEAR} -28)
in CR?
based on this java I think: new java.util.Date()
rgds
Eberhard
Hi Eberhard,
Below is the explanation for the code :
"+new SimpleDateFormat("MMMM yyyy").format($P{MONTH_YEAR} -28)
It is try to display the date in 'MMMM yyyy' format after manipulating MONTH_YEAR by reducing 28 days.
so, formula would be :
Totext((Month_Year)-28,"MMMM yyyy")
Thanks,
Sastry
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Eberhard,
The formula which you have written is correct, I have searched IF condition in Jasper and see below example :
$F{column_value}.intValue() == 42 ? "Life, Universe, Everything" : "Naught"
Then the variable's value would be "Life, Universe, Everything" if, and only if, the integer value of $F{column_value}
is equal to 42
This I got it from below URL :
jasper reports - doing comparison if else in JasperReports - Stack Overflow
Thanks,
Sastry
Hi Eberhard,
I cannot say for certain what that piece of Java code does, however, it seems to me that it displays dates in a particular format - in this case MMMM yyyy.
The CR alternative for that would look like this:
ToText({Date field}, 'MMMM yyyy')
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Eberhard,
Simply insert the Date_Actioned field as a Column in the Crosstab.
Next, highlight that date field > Group Options > Where it says 'The column will be printed', choose 'For Each Month' from the drop-down.
To display the month names, go to the Crosstab Expert again > highlight the Date field in the column > Group Options > Options tab > Check 'Customize Group Name field' > Click 'use a formula as group name' and click the formula button beside it > Add this code:
totext({Date Actioned}, 'MMMM')
-Abhilash
Hi Abhilash,
tks, I think it´s not my day today, sufferung from yesterday´s dentist still
the whole report should look like this:
In jasper I have one main and 4 sub reps, which are not linked (no parameters), so I just insert 4 subs into 4 different details sections in the main report with the corresponding crosstabs in the header of the sub as I did now according to your instruction, right?
And then later I just add the chart.....This should be it?
rgds
Eberhard
Yes, you're almost correct.
The Crosstab is set to display by month, however, the chart only seems to display a specific month.
If the chart is supposed to display only a specific month, you'd need another crosstab with just that month's data. You can then insert a chart off of this crosstab and suppress the section that holds this new crosstab.
-Abhilash
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.