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

gpenn

Members
  • Posts

    8
  • Joined

  • Last visited

gpenn's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Matt, Would you mind explaining how that works? I have very little experience with iReport, but I'm learning my way around. The code you used was: org.apache.commons.lang.StringEscapeUtils.escapeHtml($F{CustomerName}) That looks like it's calling a utility located at commons.apache.org, which will escape problematic characters in $F{CustomerName}. You mentioned including an import satement in the Report so that the utility will be local. How do I do that? Thanks, Gregory
  2. Matt, Thanks for the tip. I'm out of town for a few days, but I'll try it out as soon as I get back. I would far prefer to change the string in the report rather than in the database. I have a question about how that works, which I'll post it to the thread you referenced for the sake of continuity there. Thanks, Gregory
  3. Thanks. I thought it might take something like that. Looks like I'll need to keep plowing through 'Learning MySQL' until I've figured out how to do find and replace operations. Thanks for your help, both of you.
  4. Matt, I'm sorry to say that I don't understand how to follow your suggestion. I just picked up a book on learning MySQL last week and I've only just made it through the installation and configuration on my personal computer. The database with which I'm having this problem uses a GUI client, which includes its own query builder. I haven't seen what it produces in the way of SQL. That said, I have determined that the ampersand is the issue. I took the ampersand-containing field out of my styled text field and put it in an adjacent non-styled field. That arrangement prints all records I've checked correctly, though the formatting is problematic. Does that answer what you were hoping to find with your instructions? I'm going to look into what would be invloved in upgrading to v3.6, but it's likely to be more than I can do with my limited experience. I know that the Specify Software Project modified iReport somehow to work with their database. I may be able to find out what those modifications are, but since I'm not a programer it's probably beyond me to implement them for the new version. Thanks, Gregory
  5. Does anyone know whether this issue effects more recent versions of iReport. I'm using v3.0.0 and probably can't upgrade anytime soon for reasons I'd be happy to discuss but won't bore you with unless you ask.
  6. I found a few posts regarding this issue, but no effective work-around. A find and replace operation on the data might do the trick, but I have a couple problems with that approach. First, I have no idea how to do it. Second, the use of ampersand characters in citing the authors of biological species is an established convention with which I need to be consistent. I can imagine two approaches that might work. One would be replacing all the ampersands in my data with some string that will print as an ampersand but not cause the same problem, like ASCII or something. Of course, the ASCII code for ampersand starts with an ampersand and iReport might not appreciate the somewhat recursive humor of that. Also, it'd be a real nuicance if the string didn't always appears as a simple ampersand in the database front end. The second approach would just be a work-around that'd suffice for my specific application. I don't need the data from the ampersand-containing text field to be styled, so I could put that data in a separate field. The problem with this approach is that I'd like to maintain consistent word spacing in the report, which I'd have no idea how to do between adjacent text-fields where the field on the left contains strings of varying length. Gregory
  7. Yes! I hadn't noticed, but that's the commonality. The ampersand in the data appears to determine which records will print with the style tags. I'll try to find the thread you mentioned and hope it mentions a work-around. Thank you! This has been plaguing me for weeks.
  8. I am a complete newbie to database reporting in general and iReport in particular. I'm working as a volunteer at a local community college where I've volunteered to help get the new database for the herbarium collection up and running. I know, but no one else has stepped up. We're using a version of iReport 3.0.0 modified for use with Specify (specifysoftware.org). The report I'm working on creates labels for specimens in our collection. Some records cause the report to print the formating tags '<style isItalic='TRUE'>' and '</style>' in the styled text field I use for the scientific name of the specimen. Not surprisingly, the text values of the fields prints without style between the style tags. Try as I might, I can't figure out why some records do this while most do not. The full text of the expression follows: ($F{Genus}!=null ? "<style isItalic='TRUE'>" + $F{Genus} + "</style>" : "") + " " + ($F{Species}!=null ? "<style isItalic='TRUE'>" + $F{Species} + "</style>" : "") + ($F{subspecies}!=null ? " subsp. " + "<style isItalic='TRUE'>" + $F{subspecies} + "</style>" : "") + ($F{variety}!=null ? " var. " + "<style isItalic='TRUE'>" + $F{variety} + "</style>" : "") + ($F{Author}!=null ? " " + $F{Author} : "") I don't know how to include in this post examples of records that do and don't print correctly, but I can do so if anyone feels like telling me how. Any ideas from just looking at the expression? Thanks, Gregory p.s. All other expressions in the label work fine on all records, but none of them use styled text. Post Edited by gpenn at 09/22/2009 20:21
×
×
  • Create New...