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

ktrinad

Members
  • Posts

    1,134
  • 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 ktrinad

  1. By: openross - openmax71 Request: Parameter field in the User DB  2006-04-12 23:49 Can be add one o more field in the user db that i can use later as parameter for jasperreport ?  Example : I have a DataBase with sales of customer and one report that show this. The report accept as parameter the customer ID so if i insert this ID in the user DB of jasperserver and in the report the possibility to link this with the parameter, i can make only one report for every customer/user the log in the jasperserver. By: T Kavanagh - tkavanagh RE: Request: Parameter field in the User DB  2006-05-10 14:40 I believe that this is in the roadmap. Ie. being able to link to external reports from inside a jrxml. By: Sherman Wood - sgwood RE: Request: Parameter field in the User DB  2006-05-11 04:48 This is in Tracker:  http://sourceforge.net/tracker/index.php?func=detail&aid=1470244&group_id=162962&atid=825864   I have added the user object into the runtime context. It is available in the report as $P{LoggedInUser}. This will be part of the next release.  Sherman
  2. By: Georg Joo - joogeorg after installation no known user  2006-05-10 02:24 But I have a little problem with the database (MySQL). I didn't install the server with the installer, but only with the zip file by hand.  So everything works fine, but in the jasperserver database I have no user to login. I didn't found the tomcat user, not the joeuser.  Now I have 13 users. (admin, jim, emil, vital, sarah, sally, max, will, chris, beth, kristen, jaime, matt). What are the login information for my installation? How can I insert a user ?  I created the database with the db-dump-113005.sql dump. The other scripts didn't work.  Have someone information.  regards  Ing. Georg Joo By: T Kavanagh - tkavanagh RE: after installation no known user  2006-05-10 14:24 Hi Georg,  I just finished getting the most current docs on-line for the "stand-alone" war file installation.  Please take a look at the Documents section of the web site. You should find a link (and a PDF) at "Stand-alone War Install Guide". (The download file zips will not get updated until our next release at the end of May).  This install document has a couple of sections that deal with database configuration.  But, just to give you a short idea about how things are setup:  There are two databases:  jasperserver  sugarcrm  sugarcrm holds sample data and should be populated using the db-dump sql script.   All the other scripts should be run against the jasperserver database. The jasperserver database holds the metadata that JasperServer needs to run.  The jasperserverTestMetadata.sql is the one that creates the tomcat user and the joeuser user.  The users you mention (sally, max, will, etc) are from the sugarcrm sample data (data used to "fill" the sample reports). JasperServer only references a small sub-set of the tables found in sugarcrm. The sugarcrm.user table is only used for display (ie. not for logging in).  Let me know if this helps.  -Tony  By: Georg Joo - joogeorg RE: after installation no known user  2006-05-10 23:24 Hi Tony  Thanks for your answer.  I was a little confused with the scripts. I read the docs a second time and now a have 2 databases - jasperserver and sugarcrm. All user are now available. (jasperadmin, joeuser)  All works fine.  thanks  GeorgÂ
  3. By: Herbert Augustiny - haugusti Parameter not working  2006-05-10 05:53 Hi All  I'm rying to run a report in jasperServer which requires a string parameter. I have defined the input control as described in the user guide and when I run the report it prompts for the parameter. But on Submit, I'm getting this error message: fillParameters.error.greaterOrEqual I have tried various different settings but so far without lick.  How can I debug this?  Herbert By: Ionut Nedelcu - ionutned RE: Parameter not working  2006-05-10 06:54 Hello  This bug was fixed but the fix will only be available in the next release.  We apologize for the inconvenience.  Ionut By: Herbert Augustiny - haugusti RE: Parameter not working  2006-05-10 07:10 When will this be available?  Is there a running development version I can download somewhere?  Herbert By: T Kavanagh - tkavanagh RE: Parameter not working  2006-05-10 14:47 Herbert, we are a little behind in getting the source "synced". The source that is available for download from sourceforge right now is the 0.9.2 version of the source (ie. to match the current release).   We are working to move the source repository we are using from an internal subversion repository to a sourceforge based one. Once we do this, users will be able to get the head version of source without any trouble (as well as tagged versions to match the releases). All bug fixes would go straight into the head version of source.  The next release is due at the end of May (so two and a half more weeks).  -Tony
  4. By: tortois - tortois Sample SalesByMonth runtime report problem  2006-05-08 08:37 Hello,  Using JasperServer (installed on WinXP using jasperserver-0.9.2-windows-installer.exe) with bundled mysql and tomcat I have a problem with SalesByMonth report (sample AllAccounts report is working fine). After setting input parameters as suggested (other values also tried with the same results):  Text Input Control: 999 Checkbox Input Control: checked List Input Control: Yet another item DateInput_label: 08-05-2006 17:31 (any date) and pressing submit I got:  Error Message:  org.springframework.webflow.ActionExecutionException: Exception thrown executing [AnnotatedAction@6bfd73 targetAction = com.jaspersoft.jasperserver.war.action.ViewReportAction@1ccc6c8, attributes = map[[empty]]] in state 'verifyData' of flow 'viewReportFlow'; nested exception is com.jaspersoft.jasperserver.api.JSException: Error creating connection.   Error Trace: org.springframework.webflow.ActionExecutionException: Exception thrown executing [AnnotatedAction@6bfd73 targetAction = com.jaspersoft.jasperserver.war.action.ViewReportAction@1ccc6c8, attributes = map[[empty]]] in state 'verifyData' of flow 'viewReportFlow'; nested exception is com.jaspersoft.jasperserver.api.JSException: Error creating connection. com.jaspersoft.jasperserver.api.JSException: Error creating connection. at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.JdbcDataSourceService.createConnection(JdbcDataSourceService.java:53) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.BaseJdbcDataSource.setReportParameterValues(BaseJdbcDataSource.java:47) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:472) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:258) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.executeReport(EngineServiceImpl.java:576) at com.jaspersoft.jasperserver.api.engine.jasperreports.domain.impl.ReportUnitRequest.execute(ReportUnitRequest.java:58) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.execute(EngineServiceImpl.java:228) at com.jaspersoft.jasperserver.war.action.ViewReportAction.verifyData(ViewReportAction.java:92) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.webflow.util.DispatchMethodInvoker.invoke(DispatchMethodInvoker.java:231) at org.springframework.webflow.action.MultiAction.doExecute(MultiAction.java:141) at org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:67) at org.springframework.webflow.AnnotatedAction.execute(AnnotatedAction.java:208) at org.springframework.webflow.ActionExecutor.execute(ActionExecutor.java:54) at org.springframework.webflow.ActionState.doEnter(ActionState.java:184) at org.springframework.webflow.State.enter(State.java:201) at org.springframework.webflow.Transition.execute(Transition.java:224) at org.springframework.webflow.TransitionableState.onEvent(TransitionableState.java:105) at org.springframework.webflow.Flow.onEvent(Flow.java:545) at org.springframework.webflow.execution.impl.FlowExecutionControlContextImpl.signalEvent(FlowExecutionControlContextImpl.java:199) at org.springframework.webflow.execution.impl.FlowExecutionImpl.signalEvent(FlowExecutionImpl.java:239) at org.springframework.webflow.executor.FlowExecutorImpl.signalEvent(FlowExecutorImpl.java:177) at org.springframework.webflow.executor.support.FlowRequestHandler.handleFlowRequest(FlowRequestHandler.java:100) at org.springframework.webflow.executor.mvc.FlowController.handleRequestInternal(FlowController.java:198) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:45) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:796) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:727) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:360) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) 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.jaspersoft.jasperserver.war.common.UploadMultipartFilter.doFilter(UploadMultipartFilter.java:83) 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:292) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:79) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:143) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:138) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303) at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:207) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:246) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:220) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:173) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:120) 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) Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2928) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:771) at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3649) at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1176) at com.mysql.jdbc.Connection.createNewIO(Connection.java:2558) at com.mysql.jdbc.Connection.(Connection.java:1485) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266) at java.sql.DriverManager.getConnection(DriverManager.java:525) at java.sql.DriverManager.getConnection(DriverManager.java:171) at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:48) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:771) at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.JdbcDataSourceService.createConnection(JdbcDataSourceService.java:50) ... 69 more   Anyone? By: Sherman Wood - sgwood RE: Sample SalesByMonth runtime report proble  2006-05-08 08:51  Looks like the JDBC Connection information for the report is wrong. Can you go into the repository browser and check the JDBC data source parameters?   Sherman JasperSOft By: tortois - tortois RE: Sample SalesByMonth runtime report problem  2006-05-08 14:25 indeed. setting password for jdbc connection fixed the problem. thanks! By: T Kavanagh - tkavanagh RE: Sample SalesByMonth runtime report proble  2006-05-08 14:34 There is a bug in the installer routine which does not get the repository JDBC connection created with the password that the user has entered during the installation process. The password ends up being "MyRootPwd" (instead of your entered one). I have logged this bug. It will be fixed with our next point release (end of May).
  5. By: David Lafay - davidlafay HELP about Permission/Role and Report  2006-04-13 10:14 I have created a new unit report with a JRXML report. I have set that the report is only for a specific role but all my users can play the report.  Do you have an idea...  Well, I think, I have a problem with role because if I create a new Role and affect a new user to this new role then the user can't connect ! By: Sherman Wood - sgwood RE: HELP about Permission/Role and Report  2006-04-13 12:40  1. In the release notes, we note that the object level security is not fully implemented. You can define the security, but the machinery underneath is not fully configured right now.  2. The default security model requires that a user have the ROLE_USER or ROLE_ADMINSTRSTOR role in order to log in. This is set in the Acegi security /WEB-INF/applicationContext-security.xml - see the filterInvocationInterceptor bean showing the page level security. You can change this as needed.    Sherman By: David Lafay - davidlafay RE: HELP about Permission/Role and Report  2006-04-13 14:48 Thanks for your response.  Do you think that the object security will be implemented in the next (1.0?) release.   David By: Sherman Wood - sgwood RE: HELP about Permission/Role and Report  2006-04-13 14:59  I am working on it now - I intend it to be there by the end of April.   Sherman JasperSoft By: David Lafay - davidlafay RE: HELP about Permission/Role and Report  2006-04-19 12:15 Thanks. With security, JasperServer will be usable for production  Â
  6. By: Manfred Moser - mosabua Reports not working  2006-04-10 13:23 Hi!  I got the install done and everything seems to be fine on the system. The only thing that is not working are the two reports. In both of them I get  org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.jaspersoft.jasperserver.api.metadata.jasperreports.domain.impl.datasource.RepoReportDataSource#6]  Has anybody tried the installer and it all works? Where do I start with debugging?   manfred By: Sherman Wood - sgwood RE: Reports not working  2006-04-10 17:50  Was this the Linux or the Windows installer?  Did you install over an pre-existing MySQL installation or let the installer create a new version?  Sherman JasperSoft By: Manfred Moser - mosabua RE: Reports not working  2006-04-11 13:13 This is on Windows (unfortuantely) and I used a new tomcat install and an existing MySql install. The databases are there just fine.. By: Sherman Wood - sgwood RE: Reports not working  2006-04-11 13:52  I can't recreate the problem you are having. We are working on improving the Windows installer to cope better with reusing an existing DB, and will bre releasing an update in the next day.    Sherman JasperSoft By: Manfred Moser - mosabua RE: Reports not working  2006-04-11 13:54 No problem. I will just use try the next release then ;-) and let you know more then. By: Sherman Wood - sgwood RE: Reports not working  2006-04-12 21:53  New versions of the installers have been released. The changes do a much better job of being able to use existing MySQL installations.   Sherman JasperSoft By: Manfred Moser - mosabua RE: Reports not working  2006-04-13 08:24 I got the file notification already. Currently downloading ;-) By: Manfred Moser - mosabua RE: Reports not working  2006-04-13 08:56 Hm... I downloaded the new installer and uninstalled the older version (excluding MySql), dropped the databases and reinstalled with the new version. Unfortunately I ended up with the same problem. Upon closer examination I found that the table jasperserver.reportdatasource only has one id field and nothing else. Surely that can't be right!  manfred By: Sherman Wood - sgwood RE: Reports not working  2006-04-13 15:03  What version of MySQL were you installing into?  We are cleaning up the database mapping. Right now, we generate the schema with Hibernate, which is quick but dirty.   Sherman By: Manfred Moser - mosabua RE: Reports not working  2006-04-13 17:01 I am not certain of the MySQL version. I will let you know after Easter. Not at work anymore...  In terms of Hibernate for multiple db ..check out the jbpm.org db package. For normal development we use hsqldb and then we got the db package for the different databases. We can run all tests against any db.   Happy egg hunting ;-) By: Manfred Moser - mosabua RE: Reports not working  2006-04-19 09:10 I used MySql 4.1. I now upgraded to MySql 5.0.20 and it works just fine ;-). Maybe some issue with the driver and the schema creation for 4.1. Not to worry.  manfred
  7. By: Rouxxx - rouxxx Permissions on Folders  2006-04-12 09:34 Hi all,  The repository folders have no permissions.  I suppose that we can not give permissions on folders. Am I right?  If I am, my request should go to the feature requests I think :P. By: Sherman Wood - sgwood RE: Permissions on Folders  2006-04-12 10:38  This will be easy to add.  We are using the Spring subproject, Acegi Security, for object level security. The aim is to be able to secure access to any object. While we have object level security maintenance there in the UI, I have not completed the testing to be happy with this functionality. It will be done for the 1.0 release later this month.   Sherman JasperSoft By: Rouxxx - rouxxx RE: Permissions on Folders  2006-04-12 23:56 Ok, great!
  8. By: openross - openmax71 Installing on Gentoo  2006-04-11 06:04 I'm try to install over linux gentoo using  tomcat-5.0.27-r6 and mysql-5.0.19 and starting from jasperserver-0.9.0-linux-installer.bin  i have got 2 error that i have manualy correct : (I have do install with for my own service tomcat & mysql) 1) symlink mysql.exe to /usr/bin/mysql 2) copy the script jasperserverCreateDefaultSecurity.sql to jasperserverCreateDefaultSecurity.ddl  now jasperserver is installed on  /opt/jasperserver-0.9.0 and the webapps in /opt/tomcat5  but when i log in i receive the following error : Caused by: java.sql.SQLException: No suitable driver at java.sql.DriverManager.getDriver(DriverManager.java:243) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:773) ... 49 more  i verified context.xml e web.xml with right config and user and password in the mysql database (where i found all the db create by installation) and i have the jdbc-mysql.jar in /common/lib   what i have to check now ?  why java don't link the mysql jdbc jar file ?  NB. if i put hsqldb-1.7.1.jar (from ireport package) in my /common/lib i got this error instead : Caused by: java.lang.NullPointerException at org.hsqldb.jdbcDriver.acceptsURL(Unknown Source) at java.sql.DriverManager.getDriver(DriverManager.java:232) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:773) ... 49 more   Thanks By: Sherman Wood - sgwood RE: Installing on Gentoo  2006-04-11 06:53  We will look into this.   Sherman JasperSoft By: openross - openmax71 RE: Installing on Gentoo  2006-04-12 02:00 Ok I wait.  Ps. I'm using "sun-jdk-1.4.2"  By: openross - openmax71 RE: Installing on Gentoo  2006-04-12 04:57 I have successfully installed jasperserver !!  I have merged the context.xml in the /conf/server.xml file and now work.  Why the /META-INF/context.xml is not used by tomcat5 ? there is some config to handled ? By: Sherman Wood - sgwood RE: Installing on Gentoo  2006-04-12 10:40  Under Tomcat 5.5, you can have JNDI JDBC connections in both conf/server.xml and the WAR's META-INF/context.xml, with the conf/server.xml overriding the WAR.  I think you are right. Tomcat 5 does things differently.   Sherman JasperSoft
  9. By: Rouxxx - rouxxx Installing on JBOSS and MySQL 4.1.x  2006-04-11 08:25 Hello,  And congratulations for your job!  First, I have succeeded in installing Jasperserver with the bundled mysql and tomcat and in using my own reports.  Then I tried to deploy it on JBOSS (4.0.2) and MySQL 4.1.x. While running Jboss, I have got this error (last part of the logs)  --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM --- ObjectName: jboss.web.deployment:war=jasperserver.war,id=-1894287205 State: FAILED Reason: org.jboss.deployment.DeploymentException: Error during deploy; - neste d throwable: (javax.naming.NamingException: resource-ref: jdbc/jserver has no va lid JNDI binding. Check the jboss-web/resource-ref.)  How can I deploy it on JBOSS successfully?  Is MySQL 4.1.x enough, or I will need to deploy it on 5 ?  Thank you for your answers, if you need more information, just tell me.  Rouxxx  By: Sherman Wood - sgwood RE: Installing on JBOSS and MySQL 4.1.x  2006-04-11 08:33  You need to set up the required data source in JBoss. Have you done that for JBoss before?  There is nothing in particular stopping you from using MySQL 4.X for the metadata repository, though transactional rollback will not work due to MySQL 4.X limitations.  You can run reports against any DBMS that supports JDBC, as per normal JasperReports.    Sherman JasperSoft By: Rouxxx - rouxxx RE: Installing on JBOSS and MySQL 4.1.x  2006-04-11 08:51 You are right, I have never done this before. Can you help a little in doing it?  About transactions and MySQL 4.1.x, it is already possible to use them. By default, tables are created in MyISAM mode but with InnoDB, it works fine. By: Sherman Wood - sgwood RE: Installing on JBOSS and MySQL 4.1.x  2006-04-11 13:19  For setting up the data source in JBoss, check out:  http://docs.jboss.org/jbossas/getting_started/v4/html/db.html#d0e1933  http://www.jboss.com/index.html?module=bb&op=viewtopic&t=80943  Cheers,   Sherman By: Rouxxx - rouxxx RE: Installing on JBOSS and MySQL 4.1.x  2006-04-12 04:04 I will work on it when I will have time.  If it seems useful, I will post the whole process.  If someone succeed in it before me, please let me know :p  Rouxxx
  10. By: titlola - titlola how to add personal reports with the samples  2006-04-11 05:39 all is here : how to add personal reports with the samples ??  thx By: Sherman Wood - sgwood RE: how to add personal reports with the samp  2006-04-11 06:17  If you are logged on as an administrator, which the default jasperuser is, you can browser the repository and add a Report Unit, which will start a wizard that walks you through creating a report:  * load up a JRXML * load additional resources, like Fonts and Images * define a data source  Some validation is done of the JRXML to determine whether it is a valid report.  You can then publish the report to the repository and it will appear in the list of reports.   We are creating a user guide to explain all this in more detail.   Sherman JasperSoft
  11. By: Manfred Moser - mosabua Source files?  2006-04-10 11:49 Hi!  Just wondering where to get the source files from. CVS is empty. The distro files only contain the jsp files and the jasperserver-api-*.jar files. Where is the source for those. I am thinking of trying to get it going on MS SQL. Any pointers?   manfred By: Sherman Wood - sgwood RE: Source files?  2006-04-10 17:39  I am still working with Teodor on getting the source out on SourceForge. We have used Maven2 for the build and it includes test data and unit tests. We will announce when the source is ready.   Sherman JasperSoft
  12. By: Nobody/Anonymous - nobody Welcome to Help  2006-03-17 12:02 Welcome to Help
  13. By: vivek srinivasan - viveksrinivasan sorting problem 2003-10-17 10:38 Hi, i have a report which has emp# stored as a string in the database.When i sort the emp# in the ascending order i get the values like 15,154,157,16,161,168,19,191,192 etc..... I would like to sort it like 15,16,19,154,157...... How do i do this. I reports is not allowing me to convert a string variable into integer.The way i am tried converting it is Integer.parseInt($F{empno}) Please help.. Thx, Vivek By: Mark Rhodes - mrhodes2 RE: sorting problem 2003-10-17 10:49 you must sort the records in your query ... order by convert(int,emp#) By: weckamc - weckamc RE: sorting problem 2004-11-26 00:12 I have the same problem as viveksrinivasan. But when I try to add the convert function to my query the following error occurs: Invalid data type for conversion function. But my field is also a String... By: Kat - travel_kat RE: sorting problem 2004-11-28 20:04 Have you tried converting the string to a non object type before doing anything with it? ie: Integer.parseInt(String.valueOf($F{empno})) By: weckamc - weckamc RE: sorting problem 2004-11-29 00:19 How can I convert the string before the query? By: Andrew McLaughlin - pik0 RE: sorting problem 2004-11-29 09:12 Since the employee number is string and since you are sorting at the database level, it sorts the data as left-justified. You should have made the empno field numeric. Depending on what variant of SQL you are using, you may be able to substitute an expression in place of the column reference that would allow you to right justify the data or perhaps convert to integer. Good luck, Piko By: weckamc - weckamc RE: sorting problem 2005-01-04 02:58 Because of special circumstances it is not possible for me to get the fields as integer. Is there a possibility to sort the data after retrieving it (e.g. with a scriptlet)??? By: subsphoto - sunsphoto RE: sorting problem 2005-01-07 03:15 Dear all, Can the sorting be done on the ireport(Not the database)? Thank you for your time and effort! By: weckamc - weckamc RE: sorting problem 2005-01-11 02:43 Yeah, sorting in ireport would also solve my problem...is there any way to reach this (eg with snippets)??? By: Mike Warne - mwarne RE: sorting problem 2005-01-11 12:17 If you can't tell your database to sort it properly, You will have to create a work-around. You could possibly write a custom datasource class that implements JRDatasource. The datasource could read all the records you wish to select from JDBC, and then you could sort the employee number using Java code, and store the sorted records in a list. The datasource would then provide the records in sorted order to JasperReports. -- Check the JasperReports web site for details on custom datasources. If you do decide to do this, and you have large dataset to retrieve -- you may run into memory problems. However, I would first check the database to see if you can change the way it sourts your character string data. Mike.
  14. By: Yuriy Stepanyuk - ystep How to make i-Report ask for Parameters 2003-03-19 13:45 I found option "is for prompting" on parameter properties form. Does it mean i-Report can ask for parameters value befor runing report? By: Giulio Toffoli - gt78 RE: How to make i-Report ask for Parameters 2003-03-19 16:50 No. This is a jasperreport attribute. You can use the fiel "default parameter expression" to assign a value for a parameter using iReport. Giulio By: Craig Munday - cmunday RE: How to make i-Report ask for Parameters 2004-10-21 17:05 Giulio, I understand how to assign a value to a parameter from your posting. But how do you get iReport to prompt the user for the parameter when the report is executed? Craig Munday By: Giulio Toffoli - gt78 RE: How to make i-Report ask for Parameters 2004-10-22 07:27 This feature is not yet implemented. Giulio
  15. By: Shashank Uchil - shashank_uchil SubReport repeated many times!!! 2003-03-23 22:04 Hey, I have ,made a master and a subreport...the subreport is displayed..but it is displayed more then once...nealry 10-15 times it is repeated ...anyone knows why? Thx, Shank By: Shashank Uchil - shashank_uchil RE: SubReport repeated many times!!! 2003-03-23 22:14 Seems it has something to do with the query in the master...i made it same as the one in the subreport and still it is repeated 7 times. By: hj1122 - hj1122 RE: SubReport repeated many times!!! 2004-10-18 07:24 Please can anyone answer this question? I met the same problem and I made the band height same as the height of the subreport, it still repeats By: Xeno - xenoryet RE: SubReport repeated many times!!! 2004-10-18 09:25 What band is the subreport in? That may have something to do with it.
  16. By: Issy Ramos - squaremonkey How do I serve the report dynamically online? 2003-05-21 06:08 I have created a report from a mysql database, saved it as an XML file, and sucessfully compiled it as a PDF file. I would like to be able to post this report online so that users may be able to obtain this output, which changes throughout the day, dynamically. I am using Apache and Tomcat on a Windows 2000 computer as the Web Server. Any assistance would be greatly appreciated. By: Issy Ramos - squaremonkey RE: How do I serve the report dynamically online? 2003-05-23 13:44 I've downloaded JasperReports and find the documentation to be rather confusing. Does anyone have a step by step method explaining how to get iReports, or JasperReports, to be served dynamically over a Web Server, running Apache and Tomcat? By: Giulio Toffoli - gt78 RE: How do I serve the report dynamically online? 2003-05-21 07:42 With JasperReports is shipped a good example on how to using JasperReports using servlets and JSP. Giulio By: rahulg2 - rahulg2 RE: How do I serve the report dynamically onl 2004-10-05 23:41 hi, now the same problem i am having... the example is good and working fine but there is no demonstration for directly connecting to the Database..through Connection string... through iReport, Database connectivity is working fine.. but how to connect Manually inside Servlet?? in know this is a very elementry question, but for a NewBee its very frustating... code for ref... import datasource.*; import net.sf.jasperreports.engine.*; import net.sf.jasperreports.*; import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; public class PdfServlet extends HttpServlet { public void service( HttpServletRequest request, HttpServletResponse response ) throws IOException, ServletException { ServletContext context = this.getServletConfig().getServletContext(); String driver = "com.mysql.jdbc.Driver"; String connectString = "jdbc:mysql://localhost/Practice";; String user = "root"; String password = ""; Class.forName(driver); Connection conn = DriverManager.getConnection(connectString, user, password); return conn; File reportFile = new File(context.getRealPath("/reports/ghi.jasper")); Map parameters = new HashMap(); parameters.put("ReportTitle", "Address Report"); parameters.put("BaseDir", reportFile.getParentFile()); byte[] bytes = null; try { bytes = JasperRunManager.runReportToPdf( reportFile.getPath(), parameters, conn ); } catch (JRException e) { response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.println("<html>"); out.println("<head>"); .............. .......... while compiling this file its giving errors... cannot resolve symbols: Connection, DriverManager ... help me..
  17. By: jose - jose4 water mark for a report 2003-03-30 20:31 Hi Everybody! Can I have any water mark for my report.ie..something to be written as a background for my report.... something like "Duplicate Copy " or something like that as background By: it-xman - it-xman RE: water mark for a report 2004-09-27 01:20 I believe you can follow the advice from this post. https://sourceforge.net/forum/message.php?msg_id=2621973
  18. ktrinad

    Charts

    By: Mauro Chojrin - mchojrin Charts 2003-04-03 05:57 Is there some way to add charts to the reports? (Pie charts or something like that). Thanks By: Giulio Toffoli - gt78 RE: Charts 2003-04-04 02:12 sure. There is different ways, but the most used is using JFreeChart library. With this lib you can store a chart to a java.awt.Image that will passed to the jasperreport. Adding charts to a report is equal to create an image and put it on the report. Please note that the jasperreports don't can create itself the chart. Steps at design time: 1. Create a parameter of type java.awt.Image and name it i.e. myChart 2. Add an Imageelement to the report and set the image expression to $P{myChart} and type to java.awt.Image 3.Compile it Steps at run time 1. create the chart and store it in a java.awt.Image 2. put in tha parameters map to pass to jasperreports fill method a new parameter with "mychart" as key and your image as object Please note that you can do this "runtime" steps using iReport. You can find an chart example at http://jasperreports.sourceforge.net/samples/index.html I hope this helps you Giulio By: krrep - krrep Charts 2004-08-31 10:53 Can someone post an example of a scriptlet that they have used to create a chart specifically on how the JFreeChart object is passed to convert it to an java.awt.Image? Thanks By: C-Box - c-box RE: Charts 2004-08-31 22:37 Look at the ChartSample that comes with JasperReports full download package. There is a scriptlet (see "ChartScriptlet") that builds the chart and convert it to an image that is shown by JasperReport after the report is initialized. hth C-Box
  19. By: J.Carlyle - jcarlyle_au Color Rows 2003-07-03 22:31 Hi I would like every second row to be blue. How would I go out this? Thanks By: Giulio Toffoli - gt78 RE: Color Rows 2003-07-04 05:22 Note: new Boolean( !$V{BLUE} ) is wrong. Use: new Boolean( !$V{BLUE}.booleanValue() ) I have used it to make an example in chapter 4 of iReport 0.2.0 manual. Take a look at http://ireport.sf.net/cap4.html Giulio By: J.Carlyle - jcarlyle_au RE: Color Rows 2003-07-06 16:11 Thanks for your very quick response. Its working now. By: Giulio Toffoli - gt78 RE: Color Rows 2003-07-04 01:33 The blue effect colud be rendered using a rectangle as background for your line. The trick: we'll use two rectangles overlapped, one white and one blue, and we'll use the printWhenExpression to display or not the rectangle in front. Steps: 1. Create a variable named i.e. BLUE whit: Variable type: Boolean Calculation: Nothing Reset type: Report Reset group: - Expression: new Boolean( !$V{BLUE} ) Initial Expression: new Boolean(false) 2. Add the two rectangles to your detail, overlapped, set transparent to false on both, set the background of the first white, and the second blue 3. Set for the blue rectangle this printWhenExpression: $V{BLUE} It's all. Please note that can be some problems when the height of the row can change dinamically. Set in this case the stretchType: "relative to band height". If the first rectangle is really white, you can omitt it. Use it if you want two really different colors. Giulio By: cosjav - cosjav RE: Color Rows 2004-08-10 19:21 when I use the Expression: new Boolean( !$V{BLUE} ) I get this error: 123: operator ! cannot be applied to java.lang.Boolean value = (java.lang.Boolean)(new Boolean( !((java.lang.Boolean)variable_orange.getValue()) )); why is this happening? By: cosjav - cosjav RE: Color Rows 2004-08-10 19:22 oops... sorry, forgot to read rest of posts... :)
  20. By: Alex Kotchnev - polrtex Custom datasource parameters 2003-12-30 22:57 Could anyone provide a suggestion on how to deal with this... I am using a custom datasource returning a JRDatasource. It works fine. What bothers me is that I have to create a new Datasource in the Connections/Datasources window for each new Report that I have. What I would rather have is one JRDatasourceFactory, to which I can pass some parameters when the report is generated. For example, for direct JDBC datasources, I set up one datasource to a particular database. Then, for each report, I just re-use the datasource, and use a different query. However, for the custom datasource, I really can't do that. I was wondering if anyone has tried passing parameters to the DataSourceFactory method that returns the JRDatasource. Any suggestions ? I am willing to implement such a feature in iReports if it is not already there... Thanks in advance, Alex K By: Giulio Toffoli - gt78 RE: Custom datasource parameters 2004-01-15 09:23 Alex, I'll be happy if you implements a special connection that can be driven using a set of parameters. iReport implements only a proof of concepts of this feature that you have sufficently understood... Giulio By: Darren Hartford - binarymonk RE: Custom datasource parameters 2004-01-21 08:12 I would thinks this functionality already exist somewhere, just a matter of how to say it. I have the same problem. A custom DataSource, and in iReport I create some new report PARAMETERS: *METHODNAME *METHODVARIABLE1 *METHODVARIABLE2 ... I have those parameters defined, but what methods would one use from iReport to get those PARAMETER values? Misc.nvl()? By: pikatchudan - pikatchudan RE: Custom datasource parameters 2004-08-10 08:52 Hi Alex, I am in front of the problem you described. I have seen in the cource code and i think that the problem is inside the method JRCustomDataSourceConnection.getJRDataSource. Could you tell me if i am on the right way and if you succeed to implement this feature in iReport ?
  21. By: Karthik - karthik_ji How to make totals 2003-11-12 06:58 Hi all, I use a JDBC datasource to create a report. I have 4 columns. Now can anybody pls tell, how to add all the values in "Column1" and put it as "Total" at the bottom of the "Column1". Thanks Karthik By: Karthik - karthik_ji RE: How to make totals 2003-11-12 21:27 Hi Giulio, Thanks a lot for ur reply/help. It worked. Thanks again. Karthik By: Giulio Toffoli - gt78 RE: How to make totals 2003-11-12 15:09 1. Create a new variable calculation type: sum evaluation time: report expression: $F{FieldToSum} initial expression: new Double(0) or new Integer(0) Put a textfield in the column header band ans set as expression: $V{MysumVar} Giulio By: LL - lovelyliatroim RE: How to make totals 2004-07-26 07:26 Hey guys, I have created a variable so sum the total of field, done exactly as stated above, compiles fine but when im go to run, i get a run time exception of Filling report... Error filling print... java.lang.ClassCastException at LiquidAssets.evaluate(LiquidAssets.java:140) at dori.jasper.engine.fill.JRCalculator.evaluate(JRCalculator.java:420) at dori.jasper.engine.fill.JRCalculator.calculateVariables(JRCalculator.java:180) at dori.jasper.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:632) at dori.jasper.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:267) at dori.jasper.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:175) at dori.jasper.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:554) at dori.jasper.engine.fill.JRFiller.fillReport(JRFiller.java:160) at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:353) at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:293) at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:420) at java.lang.Thread.run(Unknown Source) NESTED BY : java.lang.ClassCastException at LiquidAssets.evaluate(LiquidAssets.java:140) at dori.jasper.engine.fill.JRCalculator.evaluate(JRCalculator.java:420) at dori.jasper.engine.fill.JRCalculator.calculateVariables(JRCalculator.java:180) at dori.jasper.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:632) at dori.jasper.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:267) at dori.jasper.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:175) at dori.jasper.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:554) at dori.jasper.engine.fill.JRFiller.fillReport(JRFiller.java:160) at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:353) at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:293) at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:420) at java.lang.Thread.run(Unknown Source) NESTED BY : dori.jasper.engine.fill.JRExpressionEvalException: Error evaluating expression : variable_CASH_TOTAL Source text : $F{Balance} at dori.jasper.engine.fill.JRCalculator.evaluate(JRCalculator.java:427) at dori.jasper.engine.fill.JRCalculator.calculateVariables(JRCalculator.java:180) at dori.jasper.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:632) at dori.jasper.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:267) at dori.jasper.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:175) at dori.jasper.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:554) at dori.jasper.engine.fill.JRFiller.fillReport(JRFiller.java:160) at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:353) at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:293) at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:420) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassCastException at LiquidAssets.evaluate(LiquidAssets.java:140) at dori.jasper.engine.fill.JRCalculator.evaluate(JRCalculator.java:420) ... 10 more Print not filled. Try to use an EmptyDataSource...! now my datasource is the JRXMLDataSource and the values that i summing looks like this <property id="Balance" value="300"/> <property id="Balance" value="100"/> so the sum should be 400, now i kinda feel that the problem is that the values i want to sum are strings and thats the reason i get a run time exception, but sum doesnt seem to work on strings or whats the work around on this?? How does one sum strings containing integer values?? cheers for the help lads, LL By: LL - lovelyliatroim RE: How to make totals 2004-07-26 08:57 Sorry for my innocence, you need to set in the text field expression field something along the lines of new DecimalFormat("0.00").format($V{CASH_TOTAL}) and in your variable expression new Double(Double.parseDouble($F{Balance})) thats will solve your problems!! cheers, LL
  22. By: Reinhard Achleiter - crazyreini I have no "Extemal TTF Font" 2003-02-20 02:52 I did what you write: >>Select "External TTF Font" from the "pdf font name" combo box in the text element properties window, then select the font that you want from the combobox labeled "true type font". << But I have no one font in the "true type font". CU By: Giulio Toffoli - gt78 RE: I have no "Extemal TTF Font" 2003-02-20 04:43 This is the last combobox entry... Are you sure that you have not ?!! Giulio By: Reinhard Achleiter - crazyreini RE: I have no "Extemal TTF Font" 2003-02-20 05:18 Yes! I select "External TTF Font", but the combobox below is empty kind regards Reinhard By: Maurizio Piccinelli - gherez RE: I have no "Extemal TTF Font" 2003-02-23 00:07 Also I have the same problem! I choose external TTF fonts but nothing appear in the listbox! :( I check at the registry keys! I have both ... and in Software\Microsoft\Windows NT\CurrentVersion\Fonts are listed many TTF fonts!!!! I use win2000 SP3 Italian Version if this can help you! Ciao Maurizio By: Maurizio Piccinelli - gherez RE: I have no "Extemal TTF Font" 2003-02-23 00:11 Also I have the same problem! I choose external TTF fonts but nothing appear in the listbox! :( I check at the registry keys! I have both ... and in Software\Microsoft\Windows NT\CurrentVersion\Fonts are listed many TTF fonts!!!! I use win2000 SP3 Italian Version if this can help you! Ciao Maurizio By: Giulio Toffoli - gt78 RE: I have no "Extemal TTF Font" 2003-02-23 03:08 You have both?! The problem is this. You have Software\Microsoft\windows\CurrentVersion\Fonts, at this point iReport load fonts from here, and not looks for Software\Microsoft\Windows NT\CurrentVersion\Fonts. Have you upgraded from Win98 ? A workaroud is rename you registry key Software\Microsoft\windows\CurrentVersion\Fonts as i.e. Software\Microsoft\windows\CurrentVersion\FontsX so iReport don't find it and load correclty all fonts available. Giulio By: Giulio Toffoli - gt78 RE: I have no "Extemal TTF Font" 2003-02-20 13:17 What OS? To retrive font list iReport look for this two registry keys: Software\Microsoft\windows\CurrentVersion\Fonts and Software\Microsoft\Windows NT\CurrentVersion\Fonts then it look for fonts that have in the name the string "(TrueType)". If you have not this registry keys, true type font combo box will be void. Regards Giulio By: nkoffee - nkoffee RE: I have no "Extemal TTF Font" 2004-07-20 18:58 i do have this registry key but my listbox in ireport is still empty Software\Microsoft\WindowsNT\CurrentVersion\Fonts help me! By: Trueman - trueman_hk RE: I have no "Extemal TTF Font" 2004-07-20 20:24 may be you can try this, add "C:windowsfonts" to your classpath and restart i-report again. By: nkoffee - nkoffee RE: I have no "Extemal TTF Font" 2004-07-20 20:50 thank you for your answer It's Work many thanks again you are a wonderful man By: Teeraphong - c12phong RE: I have no "Extemal TTF Font" 2004-07-22 03:13 In "startup.bat" of iReport, didn't have ";.fonts" for set classpath By: Giulio Toffoli - gt78 RE: I have no "Extemal TTF Font" 2004-07-22 23:49 iReport load all TTF fonts avalaible in the classpath. Add to the classpath your font directory. ATTENTION: Some posts in this thread refer to an old and unsupported version of iReport (win32 version). Giulio
  23. By: chris chern - chrischern type NMTOKEN must be a name token error 2003-04-20 20:43 Hi Guys, Newbies here... When I try to run this query on iReport :- select tran_appraisee, sum(criteria_result) from transaction group by tran_appraisee Error come out: SEVERE: Parse Error at line 22 column 63: Attribute value "sum(criteria_result)" of type NMTOKEN must be a name token. org.xml.sax.SAXParseException: Attribute value "sum(criteria_result)" of type NMTOKEN must be a name token. How can I get override of the NMTOKEM error? Thanks. By: Ratchapong - jeng RE: type NMTOKEN must be a name token error 2003-04-20 21:02 Hi, Try to use "AS" after sum... Ok first remove all fields from the value windows and register it again with the new query.... select tran_appraisee, sum(criteria_result) AS sumCriteria from transaction group by tran_appraisee Hope this will help Jeng By: chris chern - chrischern RE: type NMTOKEN must be a name token error 2003-04-21 18:42 Gotcha! Thanks By: ben - hootonbs type NMTOKEN must be a name token error 2004-07-13 20:10 Hi, I am getting a "type NMTOKEN must be a name token" error because of spaces in field names but I can't change/alias the field names in the SQL query because I am executing a stored procedure on a SQL Server database. ie. my query string is: exec sp_CollegeUnits I can't change the stored procedure as it is used by other applications - is there any other way around this problem? Thanks.
  24. By: Jacky - misaki Page Count 2003-03-10 20:31 Can anyone told me how to get the last page number of a report create by iReport ? Thanks Jacky By: Dejan - dnikolov RE: Page Count 2003-03-11 03:17 for last page set evaluation time:Report By: Dejan - dnikolov RE: Page Count 2003-03-11 03:15 Add TextField and in textfield area type: ""+$V{PAGE_NUMBER} select evaluation time:Now By: Dfoltz - dfoltz RE: Page Count 2004-06-09 08:29 Is there a function call that can be used to change the evaluation time on a given field. For example, say you wanted to Show " Page 1 of 50" in one field, rather than 2. Is this possible? I tried another method of making the calculation for the total page number, then referencing it in my actual "Page 1 of 50" field, but what is the command to access another field's data using the "key"? Thanks in advance. By: Giulio Toffoli - gt78 RE: Page Count 2004-06-11 01:55 No, this is a limitation in jasperreports. You have to put two fields in your report, one for actual page and one for page total. You can have the same problem calculating %. There is not a solution to operate with values of the same variable/field assumed in different times (i.e. at time report and at time now). Giulio
  25. By: Olivier - opoppon alternate background color for each record 2003-11-24 08:45 Hi, I have seen a screenshot from the iReport page (the one about custom JRDataSource I think) which show a simple page where the coloring for each row is different (white and pink on the PDF). I would like to know if this is acheived easily by iReport or the "hard way" (counter, "printWhenExpression"...) Cheers, Olivier By: Olivier - opoppon RE: alternate background color for each record 2003-11-25 05:44 What I have done is the following: Make my JRDataSource return its current index when I use the field "counter". now, it is a bit verbose, because I am using a printWhenExpression for each field (in the reportElement tag). So I duplicate each textfield twice, one reportElement with "#FFFFFF" background with printWhenExpression at count%2==0 and the other textfield with reportElement with "#000000" background with printWhenExpression at count%2!=0 Is this correct of is there something "lighter" ? Cheers Olivier By: Giulio Toffoli - gt78 RE: alternate background color for each record 2003-11-25 09:31 You can simply put two coloured rectangles that will be our background. Send this rectangles to back, and use your formula for printWhenExpression only for the rectangle in front. All textfields must be over this rectangles and must be "transparent". The idea is to hide one of two rectangle to show on the back (as a background) the first rectangle. When the first is not hide, the second is covered by this and the background effect change. All textfields will be printed over this two rectangles. In this way you can use images instead a simple rectangle, and make some very pretty effects. Giulio By: Olivier - opoppon RE: alternate background color for each record 2003-12-03 03:03 Hi Giulio, Sorry to reply so late, I integrating bit of jasper into my code. I like the idea about switching on/off rectangles rather than each field. But as I understand it, there would be a "Z-order" field in a report element ? When you talk about putting an element in the back and other in the front, is this what you are thinking. I didn't see such field, is there another way to do so ? thanks, Olivier By: Giulio Toffoli - gt78 RE: alternate background color for each record 2003-12-03 06:46 the Z order is defined by the order in wich an element appear in the XML. You can see this order in the elements tree. Giulio By: Giulio Toffoli - gt78 RE: alternate background color for each record 2003-11-24 12:11 You can find the hard way in this forum. (the hard way is really simplest that you think). If you don't find it, post a new message to this thread. Giulio By: Jeanpaul - jpfinne RE: alternate background color for each record 2004-06-07 03:29 Hi Giulio, Could you explain (or give a link to) the hard way ? I could'nt find it. Jean-Paul By: Giulio Toffoli - gt78 RE: alternate background color for each record 2004-06-07 05:30 I don't remember it. But why use an hard way when you can achive the same result using a simpler way :-) ? Giulio By: Jeanpaul - jpfinne RE: alternate background color for each record 2004-06-07 14:37 I thought the hard way could be a generic way to do it. I have to convert reports from crystal report. In crystal report there are formulas for about everything : field height, tootip, hyperlink, foreground color, left,right,top and bottom border width, fonts .... I agree there are too many formulas. The problem is that jasper has too few. Could the hard way use scriplet to change dynamically some properties ? I'm mostly interested in foreground/background color and font attributes (italic or not). I know the solution with the use of printWhenExpression. I find it a bit cumbersome. I have a report that use 2 expressions to control the italic property and background color. I have to use 4 fields to do the same with jasper. This sample is a bit extreme but I have to convince a client to switch from crystal report to jasper and ireport. Ireport could better handle superposing fields. Here are some suggestions: * The use of layers for fields with the same printWhenExpression formula could allow easy navigation between them with A combobox or a slider. * Another solution: create a copy of a field inside a group of superposing fields. When I edit the properties of the group, the dialog box shows the shared properties. When I edit the properties of one field I only edit the differences (like printWhenExpression and background color). When I move or resize one the field in the group, the others are synchronized. * Better handlind of z-order. Use drag and drop instead of Move up,down up. * Inside a band the nesting of fields could be shown with a tree. A field entirely contained inside a field is a child in the tree. Fields with the same position and size are child of a group node. Anyway, thank you a lot for all the improvements and all the answer in this forum. Jean-Paul By: Jeanpaul - jpfinne RE: alternate background color for each record 2004-06-08 13:54 Some of my suggestions seem related to ElementGroup...
×
×
  • Create New...