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

CaptnTony

Members
  • Posts

    80
  • 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 CaptnTony

  1. I'd probably have to look at the two reports a bit more to see how the variables are defined and returned etc. Might want to post them here so someone can take a look at them.
  2. Without looking too deeply into the situation, I once created a master report with two subreports on it. I had some overlap of the data because BOTH subreport properties were set to align the subreport to the top of the section. It ended up overlapping because the first subreport printed data further down the page than expected. The solution is to set the first subreport to align to the top and ALL the other subreports contained within that section to FLOAT. Hope that helps you out.
  3. Are you producing printed reports or trying to export to a pdf/other format file? I've tried to 'ignore pagination' and that didn't work at all for anything that had to go onto paper. The setting that I always check are Position Type (in subreport properties) and the start at top of page if you are using Report Groups at all. I generally put the first subReport's Position Type as 'fix relative to top' and all remaining subReports in that section as 'Float'. I generally do NO page control of any sort in my subReports (other than Report Groups possibly starting on top of a new page if necessary). Most of my issues were resolved when I paid close attention to the Position Type property of each subReport. Hope this helps. I have many reports that use subReports, one that has a tree of subReports about 7 or 8 deep as necessary, so I know they can get along well together.
  4. Can you describe how they are 'off'? Do they start half way down the next page, or maybe 'on top' of previous report, or a blank page comes out before the subreport prints. I do a lot of subreport reports, so I've probably seen it 'all'.
  5. I would believe that's a normal function of your page settings. It has to do a page break *somewhere* and that is where you've defined it with your margins etc. Now, the issue I'd like to see a solution for is where the section header is printed on the last line of the page w/o any detail rows :) I'd like to see a 'keep with at least one detail row' (or something) checkbox in the group definitions. Because I think it looks tacky, I always notice it on my reports. Likewise, on the footer section, i'd like to see a check box that keeps at least one row of detail with it so I don't get one row of footer on the top of the next page all by it's lonesome. Hope my explanation helps. I think to fix it, you'll want to work on your margins and pagination.
  6. SELECT field1 + ', ' + field2 + ', ' + field3 AS temp FROM table Then place the $F{temp} into the appropriate section of your report? Otherwise, you may be talking about a crosstab query?
  7. I've created a template Invoice report. This report consists of an Executive Summary subReport, Detail subReports, RemitSlip subReport. My current goal is to allow, based on customer definitions kept in the database, to add a/multiple subReports between the Detail subReports and the RemitSlip subReport. For instance: Typical Invoice: -------------------- Executive Summary Report Detail 1 Report Detail 2 Report Detail ... Report (have many different subReports) Remit Slip Report But, in some cases (as defined in the database) some customers may have special reports they've paid to get every month in their invoice (0 - X number of specified subReports). So it would look something like this: Executive Summary Report Detail 1 Report Detail 2 Report Detail ... Report (have many different subReports) Dynamically Added Report 1 (optional) Dynamically Added Report ... (optional) Remit Slip Report I don't want to modify the Invoice template with ALL the possible specialty reports as there could be 1000s of them ultimately. I plan on keeping a table which specifies invoice group ID (customer) and special report to add ID. I would REALLY, REALLY like to not have to send in parameters specifying whether to print ReportX or not. Any ideas area appreciated. Thanks in advance. Captn.
  8. I found that it was in the <jasperReport name="Invoice_Std_02_Remit_UnInvoicedAllocations" tag. It was a hold over from when I renamed it within Filemanager and then opened it in iReport. It must not be updated. So I did end up finding the error, it was a truncation error in my query. See, it helps writing down the issue - I always seem to fix problems when I ask for help. :)
  9. ErrorÂfillingÂprint...Ânet.sf.jasperreports.engine.JRException:ÂErrorÂexecutingÂSQLÂstatementÂforÂ:ÂInvoice_Std_02_ExecutiveSummary_PaymentsCredits_Payments_Detail net.sf.jasperreports.engine.JRRuntimeException:Ânet.sf.jasperreports.engine.JRException:ÂErrorÂexecutingÂSQLÂstatementÂforÂ:ÂInvoice_Std_02_ExecutiveSummary_PaymentsCredits_Payments_Detail Unfortunately, that subreport is no longer specified by any masters in my report. It was at one time a valid subreport name, but that sub report was removed from the master (it didn't appear anywhere else in the chain of reports). I have opened each individual .jrxml file and searched for any references to that filename (found nothing). I use iReport to open each subreport and print them all individually for the given criteria (invoice number in my case). Each subreport (and each of it's subreports ....) all generate correctly. The only time I have any sort of problems is when I try this particular invoice number using the very top level master (invoice.jrxml). I generate about 30k invoices a month with this report and I've only run into 6 that get this error. This error obviously has just started after I reworked that section of the Invoice report. Still, 99% of the invoices generate properly since that change went live. I'm starting to pull my hair out on this one. Is there anyway (through the debug information given) to know what the calling source of the subreport is so at least I can rework that one report from the ground up. I have saved all reports, used the toolbar compile button on each, viewed all reports with empty and full datasets individually, shut down iReport (version 2.0.5)/restarted, done massive compile on all files int he invoice folder, deleted the .jasper and .bak files from invoice folder/reperformed a massive compile. Nothing has fixed this issue yet. Any ideas?
  10. You have made a variable in the subreport called mEmail, mXXXXX right? I don't think you can return fields from a subreport to a master (I may be wrong there, but I don't do that). the trick is then to get the right information into the variable, but that will take a field as a source no problem. Hope that helps.
  11. I have found, in the most recent 2 versions of iReport, that this is not the case. I do compile each report (using the compile tool on the iReport toolbar) after saving the changes. I've even gone as far as using both the empty dataset and full dataset buttons to preview the report after it is compiled. I have found that 99% of the time I must use the massive compiler tool in order to see changes in my subreports when I use the full dataset button on my master report. It's actually starting to get a bit frustrating, but the program is still worth it, so I adapt. I do now have a problem that even the massive compiler hasn't fixed, I will post that in a new thread though.
  12. I've found that on reports (especially on sub-master reports) that every report the system must be attached to some data source. Since I'm going after data in a SQL Server database on all my subreports, I just do a SELECT 1 as temp as the data source for the report 'with no data'. Hope that helps. Don't know why I have to do it, but that's the way I found to work around it.
  13. The error I'm getting is: ErrorÂfillingÂprint...Âjava.lang.OutOfMemoryError:ÂJavaÂheapÂspaceÂnull java.lang.OutOfMemoryError:ÂJavaÂheapÂspace ÂÂÂÂatÂjava.lang.Object.clone(NativeÂMethod) ÂÂÂÂatÂsun.java2d.SunGraphics2D.clone(SunGraphics2D.java:260) ÂÂÂÂatÂsun.java2d.SunGraphics2D.create(SunGraphics2D.java:294) ÂÂÂÂatÂsun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:49) ÂÂÂÂatÂsun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97) ÂÂÂÂatÂjava.awt.Container.paint(Container.java:1797) ÂÂÂÂatÂit.businesslogic.ireport.gui.MainFrame.paint(MainFrame.java:5333) ÂÂÂÂatÂjavax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:734) ÂÂÂÂatÂjavax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:679) ÂÂÂÂatÂjavax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:659) ÂÂÂÂatÂjavax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128) ÂÂÂÂatÂjava.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) ÂÂÂÂatÂjava.awt.EventQueue.dispatchEvent(EventQueue.java:597) ÂÂÂÂatÂjava.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) ÂÂÂÂatÂjava.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) ÂÂÂÂatÂjava.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173) ÂÂÂÂatÂjava.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168) ÂÂÂÂatÂjava.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160) ÂÂÂÂatÂjava.awt.EventDispatchThread.run(EventDispatchThread.java:121) java.lang.OutOfMemoryError:ÂJavaÂheapÂspace ÂÂÂÂatÂjava.util.HashMap.<init>(HashMap.java:209) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:356) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:305) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRVerticalFiller.fillBackground(JRVerticalFiller.java:1185) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRVerticalFiller.addPage(JRVerticalFiller.java:1249) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummarySamePage(JRVerticalFiller.java:963) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummary(JRVerticalFiller.java:854) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportEnd(JRVerticalFiller.java:286) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:120) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:891) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:795) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63) ÂÂÂÂatÂnet.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402) ÂÂÂÂatÂnet.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:234) ÂÂÂÂatÂit.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:944) ÂÂÂÂatÂjava.lang.Thread.run(Thread.java:619) ***************************** Is there a way that I can send parameters to the jvm when this report is being generated? ----------- I'm using iReport (latest release). ----------- Thanks in advance.
  14. In iReport, I'd look at the properties for the subReport "Properties/Remove Line when Blank" which, to my knowledge, removes the 'space' required for the subReport if the datasource returns no records. ---- Hope this helps.
  15. I'm not sure if this is how it's suppose to work or not, but I did find a way that it seems to work properly. ----------------------- I had to move the blankpage subReport and RemitSlip subReport to the Summary section of the Invoice report. I think inserted a printWhenExpression for the blankpage subReport (using the PAGE_NUMBER variable). ----------------------- Best thing I can guess as to why this is true is that the variable is not evaluated until after the detail section. I tried to make a 'running' variable that was passed from report to report and then added back to itself when passed back..but with the number of subReports I have, that was going to be a lot more difficult than moving the two subReports to the Summary band. I'm not sure what I'll do when I need a blank page after a section or anything, but I'll cross that bridge when I come to it.
  16. Okay, completely lost. I'm still an Ãœbernoober on this java stuff I guess. ------------------------- More background...I've got a master "Invoice" report with 3 subReports in it's detail section (LocalCharges, LDCharges, and RemitSlip). Both the LocalCharges and LDCharges subReports are created using a variety of other subReports. Not every customer subscribes to all of our services, so some subReports will not print because there is no data. -------------------------- As explained in the last response, it appears that I have to make use of the variable: PAGE_NUMBER somehow. What I'm stuck on is how exactly. I've created a 'blankpage' sub report. I've inserted this subReport onto the Invoice Report, right before the RemitSlip subReport. I then put some static text into the detail section of the blankpage report ("this page was intentionally left (sort of) blank"). I then used the above as the subReports' printWhenExpression (defined on the Invoice report). --------------------------- The results haven't changed. I thought that maybe since it would be on its own page now, that the == 0 should be > 0 (indicating that it will be printing on an 'even' numbered page if it prints). But that didn't work either. --------------------------- So, if you have time, could you tell me a little more about what's actually going on with the code so I can better understand how it should be used. I do use iReport, so if you can reference features in there, it may make a little more sense to me. My next 'try' will probably be to try to incorporate the information into the RemitSlip report. That report makes use of many sections already, but maybe I have to move the core elements to a new SubReport placed in the RemitSlip's summary section or something. --------------------------- Any help/ideas are greatly appreciated. Thanks in advance. Post edited by: CaptnTony, at: 2008/01/28 16:16
  17. Bands or subreports? I haven't had any problems like that with bands (make sure the height fits the height of the items you have in the band of course). But with subreports, I've seen that happen (it was because I used align to top for both sub-reports instead of having the first one align to top (of the band) while the others should have been set to float).
  18. I would generally create a single SQL Stmt that has sub-queries, or views (since I'm on SQLServer and I believe MySQL now does them too).
  19. Hello again. ******** I've got a request, it isn't a bug or anything, but I'd like to find a way to make my reports look nice. Right now I have one of my reports having multiple bands and sub-reports. I would like to make sure that the report doesn't print the header of band1 when there is no room for at least one line of detail. I think I've solved this by changing the min height to start new page (found in the iReport 2.0.4's add/modify Group dialog) to be the height of the band plus the height of the detail band (*2 if I want at least two detail rows to be printed with the band1 header). But, I haven't found a way to make sure that the detail band 'has enough room to print the summary sub-report' or at least the first detail band of that report. I can't find a way to specify min height to start new page for the detail band (only found it for the non-standard bands. Am I not looking in the right spot (iReport is what I'm using to design the reports). ****************** >> Update: 2008-01-23 << I just ran the report using the min height to start new page setting I thought would work, it didn't. So, I'm also looking for a way to tell the report not to print a band header(s) if at least one line if detail cannot be printed on the same page. ****************** Thanks in advance. Post edited by: CaptnTony, at: 2008/01/23 19:05
  20. Just a quick reply, I haven't seriously thought it out much, but it may be something to get you started down the right path. Create a "summary" subreport which appears after all the other sub-reports (in its own band or not, depending on page number requirements). That summary report is then composed of other sub-reports (the 5 or so that you've mentioned). These sub-reports can then be in the same band (or different bands depending on your page numbering requirements again). Something like this: ************************************ MasterReport: ..subReport1 ..subReport2 ..summaryReport1 ************************************ summaryReport1: ----bandA---- <optional> ..subReport1 ----bandB---- <optional> ..subReport2 ----bandC---- <optional> ..subReport3 ----bandD---- <optional> ..subReport4 ----bandE---- <optional> ..subReport5 Post edited by: CaptnTony, at: 2008/01/23 16:03 Post edited by: CaptnTony, at: 2008/01/23 16:03
  21. Thank you. I will give that a try today and let you know how it turned out. I appreciate the quick response!
  22. I'm writing a rather extensive report (many subreports and those subreports, in some cases, have subreports). For visualization, it's an invoice report. Customer->Site->Job->Products / Services / Credits ... Anyway. I'd like the last page to be a 'remit' slip which is to be a summary of all past invoices and payments received. I am printing on both sides of the paper and I want this "RemitSlip" subReport to not only start on a new page, but also on the 'front' side of that page (which means I might have to insert a 'blank' page if the page count for the entire report so far is odd since the top of next page would put it on the back of the current page). Is there a way to accomplish this? I'm guessing I will have to learn to use the PrintWhenExpression, but I'm not sure how I can keep a running page count through all the subreports. Will I have to pass a parameter back and forth and increment it with some system variable that tells me how many pages were generated for the current report? Master (pass int value pgCount to Sub1) Sub1 (pass int value pgCount to Sub1.Sub1) Sub1.Sub1 (print and return incremented int value to Sub1) Sub1 (receive new pgCount Value, pass to Sub1.Sub2) Sub1.Sub2 (print and return incremented int value to Sub1) ... or is there an easier way? I haven't found a way to increment any 'global' values within the code, maybe I have to establish a global object using my own java code? I'm grasping here. I'm only semi-experienced in JasperReports (I use 2.02 of iReport as my designer). This is my first big java programming project too, so a little weak there as well. Any ideas would be greatly appreciated, I'm not afraid to read a whole bunch if someone has some links or examples. Thanks in advance.
  23. Aug 6, 2007 4:07:55 PM net.sf.jasperreports.engine.query.JRJdbcQueryExecuter <init> WARNING: The supplied java.sql.Connection object is null. Aug 6, 2007 4:07:57 PM net.sf.jasperreports.engine.query.JRJdbcQueryExecuter <init> WARNING: The supplied java.sql.Connection object is null. the two lines of code that are generating these errors are: // create JasperPrint using fillReport() method JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, CIMS.conCIMS.connection); and // You can use JasperPrint to create PDF JasperExportManager.exportReportToPdfFile(jasperPrint, "F:\Shared\CIMS\Invoices\Test\Temp\Todd\" + mInvoice.getInvoiceID() + ".pdf"); I should be using the newest versions of JasperReports and iReport. This just started happening today (has been working fine for over 5 months). I modified some of the sub-report queries to use Views in MS SQL Server 2000. These views join data across 2 different databases (the queries work fine both in SQL Manager and when I print the reports using iReport (as a preview with data)). The reports produce fine and show up in the preview perfectly, but I'd like to avoid this error if possible. Is it possible the the error is because the query crosses multiple databases and doesn't use any connections or user information specified within the report? If you need any more information, let me know. Thanks in advance.
  24. in your 'master' report you should setup a variable ("returnedData" for instance) of whatever data type you will be returning. Then when you create your subreport, modify it's properties from the master report (while looking at the box representing the subreport) and add the value to be returned on the returned values tab (forget if that's the exact name or not, but it is close). The value returned is the single value you want returned from the subreport and the return to value is the returnedData variable you setup earlier. You may then display that value in a band after the detail band is printed. Hope that helps.
  25. But, is there a way to 'embed' the codes to cause the report to only print a certain 'subreport' doubld sided? Would this also work if it was embedded in a pdf file? I've basically set my mind on inserting 'blank page subreports' where I want it to appear that the page is blank and then setting the printer to print double sided. Be easier to insert a 'textbox' type item with something that could be fed to the printer as an escape sequence.
×
×
  • Create New...