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

walmillard

Members
  • Posts

    49
  • Joined

  • Last visited

walmillard's Achievements

Contributor

Contributor (5/14)

  • First Post Rare
  • Collaborator Rare
  • Conversation Starter Rare
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  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
×
×
  • Create New...