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

leeyuiwah

Members
  • Posts

    95
  • 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 leeyuiwah

  1. Hi, I was trying to build JasperServer Professional, following the instruction on JasperServer-Pro-Source-Build-Guide.pdf (Pg. 22) I could successfully build in the first step (jasperserver), but when I came to the second step (jasperserver-repository-hiberate/build-db), I got these error messages: [hibernatetool] 54 errors occurred while performing <hbm2ddl>. [hibernatetool] Error #1: java.sql.SQLException: Table 'jasperserver.jibeandatasource' doesn't exist [hibernatetool] Error #1: java.sql.SQLException: Table 'jasperserver.jicontentresource' doesn't exist [hibernatetool] Error #1: java.sql.SQLException: Table 'jasperserver.jicustomdatasource' doesn't exist [hibernatetool] Error #1: java.sql.SQLException: Table 'jasperserver.jicustomdatasourceproperty' doesn't exist [hibernatetool] Error #1: java.sql.SQLException: Table 'jasperserver.jidatatype' doesn't exist [hibernatetool] Error #1: java.sql.SQLException: Table 'jasperserver.jifileresource' doesn't exist [hibernatetool] Error #1: java.sql.SQLException: Table 'jasperserver.jifileresource' doesn't exist [hibernatetool] Error #1: java.sql.SQLException: Table 'jasperserver.jiinputcontrol' doesn't exist [hibernatetool] Error #1: java.sql.SQLException: Table 'jasperserver.jiinputcontrol' doesn't exist [hibernatetool] Error #1: java.sql.SQLException: Table 'jasperserver.jiinputcontrol' doesn't exist [hibernatetool] Error #1: java.sql.SQLException: Table 'jasperserver.jiinputcontrol' doesn't exist ... (and many other similar lines) I went into mysql and saw that those tables are actually there in the DB.
  2. Okay I found the problem. I realized the file RepoResource.hbm.xml (and a number of other hbm.xml files) went missing in the directory jasperserver-repository-hibernate/src/main/resources/com/jaspersoft/jasperserver/api/metadata/common/service/impl/hibernate/persistent I don't know how this could happen, but after I unzipped the zipfile again (into a different directory), I saw these files were there (meaning the source zipfile is fine). I proceeded to build and this time I could get pass that error message. Thanks!
  3. Hi, I tried two things but neither of them helped. I am stuck here and would very much appreciate some help. 1. I manually installed a newer hibernate-tools jar (to 3.2.3.GA) into my local repo, thinking that may be the old hibernate-tools (3.1.0beta4) was the problem. $ mvn install:install-file \ -DgroupId=org.hibernate \ -DartifactId=hibernate-tools \ -Dversion=3.2.3.GA \ -Dpackaging=jar \ -Dfile=./hibernate-tools-3.2.3.GA.jar By the way, if there are multiple versions of the same jar in the local repo (<user.home>/.m2/repository), do I need to do anything to ask Maven2 always pick up the latest one? 2. I switched to use a newer JDK (jdk1.6.0_03). Previously I was using jdk1.5.0_16)
  4. I was building JasperServer (3.5.0), and I ran into this problem An Ant BuildException has occured: org.hibernate.MappingException: Following superclasses referenced in extends not found: com.jaspersoft.jasperserver.api.metadata.common.service.impl.hibernate.persistent.RepoResource I checked the source code and both RepoResource and RepoResourceBase (which RepoResource extends) are there in the same folder $ find . -name "RepoResource*" ./jasperserver-api-impl/metadata/src/main/java/com/jaspersoft/jasperserver/api/metadata/common/service/impl/hibernate/persistent/RepoResource.java ./jasperserver-api-impl/metadata/src/main/java/com/jaspersoft/jasperserver/api/metadata/common/service/impl/hibernate/persistent/RepoResourceBase.java ./jasperserver-api-impl/metadata/target/classes/com/jaspersoft/jasperserver/api/metadata/common/service/impl/hibernate/persistent/RepoResource.class ./jasperserver-api-impl/metadata/target/classes/com/jaspersoft/jasperserver/api/metadata/common/service/impl/hibernate/persistent/RepoResourceBase.class And then I searched on the web. No one seem to have discussed this issue on JasperForge.org, but on a hibernate site I saw a discussion that alluded to a possible interaction between "AnnotationConfiguration" and "add method of Configuration" http://opensource.atlassian.com/projects/hibernate/browse/ANN-151 I wonder if anyone in has seen this problem before.
  5. Hi, Where can I find the content for jasperserver-repo, that is supposed to come with the source code of jasperserver when it was distributed as zip file? I am now getting the source using anon SVN, but there is no jasperserver-repo underneath the top directory jasperserver/branches/js-3.5.0 I am asking this question because now I hit the famous error of "Failed to resolve artifact" when trying to build the source using maven2. I have read about the common suggested solution on Source-Build-Guide, and on 5 different postings on the forum. However, I think my problem was not due to the common mistake (wrong setting in settings.xml) because I've checked again and again my settings in settings.xml (more than 20 times) and think my settings are correct. The four missing artifacts are these four (and only these four), and I believe they exhibit a certain pattern: jaspersoft.ji-pro.ji-jpivot-ui:ji-jivot:jar:3.5.0 jasperreports:jasperreports-chart-themes:jar:3.5.0 jfree:jcommon:jar:1.0.15 jfree:jfreechart:jar:1.0.12 I also tried pointing to the "new" repo http://rs.jaspersoft.com/maven2 that Sherman wrote about (in 03/25/2007) but it didn't help (error was HTTP 503, see full error message below). http://tinyurl.com/ohtz26 Thanks! Code:
  6. Sherman, It is great to hear tha tyou are integrating FusionCharts. I look forward to this new feature. Thanks! Clement
  7. bsandberg, A JasperSoft support guy told me that I can use this to start iReport 3.5 with update checking disabled. However, it did not work for me. c:\Program Files\JasperSoft\iReport-nb-3.5.0\bin>ireport_w.exe -J-Dplugin.manager.check.updates=false I resorted to changing the core.properties file instead.
  8. Hi, The core.properties file will be created only after you get a chance to change the options in your iReport 3.5. In my case I found that iReport 3.5 freezes before even I could do that. As such the core.properties may not be there. In this case, you can create the file with contents like this (substitute your own parameters): #Wed Apr 22 20:12:04 EDT 2009 WWWBrowser=SL[/browsers/SystemDefaultBrowser proxyHttpPort=8000 proxyType=2 proxyHttpHost=http\://proxy.company.com
  9. Hi, I tried the trick suggested by Teodor (Post #7491) and it did work. Thanks! To ease the testing on both iReport and JasperServer, I use this idiom for the subreport expression (since they expect different things in the two settings: a local file name like "foo.jasper" and a JS "Name" for the uploaded JRXML file like "foo" 1. I defined a Boolean parameter isOnJS ("is running on a jasperserver). The value will be default to "new Boolean(false)" and "new Boolean(true)", respectively, for the two settings. 2. I also defined a String parameter subRptExt. The value will be default to this expression: $P{isOnJS}.booleanValue() ? "" : ".jasper" 3. The parameter $P{SUBREPORT-DIR} is defined to be $P{isOnJS}.booleanValue() ? "repo:" : "C:\\path\\to\\local-dir\\" 4. The subreport expression for the subreport is defined to be $P{SUBREPORT_DIR} + "foo" + $P{subRptExt} In other words, when run in iReport and in JasperServer, the subreport expression will be expanded to these two names respectively: "C:\\path\\to\\local-dir\\foo.jasper" "repo:foo" 5. When uploading the subreport's JRXML file (e.g. foo.jrxml) to JS, make sure to name it exactly the same as the JASPER file (used in Step 3), except that the extension ".jasper" has to be dropped. E.g. "foo" (I could have done away the parameter "subRptExt" if I am willing to name a JS name for a JRXML file with a suffix ".jasper", but I would rather not at least for now) So this is working, but a bit tedious. Are there easier and more elegant solution? Specifically, is there already a parameter that functions like my "isOnJS" ? Thanks!
  10. I found that it was probably due to the fact that I am in a network behind a web proxy so the "checking for updates" could not go pass our firewall and somehow hung there. The problem then became how could I complete my change to the proxy setting before the program freezes. Finally, I found that the properties file for remembering the proxy setting is C:\Documents and Settings\<username>\Application Data\.ireport\3.5.0\config\Preferences\og\netbeans\core.properties So I modified that file outside of iReport and I seemed to have get pass the problem. Thanks!
  11. Hi, I downloaded the latest iReport 3.5.0 (iReport-nb-3.5.0). When I started it, it froze on the start-up screen. In the lower right corner, there is an indication that "Checking for updates". Any help? Thanks a lot!
  12. I really like the idea of integrating Jasper with Open Flash Chart 2 (OFC). In particular this user feature -- when the user mouses over a data point, there will be a tooltip popping up telling the exact values of the data point. I understand JasperSoft only positions the support of OFC as a "proof of concept". I could not find much discussion about this support on the Internet, so I explored a bit how much integration has been there. Here are what I found I am using JasperServer-Pro 3.5. Based on the sample report (/organization_1/Reports/Samples/Open Flash Charts Report), I js-export'ed the sample report, and then hack the resulting data file in the report unit. (I don't know how to edit the support of OFC in iReport, so for now I am resorting to manually hacking of the JRXML file). The key is to replace the section marked by the tag <barChart> by its equivalent of <ofc:barChart>. And then I js-import'ed (with --update) the report back into JasperServer. This is working and the resulting chart is very cool! However, there are two limitations: 1. Currently, there are only support for bar chart and pie chart. But I need line chart. 2. Apparently the report cannot have parameters. I tried with a report with some parameters and JasperServer/OFC would fail (no error message -- the flash movie just did not run). I wonder if there is any plan to promote the support of OFC from "proof-of-concept" to "official"? Alternatively, if we want to add the support by ourselves, how difficult it would be? Thanks!
  13. On the other hand, the answer as described in Post #16497 in this post may be useful for your question in mind http://tinyurl.com/8nokn6 See also my post #50677 in this thread http://tinyurl.com/b7nfkw Good luck!
  14. Unfortunately, I haven't figured the answer yet. Cheers!
  15. Matt Thanks for your info. Via JasperServer I could see the reports running, but how I can retrieve the source of these reports (the JRXML files)? Thanks! Clement
  16. Dear Matt, Thanks for explaining to me the use of $X! By the way, I do have a JasperServer Professional package. The installer's name is jasperserver-pro-3.0.1-linux-installer.bin But still, in the installed directory (/opt/jasperserver-pro-3.0) (I installed a 3.0.1 and then upgraded it to 3.1, but the top directory did not change) I could not find the same "demo" directory (jasperreports-3.1.0/demo/samples/query/QueryReport.jrxml). When I did a search by the unix "find" command, I got this [root@mh-tmp-central jasperserver-pro-3.0]# pwd /opt/jasperserver-pro-3.0 [root@mh-tmp-central jasperserver-pro-3.0]# find . -name demo ./java/demo ./scripts/js-catalog/resources/PersonalFolders/demo ./scripts/oracle/js-catalog-oracle/resources/PersonalFolders/demo Thanks anyway! Clement
  17. Interesting ... So it looks like X is NOT a parameter name, and we have to use $X literally to get this effect, right? So $X is more like a macro that gets expanded to the semantics that you mentioned. I could only find one example, which is jasperreports-3.1.0/demo/samples/query/QueryReport.jrxml Note that the above is the non-professional package. In my professional package, I could not even find the same directory .../demo/samples Thanks!
  18. I also need the answer to this question. Thanks a lot! Clement
  19. This was the first time I tried to create my own Analysis View. I was following the instruction on the JasperAnalysis-Pro-User-Guide.pdf, Section 3.2.1 "Creating an Analysis View with a Mondrian Connection" (pg 24-29). All seemed to work fine. Except that when I tried to run the view, I got the following exception (full stack trace is in the code section of this post) javax.servlet.jsp.el.ELException: An error occurred while getting property "result" from an inst ance of class com.tonbeller.jpivot.tags.OlapModelProxy javax.servlet.jsp.el.ELException: An error occurred while getting property "result" from an inst ance of class com.tonbeller.jpivot.tags.OlapModelProxy at org.apache.commons.el.Logger.logError(Logger.java:484) at org.apache.commons.el.Logger.logError(Logger.java:588) at org.apache.commons.el.ArraySuffix.evaluate(ArraySuffix.java:318) at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145) at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:2 63) I also included the schema that I used, as well as the MDX expression that I used when this Exception occured. Help will be much appreciated. Thanks! Clement Code:javax.servlet.jsp.el.ELException: An error occurred while getting property "result" from an instance of class com.tonbeller.jpivot.tags.OlapModelProxyjavax.servlet.jsp.el.ELException: An error occurred while getting property "result" from an instance of class com.tonbeller.jpivot.tags.OlapModelProxy at org.apache.commons.el.Logger.logError(Logger.java:484) at org.apache.commons.el.Logger.logError(Logger.java:588) at org.apache.commons.el.ArraySuffix.evaluate(ArraySuffix.java:318) at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145) at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:263) at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:190) at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:917) at org.apache.jsp.WEB_002dINF.jsp.olap.viewOlap_jsp._jspx_meth_c_if_5(viewOlap_jsp.java:2528) at org.apache.jsp.WEB_002dINF.jsp.olap.viewOlap_jsp._jspService(viewOlap_jsp.java:398) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301) at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:142) at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:247) at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1105) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:841) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:755) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:350) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.tonbeller.wcf.controller.RequestFilter$MyHandler.normalRequest(RequestFilter.java:141) at com.tonbeller.wcf.controller.RequestSynchronizer.handleRequest(RequestSynchronizer.java:127) at com.tonbeller.wcf.controller.RequestFilter.doFilter(RequestFilter.java:281) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.jaspersoft.jasperserver.war.common.UploadMultipartFilter.doFilter(UploadMultipartFilter.java:86) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264) at org.acegisecurity.ui.switchuser.SwitchUserProcessingFilter.doFilter(SwitchUserProcessingFilter.java:335) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at com.jaspersoft.ji.license.JILicenseFilter.doFilter(JILicenseFilter.java:107) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at com.jaspersoft.jasperserver.api.metadata.user.service.impl.MetadataAuthenticationProcessingFilter.doFilter(MetadataAuthenticationProcessingFilter.java:141) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at com.jaspersoft.jasperserver.war.util.RequestParameterAuthenticationFilter.doFilter(RequestParameterAuthenticationFilter.java:97) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:181) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at com.jaspersoft.jasperserver.war.UserPreferencesFilter.doFilter(UserPreferencesFilter.java:165) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at com.jaspersoft.jasperserver.war.UserPreferencesFilter.doFilter(UserPreferencesFilter.java:165) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:191) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:90) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.jaspersoft.jasperserver.war.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:70) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595)======================================================<?xml version="1.0"?><Schema name="AwareDemo"><Cube name="All_Resources"> <Table name="Resource_Usage"/> <Dimension name="Category" foreignKey="FK_Category"> <Hierarchy hasAll="true" allMemberName="All Categories" primaryKey="PK_Category"> <Table name="Category"/> <Level name="Category" column="Category_Name" uniqueMembers="true"/> <Level name="Type" column="Category_Type" uniqueMembers="false"/> </Hierarchy> </Dimension> <Dimension name="Period" foreignKey="FK_Period"> <Hierarchy hasAll="true" allMemberName="All Period" primaryKey="PK_Period_Start"> <Table name="Period"/> <Level name="Year" column="Year" type="Numeric" uniqueMembers="false"/> <Level name="Quarter" column="Quarter" type="Numeric" uniqueMembers="false"/> <Level name="Month" column="Month" type="Numeric" uniqueMembers="false"/> <Level name="Week" column="Week" type="Numeric" uniqueMembers="false"/> <Level name="Day" column="Day" type="Numeric" uniqueMembers="false"/> <Level name="Hour" column="Hour" nameColumn="Period_Start_Name" type="Numeric" uniqueMembers="false"/> <Level name="Day_Of_Week" column="Day_Of_Week" type="Numeric" uniqueMembers="false"/> <Level name="Day_Of_Year" column="Day_Of_Year" type="Numeric" uniqueMembers="false"/> </Hierarchy> </Dimension> <Measure name="Total Bytes" column="Total_Bytes" aggregator="sum" formatString="#,###"/> <Measure name="Total Airtime" column="Total_Airtime" aggregator="sum" formatString="#,###"/> <Measure name="Total Connection Setups" column="Total_Connection_Setups" aggregator="sum" formatString="#,###"/></Cube></Schema>=============================================================Select {[Measures].[Total Bytes], [Measures].[Total Airtime], [Measures].[Total Connection Setups] } ON COLUMNS, NON EMPTY {([Category].[All Categories], [Period].[All Period])} ON ROWS from [All_Resources]==============================================================
  20. Dear Sherman, Thanks! A mystery solved! (see also Post #16497 in http://tinyurl.com/8nokn6) The first method works for me but not the second, because I have to set the date of the Calendar object to a different date than today. BTW, for the record, in case someone else comes to this. Please note that after you created the helper class, compiled the .class and package the .jar file, you need to make the .jar file available to Jasper. If you use iReport, this means that you have to do "Tools->Options->Classpath->'Add JAR'". If you use JasperServer, you have to put the .jar under the correct WEB-INF/lib directory. Clement
  21. Dear Sheman, I already did the "ckean up of input param" step (as I said I found that the original replaceAll() method suggested by Anand (Post #49912) did not seem to work and I was using a different replaceAll() (see the code listed in Post #50492). I think the problem is with how Jasper/iReport treat Java generics (i.e. Collection<String> instead of just Collection). Luckily, however, I tried the link that you provide and in that thread I found out how to use a helper class (Post #16497) (also thank you for your answer in Post #50672 http://tinyurl.com/8b7kzg) and that solved my problem. (And I also resorted to NOT using Java generics but using type cast instead.) BTW, for the record, in case someone else comes to this. Please note that after you created the helper class, compiled the .class and package the .jar file, you need to make the .jar file available to Jasper. If you use iReport, this means that you have to do "Tools->Options->Classpath->'Add JAR'". If you use JasperServer, follow the instruction of Post #16507 in that thread. Thanks for all your help!
  22. Hi, I tried it, but the parameter of type java.util.ArrayList got this value when I print $P{param_ArrayList}.toString() ((java.util.ArrayList)parameter_param_ArrayList.getValue()).toString() but not the real value of the Jasper parameter $P{param} More generally, since java.util.ArrayList (an implementation of the interface java.util.Collection) is now a parameterized type, how should we fill in the value for the field "Parameter Class" for this Jasper parameter? I tried just filling in "java.util.ArrayList" and I got the above mistake. I tried also filling in "java.util.ArrayList<String>" and I got "java.lang.ClassNotFoundException: java.util.ArrayList<String>" Thanks! Clement P.S. I found that (in my Java test program) I had to use a different processing for the string to get the "collection to mysql string" right. The method that I used was shown in the code section below. Code:"'" + $P{ha_ip_String_ArrayList}.toString().replaceAll("[\[\]]", "").replaceAll(", ", "', '") + "'"This will get[135.112.1.1, 66.67.1.1]converted into'135.112.1.1', '66.67.1.1'
  23. According to the iReportDefinitiveGuide (Ch 11, pg 200), I should be able to call up the Scriptlet editor by select Edit->Scriptlet Editor, but on my iReport (come with JasperReports-Pro 3.1.2), I could not do that. Is Scriptlet support retained in 3.1.2? On this page for "iReport NB Release 3.1.2" http://tinyurl.com/7bsllo It says "Coming features: * Scriptlet wizard (plugin for NetBeans IDE only)", what does it mean? Clement
  24. In iReport, the report parameters are java object. But how can we ask these objects to perform some object methods that return null? The only way that I know asking these objects to perform any method is in the "Default Value Expression" of the parameter. But there is a severe limitation. The java object method must returns itself (the object) -- so as to "initialize" the parameter. If this sounds too abstract, here is what I want to do. 1. I can make a parameter of the type java.util.Date, let's call this $P{today} 2. To get the "day" value of the Date object, the right way to do is to use java.lang.Calendar, in the following sequences: Calendar cal = Calendar.getInstance(); cal.setTime($P{today}); // setTime() method returns void cal.get(Calendar.DATE_OF_MONTH); // get the "day" value But the problem is how can I fit the above steps into the iReport's model? a. As I said, the "Default Value Expression" requires that the expression returns a java object to fill up the parameter. b. If I ask cal to setTime(), it returns a type of "void" c. Can I define a function in iReport? So that I can group the above multiple statements into one function call, say getDay(), and then have this function called at the "Default Value Expression" of another parameter (e.g. $P{today_Day}). I am stuck here. Please help. Happy New Year! Clement
  25. Teoder, Thanks for your answer. Now that after I upgrade to JS 3.1, I have the same question as Gaby38 and mpgm above. I could not an editable property called labelFormat or legendFormat. In fact, even if I save the JRXML file, there are no such string in the file. I do see that if I changed the theme from "nothing" to simple, then in the labels the percentages would be displayed. Unfortunately this is not good enough for me, because I am also asked to display the value. Thanks! Happy New Year! Clement
×
×
  • Create New...