Jump to content
We've recently updated our Privacy Statement, available here ×

aypatel90

Members
  • Posts

    10
  • Joined

  • Last visited

aypatel90's Achievements

Apprentice

Apprentice (3/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. My report is working fine. But I want one modification: based on some condition, the background color of the table row should be changed. Now, as we know that table component is using its separate dataset (in my case). And I know that the thing which I want is Conditional Style but I am confused about how one can apply conditional style to subdataset or on the subdataset's field? I can use conditional style like this: <style name="BackgroundStyle" mode="Opaque" backcolor="#FFFFFF"> <conditionalStyle> <conditionExpression><![CDATA[boolean.valueOf($F{}.intValue() % 2 == 0)]]></conditionExpression> <style backcolor="#CCFFCC"/> </conditionalStyle> </style> <style name="BackgroundStyle" mode="Opaque" backcolor="#FFFFFF"><conditionalStyle><conditionExpression><![CDATA[boolean.valueOf($F{}.intValue() % 2 == 0)]]></conditionExpression> <style backcolor="#CCFFCC"/></conditionalStyle></style> How do I link to subdataset field?
  2. To dunialebah7: You can use $V{variable}[Report_Count] with above procedure to display the whole array.
  3. I have successfully created a report template which works fine for jdbc connection as datasource. Now I am using javabean as datasource and I have only one doubt with me. I have two bean classes Bean and Bean1. Now in Jasper reports when I use TextField like below it shows me an error Caused by: groovy.lang.MissingPropertyException: Exception evaluating property 'totalDays' for java.util.ArrayList, Reason: groovy.lang.MissingPropertyException: No such property: totalDays for class: Model.Bean1 The Textfield Expression is <textFieldExpression><![CDATA[$F{list}.totalDays]]></textFieldExpression> I have also tried with $P{list}.totalDays by passing arraylist in map to main report's parameter like this map.put("List",list); but it failed... The two bean classes are.... public class Bean implements Serializable { private String employeeName; private List<Bean1> list; public Bean(String string, List<Bean1> list) { this.employeeName=string; this.list=list; } public List<Bean1> getList() { return list; } public void setList(List<Bean1> list) { this.list = list; } public Bean() { } public void setEmployeeName(String employeeName) { this.employeeName = employeeName; } public String getEmployeeName() { return employeeName; } } And the Bean1 looks like public class Bean1 { private String toatlDays; private String workingDays; private String presentDays; private String absentDays; private String dummyData; public Bean1(String string2, String string3, String string4, String string5, String string6) { this.toatlDays=string2; this.workingDays=string3; this.presentDays=string4; this.absentDays=string5; this.dummyData=string6; } public Bean1() { } public String getToatlDays() { return toatlDays; } public void setToatlDays(String toatlDays) { this.toatlDays = toatlDays; } public String getWorkingDays() { return workingDays; } public void setWorkingDays(String workingDays) { this.workingDays = workingDays; } public String getPresentDays() { return presentDays; } public void setPresentDays(String presentDays) { this.presentDays = presentDays; } public String getAbsentDays() { return absentDays; } public void setAbsentDays(String absentDays) { this.absentDays = absentDays; } public String getDummyData() { return dummyData; } public void setDummyData(String dummyData) { this.dummyData = dummyData; } }
  4. You should not use emptydatasource. It will give you null only. Try using JRBeanCollectionDataSource....
  5. Which version of ireport you are using I am not finding the path above in my ireport 5.5.0 version.
  6. Hello everyone. I have a list of beans. for reference public static Collection<BeanWithList> getDataSource() { Collection<BeanWithList> coll = new ArrayList<BeanWithList>(); BeanWithList bean = new BeanWithList(Arrays.asList("London", "Paris"), 1); coll.add(bean); bean = new BeanWithList(Arrays.asList("London", "Madrid", "Moscow"), 2); coll.add(bean); bean = new BeanWithList(Arrays.asList("Rome"), 3); coll.add(bean); return coll; } Now I am passing this list to jasper report by putting it into map(map.put()) and I have also created a parameter with same name and class type in main jasper report. so now if i want to set my textfield value according to this. Is tit possible with jasper report? for first textfield value shd be firstbean.bean property for second textfield value shd be firstbean.second property
  7. Hello everyone. I have create a report in which I have put a teble component with page break element in detail band. I want to break that table data into two pages(each having 10 records) so I set page break element given below. <break> <reportElement x="0" y="121" width="555" height="1" uuid="a1f18713-9c4a-4b85-adcf-08172b3508d6"> <printWhenExpression><![CDATA[$V{REPORT_COUNT} % 10 == 0]]></printWhenExpression> </reportElement> </break> Still it is not getting break. I have used jdbc connection.Moreover I have attached my jrxml file.
  8. I do have the same problem. Have you find the solution for this?
  9. Thanks for your help. By checking the box ignore pagination providing me to cover the whole report into single page. But now I want to loop over it. Like I want to display that report number of times(1 report on 1 page) which is equal to the number of beans which i have in collection. Can you please provide me an idea about it?
  10. Hello everyone. I am using ireport 5.5.0 to design a report with jdbc connection. In my report I have static fieds in page header and page footer section. And one table component in detail band. Now problem is that when the database table have more than 22 records the rest of records gets printed in next page. Which looks very ugly. I want to print the table having 31 rows on a single page only. I have attached my jrxml file...
×
×
  • Create New...