I'm designing a jasper report with the field type & text field type as double.
When run the jrxml file using jasperreports4.7.jar for excel format,
it'll add a single quote in numeric columns.
so i can't do any numeric manipulation in excel.but same is working fine in jasperreports3.jar.
is anyone facing the same issue?
pls help me
What you need to do is to define the field you want to print as an Integer or Double. (You must set your Report to java)
If I do not know yet what type of field is comming I am making, lets say 3 fields, one String, one Integer, one Double. Then I pass the info the what it is dynamically to another -meta-field.
In the designer I lay all 3 fields over each other. Seems to work.
Related
I am trying to get a numeric value of my firebird sql query.
In IBExpert the data types are correct "Numeric(18,2)" but when it comes to FastReport it displays me not the Numeric18,2 datatype. It cuts the ,00 off.
Anybody who can help me?
Your data is retrieved properly, you need just to display it well formatted.
Set the display format of the text box as described in documentation.
If the text box contains different formats for multiple values you need to use inline formatting for each value.
In crystal report 10, under field explorer menĂ¹, every "string" source fields have relatives "Memo" fields. What are the differences between these two type of fields ?
Because in some report the "string" field is truncated and i must use the relative "memo" type to see the entire content of that field. But i don't know why. Can anyone help me to understand the diffenreces of these two type of fields and when i have to chose one insted of other.
Thank's
I believe in the past, the text functions in Crystal were limited to strings with a length less than or equal to 255 Characters, unless you were checking for nulls
Crystal introduced Memo fields to get around this limitation. So with the memo data type you can perform searches and manipulation on strings greater than 255 characters in length.
Like vice said, if you use sql datatype text or varchar(>255) Crystal Reports, (or at least CR 2013) will treat it as a memo
I'm only adding my answer because I found another difference. You cannot group by memo fields.
I am using iReport 4.5.1. Using cross-tab with measures of different data-types namely date and double data-type. Problem is while exporting report in excel, execl gives warning as number stored as text. I cannot handle this in SQL query. I have tried using property in jasper report. But this property has no effect on excel report. I have seen other posts on stackoverflow.com, none of them matches with this requirement.
To display date data-type i have used in measure expression as,
$V{COL1}.equals("FSI") ? new SimpleDateFormat("dd.MM.yyyy").format(java.util.Date($V{COL2Measure}.toString())) : new Double(Double.parseDouble($V{COL2Measure}))
It displays date properly in execl without any warnings. But after type-casting to double still it shows warnings in excel report for numbers. Also Expression class is "java.lang.String". I cannot change it to number or double beacuse date type does not works.I changed expression class to "java.lang.Object", then it gives error in while type casting to Double that be applied to Object.
Any help on this would be greatly appreciated.
I am currently developing a website, asp.net 4.0 using crystal reports, I can view the report perfectly etc, however when trying to create parameters in the report I am unable to select or even view TEXT type fields in my database table when selecting a field to create the parameter from. Selecting string or integers etc work fine, but all TEXT type fields arent even visible.
Any ideas as to why this may be? I need to add a parameter from a TEXT field as we want to limit the results to all messages which contain a certain phraze, and that message is stored in a sql database as a TEXT type.
You have to convert Text type into varchar(max) and then it will be show.
Otherwise you have to add Custom Parameter field and read this value into the parameter and this parameter will drag on your report design page.
You will need to create a parameter that is a 'String' type.
Next, cast your TEXT value to different type using a SQL Expression:
//{%converted_text}
(
cast( TEXT AS varchar2(255) )
)
You may need to adjust the syntax (I'm using Oracle's).
Finally, reference each in the record-selection formula:
{%converted_text} = {?text_prompt}
I have a text field that displays 3 parameters with different formats. It has a Date value, a BigDecimal value and a value that has to be displayed using percentage display.
Can I use a single text field for this or do I have to use one text field for each to have the correct format for each?
You have a few approaches, presuming it is one of the three parameters you want to display in the same location:
Use three different fields and a PrintWhenExpression for each parameter.
Convert the different fields to a single String variable, with appropriate formatting, and then a single field for that variable value.
The second approach is probably the most applicable for your task. For the conversions, look at:
BigDecimal.toString()
SimpleDateFormat
String.sprintf
See also:
Java: Literal percent sign in printf statement