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

walmillard

Members
  • Posts

    49
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by walmillard

  1. If you want to print all the <det> level data you would set your xpath to/order/det/det or ./order/det nItem is an attribute of <det>. so to inspect it you need to use @nItem eg ./oder/det[@nItem != null] luck W Post Edited by walmillard at 03/07/2011 23:02
  2. Do you know the Condition ahead of time or is it based on the data? Each report data element (inc subreports) have a "print when expression" that have be set to a Boolean condition to include or exclude the element from the report. Boolean.TRUE will print it Boolean.FALSE will exclude it. the code will print $F{MyField} only when it has the value 1. Post some example data? Code: Post Edited by walmillard at 01/31/2011 05:20
  3. If you set the background colour of all the objects you are printing to a colour you can see, you should be able to run the report again and see which object is causing the page break. Once you find the object it should just be a matter of resizing it so it dosent cause a blank page. GL W Post Edited by walmillard at 01/30/2011 23:52
  4. Your output table is unclear. However if you Group the elements you want to print it should be quite ezy to print the attributes of each person in squad order. You could set your xml datasource to /teams/squad/person Then have Squad "name" with a description of ../@name and have person "name with a description of /@name and the other attributes "field1" "field" and "field" are defined similarly. Set the Group Expression to the name field of the respective element. If you want to print all the duplicated data in the example then it may be a bit more tricky W
  5. the first line has markup="none". This $F{} has no style settings. It is unformatted text. Plain. Ordinary. Without any distractions. the second line has makeup="styled". This $F{} has Hence these 2 elements should i believe print exactly the same output in a pdf. Given that they are printing exactly the same XML data element. And they have no other settings. but yet in the 2nd PDF i get "+amp;" printed in the 1st line, while the other lines appear correct. All i want is to print the first line in plain text and the last line bold.
  6. What i want is the to print correctly regardless of the content. No. I do not want them to produce the same output. I simply want I want the XML data to print correctly when there is I want the XML data to print correctly when there is no I do not want 1 solution for and +amp; and another solution for non . In the 2nd pdf the first line is a problem. The rest of the report looks exellent. But that first line, where there is no is prining the +amp; delimeter instead of the &
  7. I ran exactly the same report with your solution: First +amp; NAME It is wrong because when it is parsed with and without Applying your proposed solution merely reverses the result.
  8. Hi, Yes. i read what you have written. Yes i understood your proposed solution. I actually ran the example AGAIN and i will post it. I also understand you have dismissed this issue with what i find to be an unacceptable solution. I can say there is a broken XML parser in because i can produce 100% errored reports 100% of the time with 100% correct and Valid XML data. Please see StyleBugv2.PDF attached.
  9. Teodor, The content of the text field is valid XML. That is why it printed correctly in the very first line. It is not until an element with "is styled text" is encountered that there is a problem. The Parameters that were printed are correct because they are not passed thru your broken iReport XML passer. They are declared within the report. The second line is the issue as you say. It is indeed the result of a styled text parsing failure. this is the bug. However if the content of the text field was not Valid XML as you say how can it possibly print perfectly in the very first line unstyled? Or is this also an error? Your solution will require me to add "is styled text" to everyone of my report elements when and amp; is escaped and passed in the data. as well as catching the XML and post processinging it somehow so it will print correctly. Just to add "bold" to the customer name... unfortunately that is not an option.
  10. Hi, Please see attached Jrxml iReport 3.6.2. this report has a xml datasource also attached. the file contains only 1 Field. First $amp; Name The report has a Query Text xPath of simply "/". However to see what i think is the first issue you need no data. On the Report there are 2 Data elements printed. 1 is a internal Parameter $P{} the other is the above Field $F{}. Both are printed with Markup=none and Markup=styled so you can clearly see the inconsistency.
  11. sorry for all the edits i can get the dam $amp; not to print as only &.
  12. Hi, When i use styled text in a text field the "&" a reserved character in XML is replaced with "$ amp;[without the space this forum is replacing the amp; with just ampersand]" using JRStringUtil.xmlEncode(String) as you suggest. This all works perfectly and prints correctly and has done for a number of years in plain data field elements. The issue is that all the following XML styled formatting is lost and appears as raw XML when This is NOT the case using a plain text element. It only appears using a data field element from an xml datasource (i havent tested others). All my Data Elements are passed to the dataSource having all Reserved characters removed, ampersand, less-than, greater-than etc. Otherwise as you know you would get an error in the Log BEFORE the pdf is created. This is not the case. Again the issue is not the inclusion of "&". the ampersand is delimited and is printed AND IT PRINTS CORRECTLY AS AN "&" without tags. the issue is with When i add a String Parameter or Variable to the Report, and use the Default set as new String("Marks & amp;[delimited correctly] Spencer") it prints exactly as "Marks a mp; Spencer" as it is declared. HOWEVER when i change the Field element Markedup = "Styled" it prints as "Marks & Spence" with the ampersand ONLY... not & amp semi-colon. this i beleve is core to the bug. Even tho the Field has ZERO formatting simmilary when i use a ${Field} element from my datasource is is Printed with the & and the "&" dosent ever appear regardless of the Markedup value. I can provide Examples if you would like to see this in the Lastes iReport 3.6.2. thankyou for your reply. Wal Millard
  13. Are you embedding the <style> tags or are you setting the font properties using the ireport controls? ie Attention <style pdfFontName="Helvetica-Bold">Customers</style> will print "Customers" in Helvetice-Bold regardless of the iReport font settings used to print Attention. ensure you have the "Is styled text" setting checked. Note also that "MS Windows" fonts are slightly astray from other platforms. luck
  14. You might find if you set your $P{} "Default Value Expression" value to your test path so that it will, when combined with the string part make up the whole absolute path correctly the right clicking will work. iReport will check the file name given in the subreport expression with the relative root of the master report then with the absolute path of the master report. Becuase you use a sundirectory in the string part (of the path to your subreport) this will fail in your case. i use a similar expression however my $P{} is the whole path. so while you may need something like "c:\\projects" (or what ever comes before "/templates") to make an absolute path. i only need an empty string ie "" and iReport finds my subs. luck! ALSO NOTE "\\" is the delimited MS Windows separator "\" or backslash. You may need to check that if you are running on Non Windows OS. Post Edited by walmillard at 09/29/2009 02:18 Post Edited by walmillard at 09/29/2009 02:19 Post Edited by walmillard at 09/29/2009 02:23
  15. You could, if they are mutually exclusive print them like this. $F{Address}!=null?$F{Address}:$F{Addr} this will print Address if it is not null otherwise it will print $F{Addr}. Your report must know when datasource1 is active? You could also use a varable or a parameter to swap the fields withing the element. ie $V{DS1}.booleanValue()?$F{Address}:$F{Addr} DS1 is set to TRUE when you have Datasource1 active. You would need some logic to set this. Also you could have a variable $V{THE_ADDRESS} then assign it something like this... $F{Address}!=null?$F{Address}:$F{Addr}!=null?$F{Addr}:null then just use the $V{THE_ADDRESS} on your report. NOTE if they are both null u will still get a null. Ofcourse if your SQL returns a value into $F{Address} or $F{Addr} that is not a vaild addres, and is not null either, then you will need to check for that content instead of null... say when its an empty string. luck! Post Edited by walmillard at 09/29/2009 00:12 Post Edited by walmillard at 09/29/2009 00:13
  16. Matt, Thanks for your reply. I will post a bug report on the JasperReport tracker. Cheers Walmillard
  17. Try adding a null condition to the output... in the case below the Field element will print the value of the COMP varable in case of CAT_PERC_1 == null $V{CAT_PERC_1}==null? new Double($V{COMP_PERC_1}.doubleValue()): new Double($V{COMP_PERC_1}.doubleValue() + $V{CAT_PERC_1}.doubleValue()) Luck! Code:$V{CAT_PERC_1}==null? new Double($V{COMP_PERC_1}.doubleValue()): new Double($V{COMP_PERC_1}.doubleValue() + $V{CAT_PERC_1}.doubleValue())
  18. I have a Field CustomerName that contains an & character which is delimted in the XML data to & The CustomerName data displays correctly in the report EXCEPT when it is printed as part of a <style> tag set. IE "<style pdfFontName=\"Helvetica-Bold\">Customer : </style>" + $F{CustomerName} The Customer Data prints ok including the &. But then the <style> tags etc are visible in the report. Its almost like the & breaks the <style></style> tag set? The Field on the report has the "Is Styled Text" box checked. But makes no difference. Removing the <Style> tags all prints OK. See attached. the xPath for the xml data file is /data I have posted in the iReport forum those guys sent me here. Thx WalMillard Code:"<style pdfFontName=\"Helvetica-Bold\">Customer : </style>" + $F{CustomerName}
  19. Here are my files. the xml xPath is /data as u can see the green field breaks the <style></style> tags when the "&" field follows. will post over in the other forum. Cheers Walmillard Post Edited by walmillard at 09/23/2009 01:00
  20. I am wondering if this (bug??) has been addressed: I have a Field CustomerName that contains an & character which is delimted in the XML data to & The CustomerName data displays correctly in the report EXCEPT when it is printed as part of a <style> tag set. IE "<style pdfFontName=\"Helvetica-Bold\">Customer : </style>" + $F{CustomerName} The Customer Data prints ok including the &. But then the <style> tags etc are visible in the report. Its almost like the & breaks the <style></style> tag set? The Field on the report has the "Is Styled Text" box checked. But makes no difference. Removing the <Style> tags all prints OK. Code: I get an Error on "Filling Report" which is: [Fatal Error] :1:73: The entity name must immediately follow the '&' in the entity reference. Perhaps it is in my Jasper lib not in iReport? [edit] Simply checking the " Is Syled Text " box will cause the Fatal Error! Post Edited by walmillard at 09/22/2009 05:29 Post Edited by walmillard at 09/22/2009 06:19
  21. Check the "Evaluation Time" of the field. also if your xml data is /some/data/name and the other names are in /some/other/name then u have a deeper issue. You might want to post some files? .jrxml and .xml data? Luck! Post Edited by walmillard at 09/17/2009 05:09
  22. Each Field element has an "Evaluation Time" property that will determin the value printed. The classic example is PAGE_NUMBER. If you have 2 fields Both Printing PAGE_NUMBER you set one to "Now" to print the current page and the other to "Report" to print the total number of pages hence you can print Page 1 of 100 using the same variable with different evaluation times. So you would need to declare variables to hold the current page and total and set the "Reset Type" then use these in your evaluation. Sould be doable. Also the "summary" band prints once as the last page of a report. Luck!
  23. You could make the band Height that the Field element is in (Detail?) the same Height as the Feild. This would remove much of the witespace between each row. Luck!
  24. If your page is white and the elements on your page a all white it is impossible to determin where the limit of the element boundry is and where the text within the element finishes. Setting the bacground color of the Static text elements and/or Field elements that are on your report you will see EXACTLY where each is finishing and where each break a page. You can also change the size and shape of the Field elements. Add some Bands to the report and set the "Split Allowed" properties to reflect where you report elements should be grouped and where they should all break into a new page together. Luck
×
×
  • Create New...