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

Security Advisories

Downloads

Everything posted by csbac

  1. Hi! I already ran into this problem http://jasperforge.org/sf/go/artf2586?nav=1 I fixed it for myself by patching the source code ... if this is an option for you, you're lucky. Otherwise, maybe JS releases a patch soon, or I will try to create one on my own on Monday. Sebastian
  2. Well, no more ideas what might cause the problem. http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&func=view&id=30152&catid=8 seems to have a similar problem ... Sebastian
  3. Hi! As you might have seen in the other post, there is a patch out ... also, the 2.0.1 version of JS fixed it. Sebastian
  4. Hi! If I see it right, you can just put it into the SQL query ... Code: select "cl-id", "order id", NULL, value from ... where "grouporder id" is null union select '---', '---', "grouporder id", sum(value) from ... where "grouporder id" is not null group by "grouporder id" Hope this helps, Sebastian
  5. Hi Aaron! Are the reports accessed by the servlet classes only, or also by Enterprise Beans contained in one of the other .jar in the .ear? Sebastian
  6. Hi! Of course, I also ran reports, not just deployed ;-) Referencing the .jars from the Manifest is a solution, but one that is rather for J2EE applications, or even more simple .jar starters, I'd say, than for web applications. If you just forget to name one of the jars in the Class-Path, or a version number is changed, the stuff no longer works ... or even worse, most things work, but some special cases don't ... You have a web application ... so it should be possible to use the web archive way of including jars ... which is WEB-INF/lib ... and it does not work in your case. Strange, yet I remember something like this some time ago as well .. can't remember which context, though ... maybe I rememeber in a few days. For the moment, I've got no idea ... Yours, Sebastian
  7. Hi! I tried some stuff ... using the jasperserver.war as the .war inside the .ear, it works w/o any problems, with UseJBossWebLoader=false and =true. I can't reproduce your problem ... When you deploy the .war w/o the .ear, do you get the same error, or does it work both ways with UseJBossWebLoader? Maybe you can try to use JasperServer as a test setup ... configure the jasperserver.war to work with JBoss (remove log4j, add jboss-web.xml), pack it into an .ear, and try to deploy it with true/false settings ... maybe this can help finding out whether the problem is with your ear/war, or with the JBoss itself? Seems I have to admit defeat ... Sebastian Post edited by: csbac, at: 2007/08/28 13:49
  8. Hi! Can you give more than just the "message" of the exception? You probably caught a nested exception, i.e., the top-level message does not give much information; you need the full stack trace, or at least all nested exception information ... e.printStackTrace() or such. This should give you more information, e.g., whether your SQL query is welformed or not ... looks really strange to me, can't you just use a simple non-nested query? I've got no experience with ROWNUM, though. On the other hand, AFAIR, JR also has a feature for setting the maximum number of returned rows. Code: SELECT * FROM SALES_TRANSACTION WHERE VENDOR_ID LIKE '%' AND TRANS_DATE BETWEEN $P{StartDate} AND $P{EndDate} AND ROWNUM between 0 and 31 ORDER BY TRANS_TIMESTAMP DESC Hope this helps, Sebastian
  9. Hi! You have an .ear that contains the .war, OK. Where do you put the Jasper-jars? Inside the WEB-INF/lib of the .war, inside the .ear, or somewhere else? Where are the compiled reports? In the .war itself, or in an additional EJB .jar inside the .ear? We are using JS on JBoss, but putting without putting the .war into another .ear, but we've got some experience with class-path settings in .ear/.jar ... maybe we can help there? Yours, Sebastian
  10. Hi! This is usually a problem of alignment. At least with .xls export, JR tries to keep the positions of the fields as exactly as possible. Thus, make sure the left (x) value of the headers is exactly the same as the left value of the fields. Maybe this helps, Sebastian
  11. Hi! Instead of using a CustomDataSource, maybe you can create a more complex SQL query? (1) Use case Code: select ..., (case when field='Dog' then 'Cat' when field='Cat' then 'Dog' else field end) as field_changed, ... from .... (2) use a lookup table Maybe this is easier to use than a custom data source? Of course, it requiers the "translation" to be known in advance. Sebastian
  12. Hi! Maybe the problem is with the 'current directory' ... "but when I run the java code to compile the pdf" -> in which directory is this application run? The images/image.jpg is probably relative to the current directory of the application, not the directory where the .jasper file is located. Hope this helps a bit, Sebastian
  13. Hi! Is there a directory js-config in the place where you execute the .bat script? In the usual installation, there is only js-catalog ... Maybe that's the problem. Sebastian
  14. Hi! You need to use parameters in your sql query and configure them as input paramters to the report. Then, the use can set values for the parameters, and then the query is executed based on these values. Have a look for "parameters" in the iReport/JR tutorials and manuals. Hope this helps, Sebastian
  15. Hi! You should have a look at "case": Code: select entity, id, ic, (case when entity<>'' then entity when ... then ... else true end) as entity1, .... from .... Though I'm really wondering why you completely change the values returned from the query depending on the parameter ... Code:[code] if (len(param1)>0) then return param1 else return true If this decision is based on the parameter value and only concerns the parameter, why not code it in the Java-part of the parameter settings? Define the/a JasperReport parameter as Code:[code] $P{PARAM}<>''?$P{PARAM}:"empty" Sorry if I can't really answer your questions, because the code fragments you posted don't make much sense ... is param1 a boolean or a string variable (has a length but may be true), should the first part return a value (true) or set a variable (which an SQL query of course can't do)? I hope with the two pointers - (case when ... then ... else ... end) - use parameter assignment via default values in JasperReports you get what you are looking for ... I can't help you any longer, I'm leaving for holiday in a few hours ... Yours, Sebastian
  16. Is it possible you have null entries in the query, especially for the key value? (customerNumber). The line that crashes is Code: inputData.put( keyValue.toString(), new Object[] {keyValue, columnValuesString}); The only reason for an NPE in this line would be keyValue being null ... which is probably one of the column values of customerNumber. Is it defined as primary key, i.e., not null and unique? Sebastian
  17. Hi! You write that you used "null" and locally defined data source for the datasource ... null, of course, will result in an error (probably an NPE) because the query cannot be executed. The same will probably happen if the locally defined datasource is not correct ... why not use the same datasource that you also use for the report itself? From the stack trace, I'd guess the parameter information is read, then, the query is executed ... and failes dramatically. Probably, the datasource is not set, or at least not correctly set ... use the same one as for the report. Hope this helps, Sebastian
  18. Hi! There are several possibilities. (1) remove the $P{SUBREPORT_DIR} from the subreport path (subreport expression), and also the SUBREPORT_DIR parameter from the set of parameters. As the subreports are in the same location (on JS) as the main report, the subreports should by found (2) When using the jasperserver-plugin for iReport, you can use drag&drop to place a subreport onto the main report. Then, the URI repo:/path/to/subreport is automatically used. Of course, the repo: URI only works when running the reports from JS, thus, via the plugin, or via the web interface. Hope this helps, Sebastian
  19. Hi! You have a windows-line-ending file on a linux machine .. therefore, the ^M (which is CR, carriage return) is treated as part of the first line, and the shell cannot be found. Normally, this should not happen, when you are using the system's unpacker to unpack the installation files ... tar xzf ... for tar.gz on linux, even unzip should work on linux. As first try, you can run dos2unix on the shell scripts (*.sh), this might help, if there are no more shell scripts around ... otherwise, try the .tar.gz (if available). Also, it is not a good idea to work as root unless administrating the system ... use a user account with reduced rights. Avoids destroying the system ... Hope this helps, Sebastian
  20. Hi! Without knowing much about the JR timeseries charts, I have the following idea: Remove the year information from the time series and only display it in the legend ... thus, all series should have the same time axis (normalised to 1900 or such) ... not clean, but might work ... Yours, Sebastian
  21. Hi! Any possibility to "join" the data sources before running the report? Using SQL UNION, a view, a more complex SQL query, or similar mechanisms in whatever kind of ds you are using? Otherwise, yes, subreports should be your solution. Yours, Sebastian
  22. Hi! Are you using the same output format in iReport and on the JasperServer (JS)? A common problem is that html output does not allow "overlapping fields". Only one of the fields is rendered if two or more are overlapping in their boundaries. Thus, you need to check every html report with the html output in iReport, before you can expect it to look the same on JS. When using the same format, there should not be any difference between iReport-generated and JS-generated reports ... they use the same engine.... Have a look at the "Build" menu items, and the jasperserver-plugin for ireport to render reports via JS more easily. Hope this helps, Sebastian
  23. There are two steps you can try. (1) allow more memory for the java application., Usually, Java uses only 64MB ... you can pass -Xmx128m to the java virtual machine call; then, 128MB are used. If this solves your problem, you can probably live with it ... I don't know how much memory iReport usually uses, but surely more than the default 64 MB. (I just checked, it's 512m.) Thus, iReport runs your report, while your app doesn't. HTML probably uses less memory than pdf. (2) Use a virtualizer for rendering the report. I've never used one, so I can't really help you on this one, but searching for virtualizer in the forum, the wiki and/or other documentation will surely help you there, if your report is really so large a few more megabytes don't make it. There's JRFileVirtualizer and JRSwapVirtualizer, e.g. Hope this helps, Sebastian Post edited by: csbac, at: 2007/08/15 21:26
  24. Hi! Sorry, you missed a "P" there ... Code: where columnDate >= $P{someDate} and columnDate <= $P{someDate} alternatively (at least, most database systems suport this) Code:[code] where columnDate between $P{FromDate} and $P{ToDate} Then, you define FromDate and ToDate as parameters (view->parameters in ireport) of type java.util.Date, give them some sensible default values, e.g., Code:[code] new java.util.Date() new java.util.Date(0) new java.util.Date(new java.util.Date()-1000l*3600*24) Hope this helps, Sebastian
  25. Hi! I thought the answer was already posted here ... either load the .jasper file with JasperRunManager.runReportToPdfStream(...), or the .jrxml with JasperReport report = JasperCompileManager.compileReport(...); Or did you already try both versions, and the NPE still persists? Yours, Sebastian
×
×
  • Create New...