Jump to content

mhbashar1

Members
  • Posts

    37
  • Joined

  • Last visited

 Content Type 

Forum

Downloads

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Events

Profiles

Everything posted by mhbashar1

  1. Is there any way to iterate through a loop in expression editor? I want to iterate through a String(delimited by comma) to show different part of the string in different way.But the problem is the part of the string is not known.Is there any way for looping jasper report?
  2. But brother the problem is that there can be more or less than 3 names in that field.So can I use- "First Name- " + "Md,Tanvir,".split(",")[0] + " Second Name- " + "nMd,Tanvir".split(",")[1] + "nLastName- " + "Md,Tanvir".split(",")[2] The output I want is that- First Name-Md Second Name-Tanvir last Name- In the last name there will be nothing.But I just want to display all the names but the names can be more than 3 or less.In this case,what can I do? With StringTokenizer i can just show the first token in the field with the following code- ""+new java.util.StringTokenizer(NameString,",").nextToken() How can I show the rest.Actually the name field has 6 part.The number of token is not known from before.Whatever the NameString is , I want to show all the tokens that is in dat string.If there is no token,it will show nothing, like- First Name-Md Second Name-Tanvir last Name- Surname- if there is last name and surname it will show them. Post edited by: mhbashar1, at: 2008/01/06 08:25 Post edited by: mhbashar1, at: 2008/01/06 08:50
  3. But brother the problem is that there can be more or less than 3 names in that field.So can I use- "First Name- " + "Md,Tanvir,".split(",")[0] + " Second Name- " + "nMd,Tanvir".split(",")[1] + "nLastName- " + "Md,Tanvir".split(",")[2] The output I want is that- First Name-Md Second Name-Tanvir last Name- In the last name there will be nothing.But I just want to display all the names but the names can be more than 3 or less.In this case,what can I do?
  4. I have a field which contains person's name like- Md,Tanvir,Hossain .Where the name is seperated by comma.But I want to tokenize this string to show this the follwoing way- "First Name-"+string.nextToken()+"Second Name-"+string.nextToken()+"LastName-"+string.nextToken() Can anybody pls tell me what code to write in expression editor for this.
  5. I have a field which contains person's name like- Md,Tanvir,Hossain ,where the name is seperated by comma.But I want to tokenize this string to show this the follwoing way- "First Name-"+string.nextToken()+"Second Name-"+string.nextToken()+"LastName-"+string.nextToken() Can anybody pls tell me what code to write in expression editor for this.
  6. Is there any way to fit my text according to my text field.I mean, I want the textfield to resize dynamically if the text is larger than it can hold.I want it to increase its(textfield) Height as needed.In my case,if the text is larger than the textfield area then some parts of text is missing.Cant it go downward in the textfield as needed?
  7. svenn wrote: 1. Set up a variable for the total 2. Set the calculation type to sum 3. Set the reset type to Report 4. Put you amount field in the variable expression Brother I think the most important part to say that the Total amount field has to be in the summary field.
  8. I cant add two variables which have got the following properties in a master report- 1.Name-totalPurchase Class type-java.lang.Double Calculation type-System 2.Name-totalSales Class type-java.lang.Double Calculation type-System 3.Name-grandTotal Class type-java.lang.Double Calculation type-Nothing I used the following line to add them in the grandTotal variable expression editor- $V{totalPurchase}+$V{totalProduction} but it says- The operator + is undefined for the argument type(s) java.lang.Double, java.lang.Double Can anybody help me?
  9. What is the difference between "print when expression" and "text field expression". What is used for what and HOW? Cud anybody give me an example
  10. Could anybody pls tell me what parameter to set both in master report and sub-report for the following query which is in master report- Code: SELECT DISTINCT purchase_date FROM purchase WHERE MONTH(purchase_date)=$P!{month} AND YEAR(purchase_date)=$P!{year} The value for $P!{month} and $P!{year} will be passed from my java app.There are two other sub-reports which also need these month and year parameter. I tried but failed,there is a little problem somewhere. PLS HELP ME.
  11. I have the following query in my master report- SELECT purchase_item,purchase_date FROM purchase Where MONTH(purchase_date)=$P{month} AND YEAR(purchase_date)=$P{year} where $P{month}and $P{year} is parameter for month and year respectively.Now how should I provide this month and year from my java application with Map collection.Can I do the following- Code: static HashMap <String,String> map=new HashMap<String,String>(); map.put("month",12); map.put("year",2008); JasperFillManager.fillReport(reportFile, map, jdbcConnection);
  12. I have a field $F{SUM(total)} and a variable-$V{grand_total}.I want to assign a value to this field.I did the following in the expression editor of the field. $V{grand_total}=$F{SUM(total)} But it gives the error-The left-hand side of an assignment must be a variable value = (java.lang.Double)(((java.lang.String)variable_total.getValue())=((java.lang.Double)field_SUM40total_price41.getValue()));//$JR_EXPR_ID=10$ How to do it.At the same time,I want to show the value in that Field.
×
×
  • Create New...