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

csbac

Members
  • Posts

    132
  • 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 csbac

  1. Äh ... where do you see the difference between Tomcat and "JasperServer on Tomcat"? JS is not a standalone server, it is a web application that can be deployed on any servlet- or J2EE server, including tomcat. Sebastian
  2. Mh ... use a view that contains the cast and the additional row. "from dual" is oracle-specific anyway, so you can keep the db-specific code inside the DB, and just create another view for a different rdbms. Sebastian
  3. CLASSPATH environment variable does not help you with an applet, as the applet is running inside the browser in a highly restricted security context. But there is no reason to use an applet here ... If you are using a J2EE server, why not use JasperServer? Install JasperServer, read the guides, log in, and add the report you generated to the server, together with the required datasources. Then, you can run the report directly from the jasperserver. If you get this working, you can think about putting the reporting stuff into a server application of your own ... In any case, using an applet (which is executed on the clients and thus has neither access to the server-based report files, nor the server-based sql data) is not a good idea, unless you really know what you are doing, and need it. Usually, you want to generate the report on the server and send html code with nice input controls, forward/backward buttons, page numbering and pdf/excel export to the client's browser ... and this is exactly what JasperServer does (among many other things). Also, an applet does not use a main() function ... Hope this helps, Sebastian
  4. Hi! Probably some cast( as ) operator should be the solution, yes, but ... shouldn't it be Code: ... UNION select 0,'All customers' from DUAL Otherwise, you get 0, 'All customers' as often as you have entries in Customer .... Yours, Sebastian
  5. The question in both of your cases is, in which classpath did you put the jasperreports-*.jar? WebLogic is J2EE Server, so .jar(s) need to be - put into the .ear, and - either put into a <module> tag of the application.xml, or - explicitly referenced by the META-INF/MANIFEST.MF Class-Path: attribute of the using ejb jar Alternatively, there might be a server lib where it can be put ... I only use JBoss myself. With applets, I'm not sure, but very probably you didn't configure it right ... Hope this helps, Sebastian
  6. Then you don't have a problem. JasperServer and JasperReports run with Java 1.4. The JR-generated code (.jrxml, .jasper) is also 1.4. The only exception seems to be some of the UI components of iReport, but those are only used during design time. There is one small problem, though. When iReport runs with Java 1.5, automatic casting between primitives and their respective classes is done when evaluating the JR expressions. E.g., Code: new Integer(2)+3 is allowed, or Code:[code] $F{INTEGER_FIELD}+3 These constructs are not allowed in JasperServer, esp. when using Java 1.4; the .intValue()/new Something() need to be given explicitly: Code:[code] new Integer(3).intValue()+3 $F{INTEGER_FIELD}.intValue()+3 new Boolean($F{INTEGER_FIELD}.intValue()==0) The best way to check this is by using the JasperServer-plugin for iReport and test-running the reports on the server, not in iReport directly. Yours, Sebastian
  7. Hi! If you are trying to create an analysis view, you are in the wrong forum; this is for reports, which is not the same as analysis/OLAP views. If you are trying to create a report, you are using the wrong item to create in JasperServer ... For a report, you need a .jrxml source file that has usually been created with iReport; For an analysis view, you need a mondrian .xml file, which is a bit more complicated, and an olap connection and some more stuff; have a look at the olap/analysis documentation. Hope this helps to find the right steps to create what you are trying to ... Yours, Sebastian
  8. Hi! Maybe you should also post the stack trace, so we can see /where/ the NullPtrException happens? Yours, Sebastian
  9. Is that a real problem for you? Even if you need to use 1.4 for development or certain apps ... iReport is a standlone app, so it shouldn't be a problem if you install 1.5.0 and use it only for iReport, not for other stuff. I just checked, the only .jars that are 49.0 are JPA (persistence) which does not work w/o J5, springframework, and swingx. JPA and spring might not pose a problem unless you use EJB3/JPA or spring-based data sources. Maybe you can just replace lib/swingx-2007_05_13.jar with a version that is based on Java 1.4? I can't check here, opensuse does not support installing both Java versions. Yours, Sebastian
  10. What error does it give you? Surely not the BigDecimal one, as there is no BigDecimal class in the formula? Sebastian
  11. I posted it as a bug report http://www.jasperforge.org/sf/go/artf2434?nav=1 . Sebastian
  12. Hi! About the first problem, "connection refused" usually does not mean a firewall, but a port on the server where no service is listening ... 1. the db server does not run 2. the db server runs on a different port than you think 3. the db server only listens on the loopback address (127.0.0.1) 4. the server has a different address than you think I'd guess 3, if you are using mysql or postgresql, as at least those DBMS usually don't open on external interfaces due to security considerations. Try telnet localhost <the port> and telnet <hostname> <the port> on the linux machine. If the first one succeeds, but not the second one, then (3) is the issue. Hope this helps, Sebastian
  13. Hi! Why no use Code: ($V{planedDuration}.intValue()/24. < 1.) ? "<1 DAY" : $V{planedDuration}.intValue()/24.+" DAYS" The BigDecimal gives you the trouble, as Java cannot calculate Code:[code] new BigDecimal(24)/24 What you probably want here, is a floating point primitive value - float or double. double you get by just writing 24. (==24.0) instead of 24, and float by adding an f (24.0f). If you use double, ints are converted to longs. Of course, the "2.3423424 DAYS" display may be a bit ... unwanted, thus, you could try Code:[code] ($V{planedDuration}.intValue()/24. < 1.) ? "<1 DAY" : String.format("%.1f DAYS", $V{planedDuration}.intValue()/24.) which should produce "2.3 DAYS". Have fun, Sebastian Post edited by: csbac, at: 2007/08/10 15:11
  14. Major/Minor version 49.0 means Java 1.5.0 aka Java 5, current version is 1.5.0_12, afaik. Probably, the iReport developers have a good reason for using J5 ... I've been doing it for ... 3 years? Hope you can use it, Sebastian
  15. Hi! The OLAP cache that is involved here is, afaik, in the memory of the Mondrian or JPivot component that calculates the cube from the sql data. Thus, it is - dropped after a timeout - dropped, of course, when tomcat/jboss is restarted - should theoretically be flushable by some command, though the flush olap cache does not do it - has nothing to do with the source database If you need optimisation, you either need to use a database system that supports materialised views (oracle, db2 or such), or create tables yourself where you regularly aggregate the data ... Of course, this only helps if the mondrian cube is defined on joining several tables ... if the fact table itself is LARGE, I'm not sure what can be done .. check the OLAP literature. Yours, Sebastian
  16. Incredibly, I found it. I had created another datasource (for the same DB), AND SET IT TO USE A TIMEZONE (Europe/Berlin). I needed it for ?defaultResultSetHoldable=True (a problem with Firebird and sub reports). Using this datasource for the one of the reports (the so -called "broken" one), and trying to start the report, was enough to make JasperServer believe any java.util.Date parameter it encoutered was a String, in fact ... I have no idea why it is so, but it is obviously reproducible. Maybe I should file a bug report ;-) Yours, Sebastian
  17. Just a small additional note: I use different input controls for the report that always breaks, and for the ones that usually work. Still, - the ones that usually work, do work as often as I try - the one that breaks just breaks - the ones that usually work, do not work afterwards, until I restart the JBoss server. Sebastian
  18. Hi! I'm getting the following strange error in reports that worked w/o any problem a few days ago; sometimes, the error even happes on the second starting of the same report, yet not on the first start ... I'm using JS 2.0.0 and the included jasperreports-1.3.4-SNAPSHOT, and also tried the current release JR version 1.3.4. java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm: ss.fffffffff at java.sql.Timestamp.valueOf(Timestamp.java:185) at org.firebirdsql.jdbc.field.FBTimestampField .setString(FBTimestampField.java:95) at org.firebirdsql.jdbc.AbstractPreparedStatement .setString(AbstractPreparedStatement.java:384) at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement .setString(WrappedPreparedStatement.java:316) at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter .setStatementParameter(JRJdbcQueryExecuter.java:390) The report only has java.util.Date parameters, so, obviously, one of the dates is passed to the parameter set methode "setString" which converts the Date to a String of the kind "Sun Jun 10 18:02:00 CEST 2007", and then correctly throws an error. I added some debug statements (JRJdbcQueryExecuter.setStatementParameter) and got the following information: - the parameter is a com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRBaseValueParameter - it is named dateFrom (correct) - the value of the parameter is a java.util.Date with the expected value - THE TYPE OF THE PARAMETER IS SET TO java.lang.String I - set it in a JS Date or Date/Time input control, or - use the default value set in the report - it is configured as a java.util.Date with the default value "new java.util.Date(1170284400000l)" (which is the date shown above). I configured several reports with the JS-plugin (2.0.0) for iReport 2.0.0, I did it manually via the JS web interface, all the same, no change ... It seems older reports run, until I use one a newer report (which I changed on Monday), then I get the error; afterwards, none of the reports with date/time input work any longer. All the reports use the same input controls dateFrom and dateTo. I have absolutely no idea why Date-typed JS parameter is being treated as a String-typed parameter in the JS code ... Hope someone has a pointer ... Thanks, Sebastian
  19. Hi! - restart tomcat/jboss - wait for some time (I'm not sure how long, maybe 30 mins?), until the JPivot view is closed. Unfortunately, calling "flush olap cache" via the menu does *not* do it, at least not in my case ... You can see the data has been reloaded when the changes you made to the OLAP display view (drilling, slicing) are lost ... Maybe one of the JS-people can help us there, why the flush olap cache does not do anything noticeable ... Hope this helps, Sebastian
  20. Hi! I sincerely doubt that an html <title> element will be parsed, even passed to the client, when the jsp content type is set to application/pdf ... only the pdf itself should/will be tranferred. No idea how to change the page title, though; I never display pdf files inside the browser, I make sure acroread is opened with the file. Yours, Sebastian
  21. Hi! Thanks a lot, solved the problem ... before, I patched the JasperReports code to open queries with HOLD_CURSORS_OVER_COMMIT ... Unfortunately, I start running into other bugs ... stuff that worked on Monday, no longer works ... trying hart to find out what's going on ... (Date parameter is set as String, but does not have Timestamp format ...) Thanks, Sebastian
  22. Hi! Are you sure there is no other mysql-related error msg in the log, just before the "${requestScope" entry? Possible, the real error msg ist not logged on the log4j ERROR level, but INFO or DEBUG only ... Yours, Sebastian
  23. Hi! You need to have a look into the server log file (server/default/log/server.log on JBoss, no idea on Tomcat) to find out what the "real" error is ... Probably, the connection to MySQL failed - in which way, the log should tell you. Hope this helps, Sebastian
  24. Hi! I'd suspect the SQL query does not sort cleanly ... usually, grouping just steps through the sql resultset until a different value is found ... if there is not "order by int-field" in the SQL-query, the results are unexpected - wrong order, groups appearing more than once. Hope this helps, Sebastian
  25. Hello! I'm unable to change the jxrml resource that is assigned to a JasperReport in JasperServer. It is no problem to change the file that is contained by the jrxml resource; yet, when editing a report, and changing the jrxml database resource it should use, this change is not committed on saving. Showing the report, the old resource is still used; also, it is impossible to delete the old resource. The only way to change it is to create a new report. Usually, this wouldn't be so much of a problem, yet I created the jrxml resource with the iReport plugin, it contains spaces, and thus, I cannot replace the file content ... this is a known bug ... I don't know how to post a bug report, thus, I just post it here for comments. Yours, Sebastian
×
×
  • Create New...