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

CaptnTony

Members
  • Posts

    80
  • Joined

  • Last visited

CaptnTony's Achievements

Enthusiast

Enthusiast (6/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. You are able to pass values back to the calling report from any of the SubReports if I recall correctly. I have been away from iRepors for about a year, so I don't recall 100% but I believe the configuration of the subreport not only has incoming parameters from the report calling it, but also a tab for returned values. You should then be able to return a value from a subreport to the main report, then pass it to the 2nd subreport and use it there. Todd
  2. I'm creating a report that will ultimately be moved to a JasperServer repository (community version for now as I'm playing around with it). The issue I'm bumping into is that when I place an image (logo file) onto my report and try to run it, I get an error message: Error filling print... Byte data not found at : repo:/images/logo Setting up the file resolver... net.sf.jasperreports.engine.JRException: Byte data not found at : repo:/images/logo at net.sf.jasperreports.repo.RepositoryUtil.getBytes(RepositoryUtil.java:206) at net.sf.jasperreports.engine.JRImageRenderer.getInstance(JRImageRenderer.java:141) I update the report in the respository and run it from the server and the image displays properly. Is that normal or should the local copy of the report still be able to be run and displayed in the internal iReport Preview panel? If I recall correctly the copy of the logo moved to the repository was in .gif format (not 100% sure of that though, may have been .png) Thanks in advance. Todd Post Edited by CaptnTony at 04/18/2012 14:34
  3. 1. For creating sums of the varous numeric columns in your report, take a look at Variables. You can configure them quite liberly (can sum for all records, those in a group, by page ....). Very powerful and useful tool. 2. Not sure as I've never used a sub DataSet yet - been out of making reports for about a year, but I'm sure if you search google for that exact question, it'll lead you to some discussion here. 3. Tables are always nice for keeping things 'in their place'. It's really about flexibility. If it's going to help provide user controlled dynamic sort/filter capabilities when used with JasperServer, that would be great!
  4. My *guess* is that, if it weren't for the stretch, there "would have been" 8 rows printed on the page. So maybe that value is calculated before the information is actually printed? So maybe the evaluate time parameter needs some tweaking or something? Just throwing something out there. I've never run into the problem even though I've created many, many reports with "running totals" (both group, page, and grand and usually all together).
  5. Agree. I haven't had problems with it (yet), but forsee some day kicking myself. Maybe, for those diehards that hate confirmation boxes, allow us to disable the feature through the prompt message.
  6. If I understand correctly, you are trying to deal with "null" rows on the report (in this case a label), is that correct? If so, have you checked out the parameters on the textboxes that contain the $F{<fieldname>} information? There should a parameter that is called "Remove line when blank". If you check this option, the form should automatically handle the moving of data around for you by just not even trying to print that line of information. Hope this helps. Good luck!
  7. Agree with theclosh. But, I'm not sure we're diagnosing the real problem here. When you say you want to report on the parameters used, which parameters are you talking about? The parameters that were entered to create your master report (the one with the subreports) or those used from the master to generate the first subreport? If you want to create a Master report with a SQL Statement based on three params: pOne, pTwo, pThree (for instance). Then this report calls a SubReport (srOne) using information based on either: pOne, pTwo, pThree or the contents of any/all the retrieved fields ($F{<fieldname>}). Is that correct so far? Then, based on what I'm reading, you want the results of some third report, another SubReport (srTwo), to be displayed on the srOne? Is that correct? If so, what I've done previously is to create the Master report and place a SubReport onto it. This SubReport would be passed the necessary information (parameters or $F{<fieldname>} values) and retrieve it's data. At this point, this SubReport (srOne) already knows about the parameters used to create itself. They were passed into the report and you should be able to display them in any band you'd like on srOne (since they were available at the time of execution). IF you are looking for the parameters entered to create the Master report here, why? You can print them in another band (Summary for instance) on the Master report form. But, if you really want to show the values from the Master report, you can just pass them to the SubReport (sbOne) - even if they are not used to help retrieve the data, you can still pass them if you want them to be displayed on sbOne. IF you are looking for 'friendly names' for the criteria, you can still build a SubReport on which ever report you want to display the Parameters_Used for. I've built reports that call SubReports, that in turn call multiple SubReports, which each call various other SubReports. I think the one of the invoices I created was a mix/match of One Master collection of SubReports running (optionally based on the data) through 6 -10 layers of SubReports. So I know you don't have to worry about 'only one layer' of subreports like you may have had to with other products out there. Hope this helps. Good luck. Post Edited by CaptnTony at 04/18/2012 13:54
  8. Okay, consider this one closed. FINALLY. I feel so stupid. While I was playing around this afternoon with a complete rebuild of the folders from Executive down (thinking I may be running into a report name length limit or something) I noticed that I was using the "real" ID for the report, but the "friendly" name for the directory structure. Thus where I was using "DrillDown" or "Drill Down" as folder names, it was really "EDD" (the real name I gave it in case I'd run into too many characters with directories and filenames. DUH! I feel so stupid - I guess I won't be making *that* mistake again. Whew. So, it was actually an issue with a 'null pointer'. My brain was reading one thing and not even thinking about the 'real' directory structure. So if you get that error message listed above, check your directory structure and make sure you use the full name reference to the report (minus the "res:" that I've seen posted on other forums.
  9. Thanks for the info ybarkalov. I tried to remove the res: from the report name first with no luck. The URL looked the same. I also tried to remove the mandatory setting for the subreport (2nd report in my case). Again, no joy. Any other ideas out there? Is there a sample report that uses this sort of data passing that I can review to make sure I'm doing everything as I should? Thanks for any help/ideas, I do appreciate it. Todd *** CHANGE INFO: Just noticed that there is a sample account which does what I'm trying to do. It's called "Employee List". By clicking on Sara Smith's VIEW link, it opens up the "Employee Accounts" report. When looking at the URL, I noticed that none of the folders have spaces in their names. Is that causing me trouble? Post Edited by CaptnTony at 04/17/2012 14:12 *** CHANGE INFO: It doesn't appear that the space in the folder name was the ultimate cause of the problems. I renamed it to DrillDown and am receiving the same error message listed above. Also, I opened the "Employee List" sample report and noticed that it too did not use the "res:" designation before the report name, so I removed it from mine as well with no change in the results. Then I reviewed the query that created the "Employee List" sample report. It's returning a STRING for the ID column. NONE of my key values are strings. I remember reading something about parameters having to be strings and then cast back into whatever is needed for the new report. Is that true? If so, that may be my problem. I've made sure that the top level Drill Down report is retrieving the year as an Integer, the that mYear parameter is an Integer (in the original report, the JasperServer's input control (type Number), and as the parameter in the second report). Post Edited by CaptnTony at 04/17/2012 14:30 *** CHANGE INFO: Ok. I've decided that it's not that difficult to start 'over'. I've removed all the reports located in the DrillDown folder. I currently have uploaded my temporary 'top level' report (I'll make dashboards later, but for now this will be the 'top level'). I've reassigned it the necessary input controls for the report in JasperServer. With no other reports present on the JasperServer, I run this report and click on the hyperlink. When I do so, I get the same error message as above. This has me thinking that I may have mistyped a name for the 2nd report (subreport) somewhere. Which report name is JasperServer trying to actually open? Is it the 'official ID' or is it the more 'friendly name' that is displayed in the server reports list? Post Edited by CaptnTony at 04/17/2012 14:59 *** CHANGE INFO: Found that the report is being called with the ID value of the report in JasperServer (that's what I figured). Played with the sample reports a bit and found that when I click the "Always Prompt" box in the controls and resources area for "Employee Accounts" report that the system will actually prompt for the Employee ID (and default it to the value selected in the first report "Employee List" and passed through the URL -- though I see sarah_id as the passed value and not sure if that's the actual data or if _id is appended to the value for some reason ... the URL for my report just shows the value 2011 without an _id appended. I'll check the original report's query to see what it actually returns for the $F{ID} column to be sure. Why is the fact that the 2nd report prompts for input even when the parameter is passed through the URL? Because my setup is erroring out before that happens. Somewhere between clicking the hyperlink, and thus building the URL, and actually loading the referred to report something introduces a null value. What might be affecting it? Report name specified in the _report parameter in the 1st report? The 'source' parameter from the 1st report (mYear) -- doubt it since it's value is in the URL? Some link not being found correctly in JasperServer (too many subfolders down or something)? Post Edited by CaptnTony at 04/17/2012 15:22 *** CHANGE INFO: I'm starting to think it's something wrong with how I'm forming the hyperlink in the original report. I've created a simple "TEST" report with nothing more than a single row being returned and NO parameters required. I then modify the top level report (1st report) to include a textbox in the page footer that is instructed to open this TEST report. I add the _report parameter (reports/Executive/DrillDown/TEST) and save everything and update the JasperServer repository. I run the top level report and see the new link in the footer. When I click on it, I get an error message: Error Messagecom.jaspersoft.jasperserver.api.JSException: jsexception.null.uri Error Tracecom.jaspersoft.jasperserver.api.JSException: jsexception.null.uri at com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.HibernateRepositoryServiceImpl.findByURI(HibernateRepositoryServiceImpl.java:898) at com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.HibernateRepositoryServiceImpl.loadResourceLookup(HibernateRepositoryServiceImpl.java:280) at .... I know it's reading at least part of the hyperlink properly, because on this report I chose blank as the hyperlink target (and it's opening this error in a new window). The URL created is this: http://localhost:8082/jasperserver/flow.html?_flowId=viewReportFlow&reportUnit=reports%2FExecutive%2FDrillDown%2FTEST&reportLocale=en_US Ideas? Post Edited by CaptnTony at 04/17/2012 18:19 *** CHANGE INFO: I've been a busy guy trying to figure this out today, sorry for all the updates, but I'm hoping I can look at everything later and see what other options I'm missing here. I just created a new folder under "Reports" on the JasperServer called "develop". I created a very simple top level report "Mastr" upon which there is a single row returned from one of our tables. Then in the page footer I have a textbox configured as a hyperlink. The _report value is: "/Report/develop/SubReport" (notice the first "/"...seems to be necessary as w/o it, this simple link doesn't even work). The second (subreport) is called: SubReport and exists in the same folder. There are no parameters, just a link on the fist page calling the second. That works fine. Next I'm going to pass a string variable to the second report and see if the query there can use it to limit the resultset a bit. It will be a fixed value, but I want to see if it even tries to pass it. One thing that is still rattling in my head is the sample URL for the "Employee List" opening up "Employee Accounts" linked report. It's parameter doesn't seem to be a value, it shows up as =sarah_id. If I try to open that same report (and I can with the develop and test reports above), I can't seem to pass it either a value (say 1 or 3 which I'd assume is the acutal ID for employees) nor a string (sarah_id) and have it produce the same thing report. The best I can do is get a report opened that says no records (when passing a 1 or a 3 as the ID instead of sarah_id. I'm wondering if I'm passing byVal instead of byRef or something. Post Edited by CaptnTony at 04/17/2012 19:31
  10. I've spent the better part of the weekend and today trying to figure out how to pass parameters between two separate reports that were built in iReport 4.5.1 and moved the the repository in JasperServer 4.5.0. I can run each of the reports individually (both in iReport and from within a browers from the repository). My first report is simply a summary of sales information by a range of years. Simple rows with quarterly figures for each year. Not using a table or anything at this point in time, just simply the detail band with multiple rows being returned by the SQL statement. I've provided the hyperlink information in the year field of the detail band. This hyperlink information includes the following information: Hyperlink Target: Self Hyperlink Type: ReportExecution Link Parameters (2) 1. _report (value: "repo:/Reports/Executive/Drill Down/Summary_Customer_ByQtr_SpecifyYr") 2. mYear (value: $F{dueYear}) I've created an Input Control on the JasperServer with the following information: Type: Single Value Prompt Text: Year parameter name: mYear Mandatory and Visible are the only items checked. I've then associated this Input Control with the Summary_Customer_ByQtr_SpecifyYr report in the repository. When I run the first report, specify the year range to display, and then click on one of the hyperlinks in the year column of the report. The system tries to open this URL (and fails): http://localhost:8082/jasperserver/flow.html?_flowId=viewReportFlow&reportUnit=repo%3A%2FReports%2FExecutive%2FDrill+Down%2FSummary_Customer_ByQtr_SpecifyYr&mYear=2012&_eventId_drillReport=&_flowExecutionKey=e10s2&reportLocale=en_US Error: java.lang.NullPointerException Error Tracejava.lang.NullPointerException at com.jaspersoft.jasperserver.war.action.ResourceTypeMappingAction.doPreExecute(ResourceTypeMappingAction.java:53) at org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:186) at org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51) at org.springframework.webflow.action.EvaluateAction.doExecute(EvaluateAction.java:79) at org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188) at org.springframework.webflow.execution.AnnotatedAction.execute(AnnotatedAction.java:145) at org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51) at org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:101) at org.springframework.webflow.engine.State.enter(State.java:194) at org.springframework.webflow.engine.Flow.start(Flow.java:535) atf My diagnosis is that I think it should be working because I have specified the correct parameter name coming FROM the original report as the URL has the correct year specified (it changes as I choose different years from the first report, so I'm thinking it's pulling the information from the hyperlink correctly). The second report works properly when I specify the year at the beginning, so I believe it's getting the parameter using the correct name (it's the only parameter right now in the second report so I'm not too sure how important matching the names are, but they are exactly (case sensitive) the same as of right now). Any ideas of what I can do to resolve this will allow me to sleep without dreaming about different things to try. No seriously, last night I ran at least 3 different test scenarios through my dreams. None of them worked either unfortunately. Thanks in advance. Todd
  11. Thank you Carl! So much better! I too would much rather work in a non-production environment (local copies) and then publish them to a test server then finally to a production environment too. This is now working very nicely! I appreciate your quick reply. Todd
  12. I've just setup JasperServer to play with here (working on some drill down reports for our ERP data). I too am using 4.5.0 of JasperServer and, I believe, iReport 4.5.1. I have the JasperServer plugin working in iReport and am the admin on JasperServer so I have access to both interfaces. I have succesfully created, distributed to JasperServer, and run a basic report (no parameters). I've also got one of my top level drill down reports (with two parameters) distributed and running. I've created and distributed one of the reports drilled down to from the top level report, but can't seem to get the parameters to pass correctly. This may be because I don't understand / can't execute the updating of reports once they are in the repository of JasperServer. Right now, the only way I've found to update the report is to remove it from the repository and then re-add it. I'm sure there's a better way, but I've yet to find it. I have found that if I open the .jrxml file from the JasperServer plugin within iReport, I can make changes and save them in the repository (somehow, even though the documentation says the file is copied out of the repository and stored in a temp file on my local drive, so I'm not sure how it gets 'checked back into the repository' without me doing anything, but it seems to work.. If you have a better way, I'd like to hear it because adding the report over and over cannot be the most efficient method, and it was mentioned here that the repository version is never opened (or at least very rarely). Thanks for the help in advance, I've learned quite a bit already reading through the comments. -Todd
  13. If I'm understanding correctly you're trying to add the values contained in two separate variables (a) and (b) and storing it in a third ©. To do this, I've found that each should be initialized to a value (zero for math) so that it isn't ever null. You cannot add a null to a value as far as I know. So, in the default value expression something like new Integer(0) should do the trick. I'd initialize all values for giggles, but at least a and b.
  14. You can use the free iReport to create reports then upload them to the JasperServer.
  15. OK, I found out that I don't need to specify plsql for SQL Statements written against an Oracle 10g database. I am currently only using std SQL statements (nothing particular to Oracle: specific functions or stored procedures). So, setting the SQL language to: sql (changing it from plsql) allowed the report I'm playing with to run properly in both iReport and JasperServer 4.5.0. Saving it with the change wasn't enough though, if I recall correctly. I had to actually preview the report in iReport before updating it on the JasperServer. I did notice that the text didn't look at all like the text in preview (not arial, all same size, and underlines missing), but I'll work on that issue later. For now, until I must use Oracle specific functions or sp calls, I'm going to keep pushing forward :)
×
×
  • Create New...