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

manshack_one

Members
  • Posts

    177
  • 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 manshack_one

  1. Nice! I have the subreports in the summary band but they still show up either way now that I've set the other two options you posted. Set everything to float and check for empty instead of null. Now that I'm past this hurdle everything is falling into place nicely and my future reports will be that much easier. Thanks!!
  2. I ended up just writing the sql query for this one to get the data right. Should be a little more efficient this way since the server is compiling all the data and jasper is just filling the report. select tblUnit as unit, tblDateEntered as entered, tblMostRecentSBPDate as BP, SUM(IF(DATEDIFF(tblDateEntered,tblMostRecentSBPDate)>365,1,0)) as 'Outside Range', count(*) as Total, (count(*)-(SUM(IF(DATEDIFF(tblDateEntered,tblMostRecentSBPDate)>365,1,0)))) / (count(*)) as 'Comp Ratio' from CAD where tbldateentered between $P{begindate} and $P{enddate} And $X{IN, tblUnit, unitselect} group by unit order by 6 asc; I ended up with exactly the right data I was looking for and all the calculations are done in the query. The only thing in iReport I had to do was format the ratio as a percentage rather than decimal.
  3. Ok, I have three subreports in the summary band of an empty report template. All three are set to float. I have a page break element in between each of them. I set the empty report to the right datasource and my parameters are passing through just fine. Here's what I have left to resolve. 1) The page breaks are being ignored. Each subreport following the first one will start prining on the same page as where the other one ends. If I take off float and set to fix relative to top of the page then the reports will layer on top of each other and still ignore the page breaks. It needs to print one subreport, then break to a new page, then start the next subreport. This is the same process no matter which subreports are chosen. If they don't choose to print the first report but do select the second one then the second one needs to be right at the top of the first page of output. 2) I only put in the print When expression to check my input control for null or the subreport name on the first subreport. It still does not print the subreport if the input control is left null (by not entering anything). It will print however if I put in the name of the subreport into the input control. Post Edited by manshack_one at 11/10/2009 14:33
  4. The subreports really don't correlate with each other. The master report is really just a container for the subreports because management didn't like having to run 7 separate reports. The reports do share some common parameters like the date range and location selections but that's about as far as it goes. There won't be a query for the main report so there are never going to be any details. I have them in the summary band right now (I think). I'm going to go and check the float property you suggested and I'll let you know how it goes.
  5. Setting the name "CAD" on the input control brings that report up now along with the other two that don't have a printWhen expression. Is there something wrong with the expression that it's not evaluating null to mean an empty collection?
  6. Ok, I didn't have my report datasource set so that was one issue. But I haven't set a printWhen expression on the other 2 subreports and they print when I leave the showSub collection null on the input control but the first one with the printWhen expression doesn't show up.
  7. I'm getting a blank page. I've tried putting them in the Title band, Detail and summary. I ended up with this in the printWhen: new Boolean($P{showSub} == null || $P{showSub}.contains("CAD")) for the first subreport. I haven't pushed it up to JS but just trying to get it to run inside IR right now. I added the showSub collection parameter and I tried setting the "when no data" to all sections, no detail. I created my master report from a blank landscape template with no query at all. Just an empty report. Then I dropped the subreport elements in there. Post Edited by manshack_one at 11/09/2009 22:16
  8. On my master report, which band would be best to put these 7 subreports into? Does it matter?
  9. I did notice after slowing down a little during my upload process that when iReport is uploading a brand new report to JS it will pop up and ask to include the subreport. Also on that screen is the option already filled out to change the relative path. However, when you're updating an existing report (even if it previously worked fine with a subreport) it will not ask you to change the relative path. It seems that iReport is only "subreport aware" on the initial loading. After that the current jrxml will overwrite the server version and change the path.
  10. Let's say I have a main report with one subreport on the summary page. In iReport 3.6 everything works fine. When I upload the main report to JS through iReport's Repository Navigator it recognizes the subreport exists and asks to include it. I click yes, the files upload and the report will run fine on JS along with the subreport. However, if I add a subreport to an existing report I get an error about loading the object "subreport.jasper" from a location which happens to be my c:\ drive working directory. I checked my other report that uploaded both parts at the same time and the parameters are the same on both of them. I don't see the subreport separately listed on JS for the one that works correctly. My option is to drop the report from JS and upload it again but that's not a permanent workaround.
  11. Thanks giulio. This is all starting to come together. 1) Create a multi-select list of values (with the subreport names as the values) 2) Create master report containing a subreport element for each of the reports I want to possibly include. (7 in my case) 3) On each subreport element change "printWhenExpression" value to use the expression you wrote In your example expression, "subreport_to_show" is the name of the multiselect input control and "my_subreport" is the name of the value in the multiselect list (which has to match the name of the subreport), correct? I think what has been throwing me off the most is thinking of input controls only for the data filtering capabilities where you use $X{} syntax in your sql where clauses.
  12. What I did so far was to create a new report (that will be used as a subreport). In it I pulled all the records entered in a certain date range. I ordered it by the location then added a grouping to the report. In the group footer I added the location name field, the group count variable and a new count variable. The count variable is what I'm trying to use to compare the dates for each record in that group. I'm thinking that just comparing the year is the most simple way to tell if it was completed in the past year. What I need help on though is the syntax for comparing the years. Should I use date1.getYear greater than date2.getYear? or just check that they're equal? A few other questions about this, Am I right to be putting a boolean expression in the integer class variable for counting the rows? Also, does that variable need to be in the group or in the detail section?
  13. This sounds promising. Now I just need to figure out the printWhenExpression. :) So will I need a table with the subreport names to bounce the multiselect against?
  14. Thanks for your suggestion. I'll look into using a scriptlet. However it just seems that since I already have the raw data I need on the report that I can create some variables to get the data I need. So in the scriptlet I'd be passing in all the raw data (or at least the fields i'm interested in) and creating an array or something to do my counts on? I thought I'd be able to just use some conditional expressions to gather the data I need. Basically the summary just needs to group by the location, count the records and compare the dates on each record for that group. Then as a group summary show the total count and number outside the acceptable range. In general I feel like it's one of the areas that Jasper really loses me concerning summary information. If you've got all the data there in the report why can't we just use variables? So far almost every report I've made has required a subreport in the summary because I couldn't figure out how to use the variables. Then again I've only been working with Jasper a short while so there are many things I don't know about yet.
  15. I need to compare 2 date fields in my results and count the ones that are more than 1 year apart. Also, I need to display these totals for the locations those dates correspond to. So on the summary page I need to see something like this: {location} { inrange} {outsiderange} {total} {percent outside range} ABC 10 5 15 33% Then once I have that I need to order it by the highest percentage outside the range to the lowest. This will help me identify the locations that missed the timeframe the most. The existing report I have does not use any grouping. It's just a printout of the raw data. There are date range parameters tied to it so I can pull the data entered during a certain period (quarterly, yearly, etc). Thanks in advance for your help!
  16. I think I'm following you. Basically create as many subreport components as I will need and use the existing reports as the source. Then change the subreport expression to include the parameter. Where I get lost is collecting that parameter. Since I need a multiselect the parameter has to handle a collection right? Do I just put the $X{} syntax in the main report query? Like I said, I understand the parameter part on the subreports. I just don't understand how you pass that in unless it's part of the query.
  17. I have a need to run a master report and choose, using an input control, which subreports to include. The subreports are already built and established reports on their own but now there's a need to print different combinations of them instead of printing them one at a time individually. I'm hoping to be able to use a multiselect input control. any ideas?
  18. I have a requirement to build a new report that includes about 7 existing reports. Basically the 7 tie together in some fashion and instead of running them individually they'd like to run one report that shows them all. That was easy enough thinking I'd just create a wrapper report and include the 7 as subs. However now they've decided they want to include the option to choose which of the 7 to run instead of all 7 all the time. So, I'm thinking I need a multi select input control but I'm not sure how to pass in the list of what subreports to include to the wrapper report or how to setup whatever variables are needed in the wrapper to decide which subs to fill and which ones not to. As if that wasn't enough I need to wrap a date range around it to pass through and multi selects on the facility locations inside the reports (which is again broken out by choosing all, by region, district, division and individual locations). So help me out. How do you create an input control that manages which subreports print?
  19. allright, i'm officially having a conversation with myself. :) I looked more closely at my error and it was actually saying it couldn't find the subreport. When I originally uploaded the main report it asked to upload the subreport at that time. It worked at that point. After changing the file and going to jasperserver and pulling it into the server from there it apparently changed the path to where it was sitting on my local pc and was error-ing out. That being said i couldn't tell you if the parameter for that report was going to work or not. I went back to the original version and just uploaded that report from scratch and added the input controls back in real quick. I was trying to filter this report by the name instead of the location. It's not that important but it does raise a question about handling data that has a comma in it.
  20. How do you pass the collection to a subreport? I added it in "copy from master" list in the main report properties, put the x${} syntax in the query but this parameter is a person's name "Manshack, Robert". I think the problem is that I need to pass the whole thing and it's breaking on the comma and trying to pass "Manshack" and "Robert". The name is stored "Manshack, Robert" in the database as a varchar. I can make the list come up in jasperserver but it bombs when it tries to fill the subreport.
  21. I'm answering my own questions again. I went into jasperserver and created a multiselect query input control. I set the query to pull all the location descriptions. Opened the report and can see the list, choose the ones you want and voila! Instant ad-hoc report. The more I learn the more I like about Jasper. :)
  22. So what I have works for me in iReport: Select * from HLD Where tbldateentered between $P{begindate} and $P{enddate} And $X{IN, tblUnit, unitselect} Order by tbldateentered unitselect is an input parameter set as collection and to be used as a prompt. This worked and when prompted I could manually type in location names i.e. "Beto, Central, Clemens". Problem is I want "unitselect" to actually list the available locations. I'm guessing this is where the input control in Jasperserver comes into play? Will I need to create the multiselect input control based off a query of the location table to have the list populated?
  23. I've got a report in iReport 3.6 that pulls all records from a table based on a date range that I have parameters and input controls for. This works fantastic. I need to move one step ahead and create an input control so the users can filter it down to multiple locations. These locations are stored in a separate table. I've never used a multi select input control before so I'm not sure how to make this work. The query designer in iReport is only pulling fields from the one table with the data. How can I create an input control so the users can select multiple locations from the static list stored in the locations table?
  24. can you elaborate on this? How do you create a subreport parameter in the list datasource? I added a list to my summary page that displays total sums of records grouped by certain field. However I need it to run off the same date range my main report runs off of. Right now the dates are parameters (begindate and enddate) on the main report. Each time they run the report it asks for the range and everything works great. So how do I pass that same value into the list component query? Having a hard time finding any documentation on it.
  25. I always seem to answer my own questions. :) You have to turn off "Always Prompt" in the input control or else the URL method will always display the input control screen in Jasperserver. Here's my url: http://192.168.200.51:8081/jasperserver/flow.html?_flowId=viewReportFlow&reportUnit=/reports/HEALTH/HCD-HTN&standAlone=true&ParentFolderUri=/reports/HEALTH&j_username=HCD&j_password=health&output=pdf&begindate=20091014000000&enddate=20091031000000 Aside from turning off that option you have to format your date like a timestamp. I'm using mysql so adding 6 0's at the end worked fine. The link will now directly bring back the pdf without the user seeing the jasper server screen.
×
×
  • Create New...