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

Smig

Members
  • Posts

    23
  • 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 Smig

  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.
  16. I've also tried to use input parameters as margins, which would be supplied by my java app, but I also can't put that to work as iReport will then be unable to read the file. So, I'll need one of 3 solutions: 1) a way to use a parameter as a margin value. I've tried replacing the value with <![CDATA[$P{LeftMargin}]]> but it didn't work. 2) a way to change the xml file with an easy to use Jasper API so that I could compile it at runtime with the correct margins. 3) a way to change the margins of a compiled .jasper file to change them as I show the report to the user. Sorry for all my replies...
  17. I thought of a workaround for the top margin, by eliminating the margin and adding a band, then I would only need a method to change the band's height. Of course, I could not find such a method either and I would still be unable to change the left margin. Anyway, in the meantime, I realized that the problem might be the fact that I'm working with the compiled .jasper file and not the XML one. Is this the problem? I can't change this stuff on the .jasper file? Do I need to compile the report at runtime to do what I want to do?
  18. I figured out a workaround and I do realise it was pretty obvious. I just changed the margins on the XML view. It still should be added to the GUI as it is on the stand-alone version. The point of iReport is not to have to meddle with the XML directly so being forced to do so might confuse newbies like me... :whistle:
  19. iReport 0.9.0 for Netbeans doesn't seem to provide a way to modify the report margins as iReport 2.0.5 has. Wasn't that implemented or am I missing something?
  20. How can I modify the report margins through the API. It seems trivial and I did search the forums but I couldn't find this information. JasperPrint doesn't seem to have any method that would do this. My problem is that I'm using jasper to fill the data on some labels that are already printed. Since the correct positioning of that data to fit the labels is crucial, and since some printers start printing at slightly differet points (enough to ruin some allignements) I thought I could provide the user with the option of adding or subtracting from the margins to make up for those little nuances between printers.
  21. I don't think this is possible, but just in case... ;) I'm sorry for the strange title but I couldn't describe what I wanted any clearer in that amount of characters. I'm using jasper to fill data of products labels. I have a 4 by 4 label in each page, each represents a different record. So I have 2 ways of doing this, what I'm doing now is to design all objects for all labels in a page where all the page data is fed using parameters and there's only one giant detail band on the report. I compile all the 16 label data on the application and send it over using parameters, then I print the report directly and I repeat the process for each page, generating one report for each page. The right way, which probably isn't supported, is to design only one label on the report and then let the report generate as many labels and pages as needed by fetching the data itself, as usual. Basically it should generate each label over one line until it has to go to a new line (or generate each label downwards and then go to a new column). I don't know if that was clear enough, I know it's complicated but I've noticed I can add report columns and that gave me hope... :cheer:
  22. I'm using iReport 2.0.5. If I create a new report, I get to choose all the report measures in any unit I choose. However, after the report creation, all the values in any properties page will be displayed in one unit only (pixels I guess). I've already changed the default unit on Options -> Settings, to mm but that seems to have no effect on all the values in the page/band properties. Am I missing something or there's some bug in iReport?
  23. Is it possible to provide a variable with a condition, to only actually sum the current record if an expression is true or skip it if it's not? I'm still not familiar with scriplets so I'm still checking if it's possible without it. Basically, I need to sum the subtotals of each group, but only some of the records on each group, depending on another field's value.
×
×
  • Create New...