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

2002 JI Open Discussion

Members
  • Posts

    1,481
  • 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 2002 JI Open Discussion

  1. By: franquisque - franquisque problem column footer 2005-06-02 05:30 it would like to occult column footer of the last page of my report.
  2. By: millenia - millenia Creating of data source 2005-06-01 00:49 Hi, I am new to iReport and Jasper. I have been trying to create a connection using jdbc for oracle. I have input the oracle.jar inside the lib of iReport. However when I create the connection and try to test it, it gives an error message " ClassnotfoundError: com.ddtek.jdbc.oracle.OracleDriver Check your classpath" Appreciate any help! By: Giulio Toffoli - gt78 RE: Creating of data source 2005-06-01 16:43 Perhaps the oracle.jar is not the only jar needed. Why you don't use classes12.zip (Oracle JDBC drivers) instead ? giulio By: millenia - millenia RE: Creating of data source 2005-06-01 20:07 Thanks Guilio! it works with the classes12.zip! :)
  3. By: antobuccia - antobuccia dynamic report it is possible? 2005-06-01 02:00 For example: I have a report with 100px width and 50px height. I want to see 2 different group result, then I create group A and group B. When I want to see result A, the group B is not showed and viceversa. But there is a problem: it is not possible create a graphic element in band B if the band A occupy all the 50px disponible. If I distribuite 25px for band A and 25px for band B the report goes ok. What about this problem? By: Giulio Toffoli - gt78 RE: dynamic report it is possible? 2005-06-01 16:39 Set report height to 50 px and for eache band, set split allowed to false. When you export the print, export only the first page. Giulio
  4. By: TesTech - testech how to do subreport using XML data source 2005-06-01 02:24 hi friends, I can succesfully launch the simple jasper reports using the XML datasource.But I dont have any idea to bind the same XML data with the child report.I have separate ".jasper" files for parent report and child report and a single XML data source.Using these things ,can i launch the subreport sucessfully? Please help me and reply in detail !! Thank You Very Much !!!! By: Giulio Toffoli - gt78 RE: how to do subreport using XML data source 2005-06-01 16:35 you have to identify the xpath expression needed to extract data from the original xml (or better from the current node) and fill the child. Then you can use as datasource expression for the subreport: ((net.sf.jasperreports.engine.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).subDataSource(<your xpath expression>)
  5. By: Ivan - ivanooi Nice if able to report not in preview mode... 2005-05-30 08:59 Hi, It is possible to create a control to show the format not in preview mode ? Thanks By: Giulio Toffoli - gt78 RE: Nice if able to report not in preview mode... 2005-05-31 00:44 What means "show the format not in preview mode" ? What format exactly? Thanks Giulio By: Ivan - ivanooi RE: Nice if able to report not in preview mod 2005-06-01 00:04 hmm..... i mean something like in table but with free style format...... something like Sybase DataWindow By: Giulio Toffoli - gt78 RE: Nice if able to report not in preview mode... 2005-06-01 16:27 You want modify the report like a Word document ? I admit that it's a bit complex... Giulio
  6. By: SSG - shivasg Adding an expression to the Text Fiels 2005-05-31 11:02 Can someone help me how to concatenate an "IF" statement in a Text Filed. I have a Report Parameter $P{loc} and I have a Text Field with string "abcd". The report parameter $P{loc} values can be "C" or "A" I want to do the following; If $P{loc} = "C" then "Cat" else "Apple". I want to concatenate this "if" statement to the above string "abcd" in a Text Field. Can anyone please help me? Thanks. By: C-Box - c-box RE: Adding an expression to the Text Fiels 2005-05-31 22:50 When I understood your question right, you can try this one as the textfield-expression: ($P{loc}.equalsIgnoreCase("C")?"Cat":"Apple") + "abcd" of course you can nest your if -clauses.... and concatenate with your fix field-value or static-string as you want. hth C-Box By: SSG - shivasg RE: Adding an expression to the Text Fiels 2005-06-01 07:58 Hi c-box, I really appreciate you reply to my question. It worked. Thanks a lot
  7. By: Ricardo Trindade - rjst adding scripting 2005-05-11 07:26 Hi, I'm trying to add scripting to my reports. What I would like to be able to do is to add scripting to IReport, so that I would be able to have (for example) a multi-line pnuts (or other) script inside a "Textfield expression". Any thoughts on this ? Perhaps this would be best supported in jasper first, because of parameter substitution. thanks Ricardo By: Giulio Toffoli - gt78 RE: adding scripting 2005-05-12 05:21 All implemented in CVS Giulio By: Ricardo Trindade - rjst RE: adding scripting 2005-05-31 03:52 Hi, I'm downloading 5.0 to check this out! What would it take to add another scripting language ? thanks Ricardo
  8. By: Edward V. Berard - edberard Alphabetizing Field Orders 2005-05-24 11:00 I am using iReport's report wizard to create simple, one-column reports. After a few kinks, things seem to be working quite well. The reports are mostly of the form: (field/column) name (field/column) value with one line per field/column. Now, my boss wants me to alphabetize the lines on the report by (field/column) name. I know how to do the alphabetizing by hand, but I would like to do it automatically, e.g.selecting all the name- value pairs, and then using a "sort tool." Does anybody have any ideas? -- Ed By: Giulio Toffoli - gt78 RE: Alphabetizing Field Orders 2005-05-24 15:45 JRDataSources are not sortable, you have to sort data yourself. Giulio By: kootjekip - kootjekip RE: Alphabetizing Field Orders 2005-05-30 05:31 Use the order by statement in your SQL query, Greetz Wilko
  9. By: Edward V. Berard - edberard iReport By Itself (Without Java) 2005-05-23 10:30 Does anybody have any advice about using iReport (0.4.0 or 0.4.1) asa the "sole" report-generating programming language, e.g., without Java? Thanks in advance, -- Ed By: C-Box - c-box RE: iReport By Itself (Without Java) 2005-05-23 12:34 What's that for a question? What is your purpose? Why don't you want to use Java???? C-Box By: Giulio Toffoli - gt78 RE: iReport By Itself (Without Java) 2005-05-23 15:36 With JasperReports 0.6.6 or greater there is scripting support. You can write a JRCompiler for your scripting language. Ciao! Giulio By: Edward V. Berard - edberard RE: iReport By Itself (Without Java) 2005-05-23 13:19 This is one of those situations where the customer wants me to do some research. Specifically: 1. They are already using Java and iReport 2. They are trying to measure the impact of another third-party product that stands between iReport and the database. 3. The test case is simple: remove the third- party product, access the database and generate the reports entire in iReport, measure the time difference. I hope this helps. - Ed By: kootjekip - kootjekip RE: iReport By Itself (Without Java) 2005-05-25 04:55 I think Edward doesn't understand how iReport works, let's work this out: 1) iReport is the design tool, no more, no less 2) iReport creates jrxml (jasper xml files) 3) jasperReports converts jrxml files to jasperclass files (which is java) 4) jasperclass files are using iText to create a PDF or a other library to create another type of file. So there is always a application between iReport and the db, namely JasperReports, so what is the question? By: Edward V. Berard - edberard RE: iReport By Itself (Without Java) 2005-05-25 07:01 kootjekip, You are correct in assuming that I do not know how iReport works. The fact that my customer has a very hard time expressing their requirements does not help matters. 1. I now understand that iReport is a WYSIWYG design tool that creates Jasper Reports XML files. 2. I am still confused about the relationship between iReport and Jasper Reports. For example, I did not consciously install Jasper Reports on my computer. However, I think that by installing iReport on my computer, I also installed some Jasper Reports "libraries." This Jasper Reports software is used by iReport (I think) in performing some of its functions. 3. I think that I now better understand the relationship between iReport and Jasper Reports. 4. I will also begin to familiarize myself with something called iText. Let me attempt to restate (what I think is) my question. (This restatement is helped by my customer's better understanding of their problem.) At present, the customer is using iReport 0.4.0, Hibernate, and some "home-brewed" Java code to handle report generation in their distributed application. Keep in mind that this is a very large application that must handle literally millions of items every 24 hours. The customer (i.e., the developer of the application) is not happy with the performance of the application. So, they want me to investigate a few of the efficiency issues. My first instructions from the customer were not all that clear. For example, I was told to extract data from a relational database, and generate reports, "using only iReport." This was taken to mean that I could use iReport, but I could not write any Java code, for example. So, I am using iReport (0.4.1) to fashion the many necessary reports. In the process, I am learning a great deal about iReport. I very much appreciate the help that has been provided by you and other members of this group. -- Ed By: Giulio Toffoli - gt78 RE: iReport By Itself (Without Java) 2005-05-25 16:23 You can use iReport as client application to connect directly to your db, but this will not improve performance of your reports because ireport do the same of an application that run reports created using ireport. The bottleneck is JasperReports, not really third-party products between iReport and db, because we assume that Jasperreports, during the filling process, will access directly the db (or, at least the db layer, in your case hibernate). Giulio By: kootjekip - kootjekip RE: iReport By Itself (Without Java) 2005-05-30 05:29 Reading what ed has posted, the reports are used in an automated process which means you can define your template with i-Report and run jasperreports as an JSP application on a server, serving the jasper files generated with i-Report. But why can't you create your own Java additions to jasperreports? i-Report and jasper are using Java so why can't you? What is the statement of your client?
  10. By: SandeepRam - sandeepram Increasing Band Height 2005-05-28 06:15 hi, I m using iReport 0.4.1 , i want to increase the band height of summary band for the purpose of displaying the chart through openreports. But i cant increase the height above some specified value like 555. is there any limitation? This height is not enough to visible the chart. what to do ? can any one help with regards sanram By: Giulio Toffoli - gt78 RE: Increasing Band Height 2005-05-28 14:08 Show the summary on a new page (view -> report properties) Giulio
  11. By: Edward V. Berard - edberard Compilation Errors Due to Numeric "Group By"? 2005-05-23 13:30 Using iReport 0.4.1, I established a JDBC connection to a MS SQL Server relational database. I attempted to create a new report using the Report Wizard. When I got to step 3, I was asked to choose a "group by" field. If I chose any numeric field, I get errors when I go to the compile step, e.g., "Cannot cast double to string." I do not get errors if I choose a non-numeric field, e.g., a string/varchar field. What am I doing wrong? Thank you for any time and consideration. -- Ed By: Giulio Toffoli - gt78 RE: Compilation Errors Due to Numeric "Group By"? 2005-05-27 04:47 Another bug, iReport assumes you are choosing a string value Giulio
  12. By: Nelson - khchua2 How to replace a value with image 2005-05-27 02:14 I'm connecting the MYSQL. How to replace the value of a field (value is either Y or N) with an image(Tick) if the value is Y? Where can i do it, in the Print When Expression or TextField Expression? Or is there any ways of replace the value to Tick if the value is Y? TQ By: Giulio Toffoli - gt78 RE: How to replace a value with image 2005-05-27 04:45 See help forum for the response. Giulio
  13. By: hjohnson - keeneinfo Using Jasperreports with Informix 2005-05-26 14:53 I am wanting to create reports from an Informix database. Has anyone done this? I am using the Informix Web Datablade to create HTML pages. I need to be able to allow a user to select from a list of pre-defined reports. By: Giulio Toffoli - gt78 RE: Using Jasperreports with Informix 2005-05-26 16:27 Take a look at http://sourceforge.net/projects/oreports the OpenReports project Giulio
  14. By: Edward V. Berard - edberard Font Color? 2005-05-24 05:56 Can one change/select font colors in iReport? For example, white text on a black background would be nice. Thank you for your time and consideration. -- Ed By: C-Box - c-box RE: Font Color? 2005-05-24 06:06 Did you ever get IReport running and did you ever played around with it a bit!??!?!?!?! Of course you can change the fontColor... and white text on black background is again of course possible... Why don't you try before you post!??!?!? C-Box By: Edward V. Berard - edberard RE: Font Color? 2005-05-24 06:21 Dearest C-Box, Not only did I get iReport (0.4.1) up and running, I also read the "funny" US$35.00 manual, and talked to some of the current users in our shop. (I also electronically searched the PDF manual for strings such as "font color" and "color", and did not find what I was looking for.) I guess this is one of those discussion groups where intimidation of new users is a badge of honor. :-( Regardless, I will continue my investigation. -- Ed By: C-Box - c-box RE: Font Color? 2005-05-24 06:37 I didn't wanted to hurt you... but I can't stand such simple question "wasting" the forum and if a user has a real problem concerning for example colors he probably will search for it ... and your thread is under the results... so that is annoying for somebody who has really a problem and is looking for a solution... So if it's not in the manual than I believe it's kind of self-explanatory and Giulio didn't waste time to explain it within his manual....that's why I asked if you get IReport to run.... if you open the properties for an element the font-color chooser for fore- and also background color are jumping right to your face... so there you can set the background-color to black and the foregroundcolor to white and voil that's it (as far as I understand your first posting right).... but I repeat again... that is IMHO not a question worth asking ... but more a normal "trial & error" ... so don't be offended... C-Box By: Edward V. Berard - edberard RE: Font Color? 2005-05-24 06:52 C-Box, Thanks for the advice. One thing to consider is how people go about their "trial and error." For example, in Microsoft Word, one can go to the Format menu, select Font, and then choose "Font Color." The documentation for many different software products contains direct references to "font color." I appreciate all the hard work that went into iReport. I also understand the thinking of "sophisticated" iReport users. Maybe there could be another forum for "new users." Thank you for your time and consideration. -- Ed By: Giulio Toffoli - gt78 RE: Font Color? 2005-05-24 15:48 Hi Ed, font color = foreground color in iReport. Giulio By: Edward V. Berard - edberard RE: Font Color? 2005-05-25 06:24 Giulio, Thank you! :-) -- Ed
  15. By: rmeurice - rmeurice Freelance Project in Belgium 2005-04-18 08:52 Hello, We are looking for somebody able to realize a integration project with jasper / ireport what we need : - Convert crystalclear format to jasper format (ireport) as there is already +- 500 existing reports - Reports and translated reports generation based on predifined structure in the database and templates - Report integration - Page by page integrated viewer solution - Designer integration interested or need more info : RM@dvectors.com By: kootjekip - kootjekip RE: Freelance Project in Belgium 2005-05-25 04:57 haha, you're french speaking, I can do it but only when it is done in dutch....
  16. By: SandeepRam - sandeepram iReport not Running 2005-05-07 04:31 hi, when i tried to install the iReport 0.4.1 in another machine in the network , i didnt able to open the iReport. while clicking on 'iReport.bat' file , a command prompt window just blinks and disappears. I failed to open iReport. This machine is Windows 2000. I am currently Running successfully the iReport 0.4.1 in an windows XP machine. Is any thing to add into my class path or any jdk compatibility issue? can u help ? with regards sanram By: C-Box - c-box RE: iReport not Running 2005-05-08 00:09 what is the error message? don't click on the ireport.but to start ireport but open a DOS-Box instead and go to your iReport directory and call the ireport.bat from there... so you will surely get some exceptions. hth C-Box By: kootjekip - kootjekip RE: iReport not Running 2005-05-09 03:03 Try to reinstall (or install) the java virtual machine from java.sun.com Kootjekip (PS this message type belongs to the help forum) By: SandeepRam - sandeepram RE: iReport not Running 2005-05-13 12:02 hi...... in that system the are two different version of jdk -->1.3 and 1.4. I uninstalled 1.3 and the iReport works fine.. Thank U with regards sanram By: os_boy - mojacko_man123 RE: iReport not Running 2005-05-17 22:53 m new in iReports...can u help me install iReports in my system. I have a windowsXP and i have an exception error...pls help me and thanks in advance...hope to here from you soon!!! Exception in thread "main" java.lang.UnsupportedClassVersionError: it/businesslogic/ireport/gui/MainFrame (Unsupported major.minor version 48.0) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) By: Giulio Toffoli - gt78 RE: iReport not Running 2005-05-23 15:37 What JDK?
  17. By: lsbouffard - lsbouffard Download 0.5.1 2005-05-22 10:20 Hi, there is a mismatch for the 0.5.1 download. The files are tagged 0.5.0. Keep your excellent work By: Giulio Toffoli - gt78 RE: Download 0.5.1 2005-05-23 15:30 We think always forward ;-) Thanks! Giulio
  18. By: Ionut Nedelcu - ionutned Deleting a report band in iReport 2005-03-28 04:46 I tried to delete a band using iReport, but it is impossible. I also tried to delete it manually from the xml file, but when I load the design in iReports, it just adds it back. Is it a bug or a feature?:) By: C-Box - c-box RE: Deleting a report band in iReport 2005-03-29 00:27 Why you want to delete a band? If it shouldn't appear, than set it's height to cero or set it's PrintWhenExpression to something like "new Boolean(false)". hth C-Box By: Ionut Nedelcu - ionutned RE: Deleting a report band in iReport 2005-03-29 03:29 Yes, that worked fine, thank you. But maybe it would be easier if iReport would allow the user to completely remove a section which is not needed. By: Thomas Mathew - thomasmk RE: Deleting a report band in iReport 2005-05-17 08:42 Hi, you question is inductively sensible. But remember that , iReport is not doing anything by itself. It is just providing a WYSWIG(What You See is What You Get) editing support to the underlying jasper report. So what all features are available in jasper report, it can provide, not it cannot provide additional functionality that is not there in Jasper Report APIs. Hope you got the point.
  19. By: Thomas Mathew - thomasmk How to solve ClassNotFoundException 2005-05-17 08:31 I am using Eclipse IDE 3.0 for developing a report using iReport and using the JFreeChart addon feature. I generated a scriptlet with iReport. Since I want to use the scriptlet in my java code, I put the scriptlet class in the Eclipse root folder of my workspace. When I run the program from within Eclipse, I am getting a runtime exception saying, error loading scriptlet class. I know this is not of much relevant to this forum, but I tried to googled it in I didn't get a relevent link rather than a portuguese language based forum where it is asked, but I don't know portugese. Any way after some pondering I understood by running the same on command line in a separate folder with the all the classpath and jars. Eclipse is not getting the scriptlet class correctly unless we add this class explicitly to the classpath. But I dunno know why it is happening, though I tried putting the class in various folders like, bin, root etc... Anyone have any idea or any direct way rather than explicitly specifying the classpath, just post it, as it is a common problem with Eclipse it seems.
  20. By: kootjekip - kootjekip Update your website 2005-05-03 04:16 Maybe it is possible for the author of this site to update it more frequently.... By: C-Box - c-box RE: Update your website 2005-05-03 23:04 What should Giulio update if he isn't ready with the next release!?!? The weather? His daily lunch meal? So don't set dogs on Giulio!!!! Better take a look in the CVS repository for latest changes! C-Box By: kootjekip - kootjekip RE: Update your website 2005-05-04 01:47 C-Box no offence but you're not a webdesigner too, you always should update your website, show that you're working on things...and users are lazy and if you don't want to lose users you have to go to them, the do not have to go to you, just tell in simple phrases what you are doing while there is no update yet, users don't have to go to the CVS for changes only if they want to download the most recent version, changes should be accesible quickly.... By: C-Box - c-box RE: Update your website 2005-05-04 02:21 Well I also do manage some websites... also for some customers/friends/small firms... so I know that regulary updated news are essential to keep a community living. But as far as I know is Giulio very busy in coding new features into IReport in his sparetime... further he has family and a job too.... and also he tries to answer question in forum (that are from time to time very anoying because nobody seems to know the searchfunction) and the mailing list.... so all in all the community is more the forum than his homepage... and I think that community is growing well althoug the iReport-Homepage isn't updated every week.... Perhaps he should make a php-script that shows the recent changes from CVS textfile at his blog... but I guess the people who really cares are looking in the CVS. (therefore I have made an extra bookmark! :-)) Or you pay him a webMaster that does the additional work for him? Or you will do that? How often was the JasperReports-Homepage by Teodor updated before he started to do it as fulltime-job last month?????? For a one-man project (what IReport more or less really is) it's ok - IMHO! just my two cent. C-Box By: kootjekip - kootjekip RE: Update your website 2005-05-05 09:13 I know that guillio is busy...but when you don't supply users with the right information they eventually will go away... no offence... I'm sorry I didn't know guillio was the only person working on this project....i'm really really really really sorry By: C-Box - c-box RE: Update your website 2005-05-05 22:51 Well there are some other people also working at this project but the most activity (up to 90%) seems to hang at Giulio.... so perhaps a "LiveTicker" reading the information form "Changes.txt" from CVS at his Homepage would be nice and keep it up2date parallel with the CVS-changes. Not coded something similiar but with my poor PHP knowledge/experciences it shouldn't be too difficult. C-Box By: kootjekip - kootjekip RE: Update your website 2005-05-09 03:03 I know java By: Giulio Toffoli - gt78 RE: Update your website 2005-05-12 05:24 I'll restyle all the site for the end of this month. The release of iReport 0.5.0 is scheduled for the next week. Thanks for patience... Giulio By: C-Box - c-box RE: Update your website 2005-05-12 05:28 a dream comes true ... really looking forward for next release! :-) C-Box By: kootjekip - kootjekip RE: Update your website 2005-05-12 06:09 JasperReports is updating too next week, do you have time to intergrate your version with their version...would be nice to do so, you're really up to date then... keep up the good work from italy
  21. By: SandeepRam - sandeepram iReport Parameters 2005-05-03 09:36 hi, i m using iReport 0.4.1 version to create jasper reports for openreports. i have a doubt i using the parameters in i reports. Some parameters are used as , for eg:- $P{StoreId} and others as $P!{StoreId}. Whats meant by the ' ! ' symbol in $P!{}. Can any one suggest this ? with regards sanram By: C-Box - c-box RE: iReport Parameters 2005-05-03 22:54 The exclamtion-mark '!' is just used within the query if you want to use parameters within the query for the report. hth C-Box By: David - dnarmitage RE: iReport Parameters 2005-05-04 09:29 $P{PARAM} Refer to the parameter named PARAM. Can be used to add parameterize the report's SQL query. $P!{PARAM} Refer to the parameter named PARAM. This is a special syntax that can be only used in report's SQL query. It allows to insert the parameter's content into the query string. For example it can be used to create a query with dynamic WHERE clause specified through a parameter. See http://www.jasperassistant.com/docs/guide/ch06.html
  22. By: SandeepRam - sandeepram iReport 0.4.1 alignment problem 2005-05-04 03:24 hai, when i compile the xmls in iReport 0.4.1 that was designed using the eariler version iReport 0.4.1, severe alignment problem appears . Mostly the alignment change occurs at the title and pageheader bands . ie the same fields in a row are not aligned horizontally even though it all has same height. whats the reason . is there any compatibility issues with iReport 0.4.1. please give a solution to overcome this with regards sanram
  23. By: ccatindia - ccatindia pass the parameter from subreport to mainrep? 2005-05-03 01:21 How to pass the parameter from the subreport to the main report.I want to pass some values from the subreport to the main report.To do some calculations. Thanking U. Balaji By: C-Box - c-box RE: pass the parameter from subreport to main 2005-05-03 23:08 UTFSF (use the f***ing search function) before posting such a simple "daily asked" question!!!!!!! *grrr take a look here: http://jasperreports.sourceforge.net/tips.tricks.html#returnvalues hth C-Box
  24. By: Franck Andriano - altern Gantt chart 2005-04-26 08:57 Hi! Giulio can you implement it ? --*-- File DefaultChartFactory.java : else if ( chartName.equals(GANTT) ) { Vector valuesY = getSeries("serie0", props,scriptlet); // task name Vector valuesPercent = getSeries("serie1", props,scriptlet); // task pourcentage Vector theDateStartSeries = getSeries("serie2", props,scriptlet); // date start Vector theDateEndSeries = getSeries("serie3", props,scriptlet); // date end GanttCategoryDataset dataset = null; if (scriptlet == null) { dataset = getGanttSampleCategoryDataset(); } else { TaskSeriesCollection collection = new TaskSeriesCollection(); Task t = null; TaskSeries s1 = new TaskSeries(props.getProperty("title"));//we have just a single series of tasks for (int i=0; i<valuesY.size(); ++i) { t = new Task((String) valuesY.get(i), (Date) theDateStartSeries.get(i), (Date) theDateEndSeries.get(i) ); t.setPercentComplete(Double.parseDouble((String) valuesPercent.get(i))); s1.add(t); //add the new task to the task series } collection.add(s1); //add the new Series to dataset collection dataset = collection; } JFreeChart chart = null; chart = org.jfree.chart.ChartFactory.createGanttChart("", Misc.nvl(props.getProperty("categoryLabel"),""), Misc.nvl(props.getProperty("valueLabel"),""), dataset, showLegend, // include legend showTooltips, // tooltips? false // URLs? ); setChartProperties(props, chart); CategoryPlot plot = (CategoryPlot) chart.getPlot(); CategoryItemRenderer renderer = plot.getRenderer(); renderer.setSeriesPaint(0, getParameterAsColor("barColor",props, java.awt.Color.blue)); return chart.createBufferedImage(width*quality,height*quality); } protected static GanttCategoryDataset getGanttSampleCategoryDataset() { Task t = null; TaskSeriesCollection collection = new TaskSeriesCollection(); TaskSeries s1 = new TaskSeries("Project1");//we have just a single series of tasks t = new Task("Task1", date(2, 10, 2005), date(2,11,2005) ); t.setPercentComplete(Double.parseDouble("0.5")); // 50% s1.add(t );//add the new task to the task series t = new Task("Task2", date(2, 11, 2005), date(2,12,2005) ); t.setPercentComplete(Double.parseDouble("0.3")); // 70% s1.add(t);//add the new task to the task series collection.add(s1); //add the new Series to collection return collection; } private static Date date(int day, int month, int year) { // this may look a bit nuts but parameters are passed as strings so I don't want any confusion between dd/mm/yyyy and mm/dd/yyyy Calendar calendar = Calendar.getInstance(); calendar.set(year, --month, day);//month is 0 based 0 is January, 11 is December Date result = calendar.getTime(); return result; } --*-- File *.jrxml : <imageExpression class="java.awt.Image"><![CDATA[(java.awt.Image)it.businesslogic.ireport.chart.DefaultChartFactory.drawChart(new String[]{"antialias=true","tooltips=false","legend=false","chartName=Gantt","foregroundAlpha=0.33","subtitle=","plotBackground=[255,255,255]","quality=2","height=207","titlePosition=1","barColor=[0,0,255]","chartBackground=[255,255,255]","width=491","serie3=SERIE_DATE_END","serie2=SERIE_DATE_START","serie1=SERIE_POURCENT","serie0=SERIE_TASK","title=All Tasks"}, (it.businesslogic.ireport.IReportScriptlet)$P{REPORT_SCRIPTLET})]]></imageExpression> </image> --*-- best regards! By: Franck Andriano - altern RE: Gantt chart 2005-04-27 06:36 --*-- File AvailableCharts.java (change image png) ChartDefinition cd7 = new ChartDefinition(); cd7.setNeededSeries(new String[]{"TaskName","TaskPourcentage","DateStart","DateEnd" }); cd7.setChartName("Gantt"); cd7.setIcon( new javax.swing.ImageIcon( AvailableCharts.class.getClass().getResource("/it/businesslogic/ireport/icons/charts/area.png") ) ); cd7.setType("Bar charts"); cd7.setFactory("JFreeChart-0.21"); addChartSheetProperties(cd7); nsp = new SheetProperty("plotOrientation","Plot orientation",SheetProperty.COMBOBOX_NK,"2"); nsp.getTags().add(new it.businesslogic.ireport.gui.sheet.Tag(1,"Horizontal")); // nsp.getTags().add(new it.businesslogic.ireport.gui.sheet.Tag(2,"Vertical")); cd7.getSheetProperties().add(nsp); cd7.getSheetProperties().add(new SheetProperty("barColor","Bar Color", SheetProperty.COLOR ,"[0,0,255]")); cd7.getSheetProperties().add(new SheetProperty("foregroundAlpha","Foreground Alpha", SheetProperty.NUMBER ,"0.33")); cd7.getSheetProperties().add(new SheetProperty("valueLabel","Y Label label", SheetProperty.STRING,"" )); cd7.getSheetProperties().add(new SheetProperty("categoryLabel","X Label", SheetProperty.STRING,"" )); charts.add(cd7);
  25. By: kumar naidu c - kumarnaidu Error java.lang.NoSuchMethodError 2005-04-27 03:15 i am trying to use iReport-0.3.2 , i installed jdk1.5.0_02 and i copyed tools.jar to iReport lib directory when i try to start iReport.bat it is giving error Exception in thread "main" java.lang.NoSuchMethodError at it.businesslogic.ireport.gui.JNumberComboBox.<init>(JNumberComboBox.j ava:66) at it.businesslogic.ireport.gui.MainFrame.initComponents(MainFrame.java: 751) at it.businesslogic.ireport.gui.MainFrame.<init>(MainFrame.java:242) at it.businesslogic.ireport.gui.MainFrame.main(MainFrame.java:5129) please give me some solution for this problem as soon as possible ...
×
×
  • Create New...