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

jpauze

Members
  • Posts

    116
  • 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 jpauze

  1. Confirmed that 4.0.2 now displays Pie Chart Labels. Thanks development team for fixing that, was really annoying. See attached for sample
  2. and with regards to how to pass the date when using grouping with aggregate functions. just add a MAX(Process.claimDate) In your case you don't care about the specific date just that you get a date back and any date returned will be in the same month because of the GROUP BY MONTH() condition. SQL Rule: Any select field used in conjunction with a GROUP BY must EITHER be part of the GROUP BY condition OR part of an aggregate function. MAX() is an aggregate so you can include it without messing with the GROUP BY condition. Post Edited by jpauze at 04/26/2011 21:17
  3. What you have should work but here is an easier way without having to hard code month names and this should be locale aware or at least easily made so if that is a requirement. Uses your existing integer month number, builds a date and then reformats to get the short month name. new java.text.SimpleDateFormat("MMM").format(new SimpleDateFormat("yyyy/MM/dd").parse("1970/" + $F{month}.toString() + "/01"))
  4. Two ways I can think of Java: would require that you adjust your SQL statement to pass in the actual claim date not the month Expression: new java.text.SimpleDateFormat("MMM").format($F{datefield}) SQL Statement prior to getting to the report, the following will return the shrot mont left(convert(varchar,process.claimdate,100),3) as Month Not sure about Access and whether it has the convert function available as I use MSSQL but I am sure there is an equivalent. J
  5. Thanks Matt, that one works perfectly if you are looking to exclude the entire band. I have found situations (for my implementation) where I wanted to determine output in a text element specifically within hyperlink expressions based on the output type and therefore it didn't suit perfectly, could have gotten around it by having multiple bands and switch between them based on the exclude.origin property but that is a bunch of extra work and I am lazy
  6. I think you will have to explain in a little more detail regarding "bad", "not clear", "lost data". I have used xls export and have not had any issues with it, I do find you just can't take an existing report and say, hey give me it in XLS and you really do have to format your report specifically for XLS output type. When you do I haven't had any issues with it. Maybe post some examples of what you are seeing that you don't like and I am sure somebody will provide some guidance.
  7. You didn't misunderstand, I was under the impression that the password property also controlled password encryption which it clearly doesn't (after I actually tried it) I did find a vague reference to possibly using the jExcelAPI to set the encryption password but didn't have much success in finding any specific references. Not sure how fixed you are on Excel output or whether you could switch to PDF output, I know there are properties which allow you to set the password separately for owner and user and use 128-bit encryption. Maybe somebody else has a clue, if not then maybe we should create a feature request for it.
  8. I have searched high and low as well and while there is property which allows you to conditionaly print bands based on the export type (there is a recent post on that) there doesn't appear to be a property which tells you what the output type is and sometimes suppressing at the band level just doesn't suit your needs. In my case we have embedded JasperReports into our web application and the user can select the output format (and switch between them) in some cases such as hyperlinks to application functionality I only want to include the hyperlink if the output type is HTML but not when PDF or Word as these are files that can be distributed and hyperlinks won't work. To get around this problem, when we embedded jasperReports we determine what the output type is based on user selection and then we automatically set a report parameter called outputType (string) which then can be used for whatever we want and it automatically gets set for every report. Now on my hyperlink or any expression for that matter I can use the outputType to control what I like $P{outputType}.equals("PDF") ? "Do something for PDF" : "Do something when not PDF" Not sure if this helps your situation but works well for me. J
  9. Yes, there is a report property you can add which allows you to set the password net.sf.jasperreports.export.xls.password Do a google search on it and should find all the information you require, I recall seeing a post on here somewhere related to the same topic but I think it was quite old.
  10. Not sure I fully understand the question, you have a single text string which contains the strings you included in the example and you want to display it? Set the "Stretch with overflow" and "Print when detail overflows" properties. or is what you are asking is that you have multiple details records and you are trying to use some numbering scheme to include the bulleted points?
  11. There are many posts on the forum dealing with how to create subreports and use data sources . Without repeating what has been posted so many times (personally myself) will say do a search on the forum for subreports and/or datasources and review the information, I am sure you can find what you are looking for. J
  12. Here is a more elegant solution :) Will get the remainder portion then shift the decimal 2 spots right then drops the remainder again. Result will be a Long, change the last longValue() to intValue() if you need an integer. Can use this as a direct expression for display or assign to a Variable if need be. $F{Field}.subtract(new BigDecimal($F{Field}.longValue())).movePointRight(2).longValue() Hope this helps. Post Edited by jpauze at 04/25/2011 15:04
  13. I am not a java developer so those that are could probably provide a better method. One way would be to convert it to a string and then search for the . and grab the next two characters. The following expression would return what you are looking for in string format, You may want to convert back to a numeric if you need to use it for calculations and I would probably add a check to make sure the . exists in the string before doing the substrings as I think it will cause a java failure if using -1 (which will get returned by substring if the . doesn't exist) as part of the substring function. $F{Field}.toString().substring($F{Field}.toString().indexOf(".") + 1, ($F{Field}.toString().indexOf(".") + 1) + 2)
  14. FYI, I also have the book iReport 3.7 by Shamsuddin Ahammad from Packt Publishing. Unfortunately it doesn't add much more (if any) over the Ultimate Guide. Definitely not worth the purchase price but you can find the ebook lying around somewhere on the internet, not that I condone free downloads of software for a free open source tool like iReport. :)
  15. I am thinking that asking for the examples reference from a post back in April of 2007 (4 years ago) isn't going to do you much good, not even sure if that user is even still around. Please explain what type of report or issue you are having and someone will most likely pipe in and provide assistance.
  16. Where is your data source coming from? Database? I only ask because this would be a fairly straight forward SQL statement to pre-aggregate/group the data before it even got to the report/chart. If database, post a sample of the data and I will see if I can help out. Otherwise, maybe mock up what you are trying to do and re-post, myself, i was having trouble following the logic and do want to help out.
  17. If there is another way to do this, someone please speak up because I haven't found it and hopefuly they will add a design mode way of doing this. Scenario: You are in the middle of creating a report and you have a number of detail bands, now you need to add a new one, when you add a detail band it is automatically placed as the last detail band, ok great, but I need it to be the first, or second, or wherever and yet there is no move detail band function in the U/I. Solution: May sound simple but it works, switch to XML view and move the detail band where you want it. In the example below I want to move the empty 2nd band to be the 1st band. Before... <detail> <band height="22"> <textField> <reportElement mode="Transparent" x="0" y="2" width="373" height="20"/> <textElement> <font size="11" isBold="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["Text Field 2"]]></textFieldExpression> </textField> </band> <band height="22"/> </detail> After... <detail> <band height="22"/> <band height="22"> <textField> <reportElement mode="Transparent" x="0" y="2" width="373" height="20"/> <textElement> <font size="11" isBold="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["Text Field 2"]]></textFieldExpression> </textField> </band> </detail> Caution, be extremely careful modifying XML structure, if you mess it up your report will be corrupted and will not open in design mode.
  18. Felt and urge to reply to this one, while I agree with David that the documentation could definitely use some improvement, I did find it extremely useful when I first picked up iReport and started doing reports. Sure, it doesn't provide step by step guide of how-to but there is some great information in there and for the cost, $24 bucks, I chalk it up to just another resource and if you even have one or two of those "hmm didn't know that" moments it's worth it. BTW the sample library is another great resource. I do think that in order to be truly successful with iReport you have to have some level of development experience, or at least the capability to pick up simple coding techniques as so much of iReport relies on use of expressions, wouldn't let it scare you though as there are so many samples, sites, examples and you can usually find out how to do what you need without issue. The only way to really fully get into iReport is to use it, do as many reports as you can, it gets easier and easier and before long you can bust them out quickly, I have done literally hundreds at this point and have complete confidence to do almost any report I come across, FYI, first time I ever used java was with iReport. Although I do have a development background. The most useful resource around is this forum, I have been through every post available, not because I was having an issue, more to learn about how others were doing things or when I am creating a report I go, oh ya I think I saw that, really does help, which is why I am trying to post as much as I can now, pay it forward. hmmmmmm, I think maybe users in this forum should write a book on iReport, vote on topics, people create chapters, others review, etc.. just a thought
  19. David, first off, thanks for the suggestion, in my case using the <BR> is not ideal but do appreciate you taking the time to offer up an option. Matt, totally agree not common however, in my case our product collects a lot of configuration data from hardware servers/devices and we commonly come across really long server names as customers get crazy with thier naming conventions, pain but what can you do. I really like your suggestion of using zero width spaces, never even occured to me and I think this will definitely do what I need it to and in my case I am only worried about HTML/XHTML so the PDF caveat is not a concern. Let me give it a shot and I will post back how it works. Thanks again, this one was bugging me for awhile.
  20. If you can, maybe post what you figured out so that others may benefit if they have to find the same thing in the future.
  21. An alternative would be to define a style and then apply that style to the text element, i like this option better and ends up being way easier, just assign the style and everything gets applied consistently and easy to change specific attributes for all elements in one shot later. Styles (especially conditional styles) are definitely worth learning and understanding if you are new to iReport.
  22. Don't really deal with Epoch dates but let me give it a shot and see if it helps point you forward. Epoch is seconds since a reference date, sometime back in 1970 if I recall correctly, luckily for you, java stores the same internal format but in milliseconds so it should be a simple excercise of converting the java date to seconds. $P{FROM}.getTime() / 1000 or $P{TO}.getTime() / 1000 Alternatively, you can convert your epoch date in the sql statement directly to convert to milliseconds (* 1000) There are numerous posts on here about using parameters dynamically within SQL statements so won't repeat the info and should be a simple search. Hope this helped.
  23. Pradipta, For the the benefit of the rest of us you can expand on specifially the condition you are trying to check? I don't understand the statement "But I hope in future there should be a way to handle the style dynamically when the style depends on user inputs at run time" as i Report/Japser fully supports this through the use of "conditional styles" and it is quite simple to have different styles controlled by paramaters, or variables, or fields etc. Just trying to understand where the gap would be and why conditional styles wouldn't meet your needs?
  24. Correct, this is the field expression, variable is not required
×
×
  • Create New...