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

goompas

Members
  • Posts

    24
  • Joined

  • Last visited

goompas's Achievements

Explorer

Explorer (4/14)

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

Recent Badges

0

Reputation

  1. Use scriptlet in subreport. Then you have acces to JasperReport object representing subreport. public void beforeReportInit() throws JRScriptletException { try { JasperReport report = (JasperReport) this.getParameterValue("JASPER_REPORT"); } catch (Exception e) { } }
  2. I have problem with ireport 3.5.2 and 3.5.3. That same report in 3.5.1 work but in these versions, report generate without detail band. All fields on bands tittle, columns headers, etc display but report dont display detail band. I dont have any "print when expression". Is something changed betwen these versions? All reports that i made or modify in 3.5.2 => haved this bug Edit [solved] with change jasperreports lib from 3.5.0 to 3.6.0 Post Edited by goompas at 09/01/2009 11:53
  3. Thanks niik for answer I think that is good idea and try it.
  4. Hello I have question about dynamic setting colors . Is there possible that textfield or any other element have dynamic color? I dont think about conditional styles. I have object that have fields value and color. MyObject: Double value; Color color; Now i wanna attach field color to property backcolor or forecolor of textfield. Is this possible? I know that i can make conditional style using filed color, but what when color is any rgb combination? I see that JasperReport not allow set color using variables or fields, only string. I can make this expression in conditional style $F{bean}.getColor().equals("red") then in this conditional style set color to red, but what i should do when color is any rgb combination?
  5. Thanks, i try this but here is another problem. I need in one cell 2 textfields and border betwen. As we can see in attachment html3 (in red circle) there is empty space betwen cell border and textfield border. Next textfield dont stretch height cell and i have another empty space (in green circle). Can You help me with this? Edit Anyway, i make this work another way. Thanks for looking at this issue. I know now that problem is add 1px space betwen textfields and cells in html. Post Edited by goompas at 06/03/2009 08:53
  6. This problem appear when i make border on textfields. In ireport show that textfield fill whole region, but in html output its make 2 differetns borders. One from textfield and second from region where textfield is. I remove paddings but nothing changes. In attachment You can see report without borders and paddings(i test too with lef padding 1px). In attachment we see that betwen regions in header are white spaces but textfields in ireport fills whole band.
  7. Yes, i use ireport 3.5.1 and jasperreports 3.5.0 I write first thred here http://jasperforge.org/plugins/espforum/view.php?group_id=83&forumid=101&topicid=57767 Post Edited by goompas at 06/02/2009 10:11
  8. Hello I make report with crosstab. In pdf its look fine as in screen Problem is with html, you can see it in second screen. I attach report too. I make textfields fills all zones but it seems that these zones in html have widht and height bigger. When i view html source i see: <tr> <td style="width: 1pt; height: 1pt;"></td> <td style="width: 50pt; height: 1pt;"></td> <td style="width: 9pt; height: 1pt;"></td> <td style="width: 1pt; height: 1pt;"></td> <td style="width: 19pt; height: 1pt;"></td> <td style="width: 26pt; height: 1pt;"></td> <td style="width: 60pt; height: 1pt;"></td> <td style="width: 60pt; height: 1pt;"></td> <td style="width: 60pt; height: 1pt;"></td> <td style="width: 174pt; height: 1pt;"></td> <td style="width: 1pt; height: 1pt;"></td> <td style="width: 39pt; height: 1pt;"></td> <td style="width: 35pt; height: 1pt;"></td> </tr> and next after each row <tr> <td style="width: 60pt; height: 1pt;"></td> </tr> But what is this? I dont have in report 1pt spaces. Post Edited by goompas at 06/02/2009 09:43
  9. Hello I make report with crosstab. In pdf its look fine as in screen Problem is with html, you can see it in second screen. I attach report too. I make textfields fills all zones but it seems that these zones in html have widht and height bigger. When i view html source i see: <tr> <td style="width: 1pt; height: 1pt;"></td> <td style="width: 50pt; height: 1pt;"></td> <td style="width: 9pt; height: 1pt;"></td> <td style="width: 1pt; height: 1pt;"></td> <td style="width: 19pt; height: 1pt;"></td> <td style="width: 26pt; height: 1pt;"></td> <td style="width: 60pt; height: 1pt;"></td>[/code] <td style="width: 60pt; height: 1pt;"></td> <td style="width: 60pt; height: 1pt;"></td> <td style="width: 174pt; height: 1pt;"></td> <td style="width: 1pt; height: 1pt;"></td> <td style="width: 39pt; height: 1pt;"></td> <td style="width: 35pt; height: 1pt;"></td></tr>[/code]and next after each row <tr> <td style="width: 60pt; height: 1pt;"></td></tr>[/code]But what is this? I dont have in report 1pt spaces. Post Edited by goompas at 06/02/2009 09:33
  10. Hello My question is, that jasperreports can iterate vertically and horizontaly in one report? I have javabean datasource that look like this List<MyClass> Where MyClass look like this public class MyClass { MyObj[] MyObj = null; public MyClass(MyObj [] MyObjArray) { this.MyObj = MyObjArray; } public MyObj[] getMyObj() { return MyObj; } public void setMyObj(MyObj[] MyObjtArray) { this.MyObj = MyObjArray; } } As look i have list of arrays and now i wanna iterate list horizontally and vertically iterate array, something like this lista.get(i)[0] lista.get(i)[1] lista.get(i)[2]
  11. Thanks for answer Is there any way to change dynamicly color of textfield element to any rgb? I know that can use styled text, but then numbers fields i must declare as string and when export to xls, excel dont see this numbers as numbers but strings.
  12. Jasperreports is free to use, yours exporters people must buy, i they dont wanna promote you.
  13. Hello Why i cant set forecolor and backcolor of element after filling ? page = (JRPrintPage) pages.get(i); elements = page.getElements(); List modifiedElements = new ArrayList(); if (element instanceof JRPrintText) { JRPrintText modifiedElement = ((JRPrintText) element); modifiedElement.setForecolor(Color.BLUE); modifiedElements.add(modifiedElement); } page.setElements(modifiedElements); Why this dont work? What should i do?
  14. Thx for answer Yes i know that and try that, but i dont wanna have numbers as Strings and styled text dont work in excel. I need have it as Double, Integer, Bigdecimal(numbers) because later i export raport to xls and need that excel see it as numbers, not strings. Post Edited by goompas . at 04/03/09 06:32
  15. Primary: I need change dynamic color of textfiled that type is java.lang.Double(BigDecimal, only number not String). These color i get from datasorce as field. Raport structure is like this: A B C D E F G ... 1 1 1 1 1 1 1 1 ... 2 2 2 2 2 2 2 2 ... 3 3 3 3 3 3 3 3 ... .. Every point can have different color, that is stored in object from field. I cant i conditional style setting forecolor use this formula $F{value}[0].getColor() It can be only like this: #33FF33 Im only need set dynamicly forecolor or backcolor in conditional style and this color cant be static because i get it together with field. I try too this: List jpages = jasperPrint.getPages(); System.out.println("pages size " + jpages.size()); for (int i = 0; i < jpages.size(); i++) { JRPrintPage page = (JRPrintPage) jpages.get(i); List elementy = page.getElements(); System.out.println("lista elementow strona " + i + " elementow " + elementy.size()); for (int j = 0; j < elementy.size(); j++) { // JRPrintElement element = (JRPrintElement) elementy.get(j); System.out.println("page " + i + " element " + j); JRTemplatePrintText text = (JRTemplatePrintText) elementy.get(j); System.out.println("get forecolor " + text.getForecolor()); System.out.println("text backcolor"+text.getBackcolor()); Color color=new Color(255,0,255); text.setMode(JRElement.MODE_OPAQUE); System.out.println("color "+color); text.setForecolor(color); text.setBackcolor(color); System.out.println("po zmianie forecolor "+text.getForecolor()); System.out.println("po zmianie backcolor "+text.getBackcolor()); } } but this text.setForecolor(color); text.setBackcolor(color); dont work for me, its dont change color. And here is another question: can i from jasperPrint get elements of report rom by key? Like getElementByKey() ? sorry for my english but i think you understand :) Post Edited by goompas . at 04/02/09 08:55
×
×
  • Create New...