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

Smig

Members
  • Posts

    23
  • Joined

  • Last visited

Smig'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. That solved it. Thanks! I was assuming both were printed because the page footer band was being printed in the last page of my report, but I guess that was because I deleted the last page footer band. The software is more clever than I thought ;) Even though I solved the problem, if someone knows how to make that check, post here. Then I would avoid duplicating information in the report's design.
  2. But then they would both print on the last page right? The page footer and the last page footer. In order to hide or show stuff, I'd need to get the last page number on a "print when expression" field.
  3. Thank you for the suggestion. The problem is that I need this particular information in the same band as other things that need to repeat on every page. If not, it should at least be on top of those, so I could put it in the last page band if it was on top of the page footer band but I don't know if I can change the order of the bands.
  4. I want to print a value only on the last page but I want to put it on the page footer band (unless I could change the band order which I don't think I can). In order for it not to print in every page, I need an expression in "Print When Expression" that will be true only on the last page. Something like "this_page==last_page". I know I can get the actual page number with $V{PAGE_NUMBER}, and I can get the total pages with the same variable but setting the "Evaluation Time" of the text field, to "Report". So, how can I get this variable inside an expression returning the value with a different evaluation time than the default (which is "Now", I presume)? Or are there other ways to do what I want to do?
  5. Nevermind. I learned how to send the recordset over so I'm now able to work on the query in anyway I want outside of jasper.
  6. Hi there! Is there a way to send the entire SQL query as a parameter? I'm using iReport. The SQL query is working. Now I cut/paste it to a new parameter and I put the parameter alone as the report's query. When compiling I get this exception: java.sql.SQLException: Line 1: Incorrect syntax near '?'. Is there any way to do this? I need to pass a complex query with more or less unions depending on the user choices.
  7. Hi there. I ended up solving my issue with stretching and making things move relative to that to their position in the second page. About your issue, you should start a new topic if you need more help. What I do is select the text field and set the property "Stretch with overload" to true. That should make it continue to a new page. Note that if you're doing this in a band that's supposed to repeat in a new page, it's going to return an error because of an infinite loop. Use a band that doesn't repeat every page. This was another error I was doing. Other objects whose positioning you want to push down with the stretched one need their position to be set to "float" instead of "fixed". This is what I used to solve my problem.
  8. When I need a report with no data on, where all dynamic content is sent through parameters, I set the property "When no data" to "All sections, no detail" and I use a band like the header to design the form. This has always served me well for single page reports but now I need a 2 page report (which will be front and back of a paper when printed) and I can't figure out how to design 2 pages in the same report. I need the preview or the resulting pdf file to contain 2 pages that will be formated differently. It's not just text stretching to the other with overflow, it's a new set of text fields and image fields altogether. Any ideas?
  9. I ended up solving this so in case someone stumbles on this with the same questions, what I did was to use the page header and summary bands. Then I had to set the option "Summary with page header and footer" in iReport, or the header wouldn't display on the second page. There's probably some better practice than this but it's working as expected now.
  10. This is probably very simple to solve but I didn't figure out how. I'm doing a report without any records, it's only a form that I fill with parameters that I send from my Java application. I did this before successfully, I just put everything on the title or page header band and choose the option to show all sections except detail when there's no data. The problem is that, this time, the data that I'm putting on that form will span to multiple pages. Now, if I want to have a page header to repeat through the report, and another band with the data that's coming from the parameters, what band should I use for that? If I use the detail band, since there's no records, it won't show. If I put them in a header band, it will throw an exception for an infinite loop as it tries to repeat the data that fills more than one page in the second page.
  11. mdahlman: Yes, I was refering to band properties. I think it's important for all the data in iReport to reflect the options that were set. ge0ffrey: If you're changing the xml file directly you need to know what the exact units that xml file accepts but that's why there's iReport in between. As it converts units when creating a new document for example, it surely can also convert them while displaying them in the band properties page and elsewhere. My point is, if I explicitly set the default unit, I expect to see all measure values inside iReport in that unit.
  12. Actually, I've ended up solving this issue. If there's anyone else facing this problem here's what I did. I simply added those 2 lines of code: Code: PrintService defaultPrintService = PrintServiceLookup.lookupDefaultPrintService(); exporter.setParameter(JRPrintServiceExporterParameter.PRINT_SERVICE, defaultPrintService); One fetches the default printer and the other passes that as an export parameter to JRPrintServiceExporter. I don't know why it doesn't work as it should without these lines, it seems like the way jasper chooses the default printer is a bit buggy. Everything is working as expected now.
  13. I've got a somewhat similar situation. In my case, printing directly to the default printer without the print dialog usually fails to get the right default printer within windows. This happens in cases where the default printer changed in the OS or if another application used another printer with some dialog (without setting them as default). What's strange is that restarting the java app doens't seem to resolve the issue so this could also be a problem with the JVM and the information it keeps about printers. Is there a way to force jasper to fetch the default printer again just before printing?
  14. Thanks! About that offset tip though, could you provide me with a short sample or a link where I could find one. I've been looking around but it's hard to tell what I should do exactly. I don't seem to be able to use those offset parameters with JasperPrintManager and I need to print the report directly so, using export, the most straightforward way would be to export it to xml using those export parameters, import it back to a JasperPrint object and then carry on as usual... I have a feeling this is not the more direct route... I will also try to do it with JasperDesign but I'd rather not have to compile the template everytime.
  15. I can get them but I can't set them. I already know the original margins so I won't need to read them at all, all I need is a way to modify them. Thanks for the help though.
×
×
  • Create New...