Jump to content
Changes to the Jaspersoft community edition download ×

clhubert

Members
  • Posts

    34
  • 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 clhubert

  1. I'd like to do the equivalent of a http include into a jasper report. Could you do utilize a <jsp:include> and set the height/width? I would still like the option of exporting as a PDF, Flash, Etc if possible.
  2. Is there a way to do this? I am using iReport to author my report.
  3. Thanks a lot.... It works now. For some reason my jrxml didn't work with any query. Even a simple one with no expressions. It just wouldn't populate with a valid query. I winded up rebuilding the report from scratch with no expressions to get it working again. Once I got it working I put in the expressions you supplied. It works now! However I still have the old jrxml files that don't work. I am looking at them and have no clue why it started to fall apart.
  4. I haven't seen any documentation on running JasperServer or MS SQL. I wouldn't be suprised if you can hack it to work... But most people are using mysql. For support reasons, I would stick with the mysql respository.
  5. About a quarter of the way into this video.... It shows you how to make a subreport . http://ireport-tutorial.blogspot.com/2008/10/ireport-subreport.html At a high level.... You will want to pass in the the fields into the subreport as parameters. When you define a sub report you define the parameters you're passing into it (if any). Hope this helps.
  6. Attached is the jxrml..... As you mentioned, iReport doesn't like the syntax, but it ran anyway. Added the expression exactly as you mentioned. Same result as the Report Expression as I described earlier. I noticed the same control character problem though.
  7. I've been executing this in iReport. I am trying to get it to work there before uploading it into JasperServer. According to iReport the syntax you specified isn't valid. So when I upload it to the JasperServer. It won't even execute. I normally get it working in iReport before uploading it in JasperServer... What does the $$ do? Is there any documentation on it? BTW. I am using iReport 3.1.2 and JasperReports 3.1 I've tried $P{Country_ISO3166} == null ? "IS NULL" : "= "+ $$P{Country_ISO3166} As the expression used in the derivied parameter. iReport indicates that the $$ is a syntax error. And the query is... select IndexName from `Indices` where Country_ISO3166 $P{Country_ISO3166WhereClause} There will be single quotes around the entire where clause. I turned on the SQLException log and the query looks like this select Industry, Publisher, IndexName from `worldindices` where Country_ISO3166 '= AR' when the query is changed to When I change the query to use $P!{Country_ISO3166WhereClause} the query turns into ... select Industry, Publisher, IndexName from `worldindices` where Country_ISO3166 = US then query engine thinks the value is a column so I had to change the expression to surround the value with quotes. $P{Country_ISO3166} == null ? "IS NULL" : "= '"+ $P{Country_ISO3166}+"'" This changes the query to select Industry, Publisher, IndexName from `worldindices` where Country_ISO3166 = 'AR' exactly what I want.... But it returns no values...... I execute the same query in an external SQL Client and it works. However I did find this in the logs Tue Feb 03 12:35:27 EST 2009 INFO: Profiler Event: [sLOW QUERY] at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:135) duration: 1 ms, connection-id: 120, statement-id: 16, resultset-id: 16, message: The following query was executed with a bad index, use 'EXPLAIN' for more details: select Industry, Publisher, IndexName from `worldindices` where Country_ISO3166 = 'AR' and when I COPY and PASTED the complete SQL statement into my SQL client I get this Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select Industry, Publisher, IndexName from `worldindices` where Country_' at line 1 SQLState: 42000 ErrorCode: 1064 It appears like a bunch of extra characters have been inserted into the query somehow. The actually SQL looked fine. ONly when I executed it, I received this message. I actually manually deleted the bogus characters by delete and re-inserting the whitespace. Any ideas???????? I think the reporting engine is somehow inserting those bad chars. Post Edited by Cory Hubert at 02/03/09 17:51 Post Edited by Cory Hubert at 02/03/09 17:53
  8. Thanks for you help. Without the $P! it doesn't surround the value with quotes and the SQL engine thinks it's a column. So you get an error. It appears that the $P! is required The $$ doesn't work. The error I recieve is "Syntax Error on Tokens; delete these tokens" Attached is the latest. Post Edited by Cory Hubert at 01/31/09 04:03
  9. THANKS! I got a little further... But it thinks the var is a column name now. I am getting an error messages that says "unknown column" So when the query is where field = $F{VAR} The var appears without surround single quotes, so the SQL engine things we are comparing two columns. What exactly does the $P!{VAR} do in the query. Does the ! remove the single quotes that would normally be around string parameters? I try to explicity put the single quotes back in to no avail.... Attached. Post Edited by at 01/30/09 19:08
  10. I am trying to change my SQL dynamically based on a parameter. When it's null I want the where clause to be field IS NULL When it's not null I want it to be where field = $var How can I accomplish this?
  11. When a null value is passed in as a parameter I need to change my where clause to IS NULL Otherwise there where clause can remain = $P{VAR} Can I do that with expressions? If so How?
  12. The problem was the SQL. It SQL needs to be adjusted so it is Country_ISO3166 IS NULL instead of Country_ISO3166 == nulll Is there an expression I can use in SQL to transform the SQL Statement appropiately?
  13. It's a parameter in the subreport. And it's a field in the report that includes the subreport. So when I call the subreport I pass the field as a parameter. It work well for all the values that are not null. But when it's null I can't get the query to execute correctly. I belive it's either passing in a blank '' or 'null' when I really need a null. The results are the same when i run the subreport as a report by itself. I run it. I am prompted for a java.lang.String value in iReport. And I have no idea how to pass in a null. Attach is the subreport. Any ideas?
  14. And I am using sub reports. I don't nulls are being properly passed into my sub report. I believe a blank is passed into it instead. How can I ensure a true null is being passed into the sub report.
  15. I am trying to use SVG graphics in my Report. In iReport, i only see options for .gif and .png Is there a way to integrate it?
  16. What I posted earlier is just the expression I used in iReport. The actual XML is the following. <image onErrorType="Blank" hyperlinkType="None"> <imageExpression class="java.lang.String"> <![CDATA["http://www.translatorscafe.com/cafe/images/flags/"+$F{Country_ISO3166} +".gif"]]> </imageExpression> </image>
  17. Problem resolved..... See "Dynamically Creating Image URL's using iReport" for solution.
  18. I got it working, just needed to you the "+". Like so... "http://www.translatorscafe.com/cafe/images/flags/"+ $F{Country_ISO3166} +".gif"
  19. I am working on the same issue. Maybe we can help each other out. See "Dynamically Creating Image URL's using iReport" in the same forum. I believe the key is using the right expression in the imageExpression tag. You should be able to plug in variables by using CDATA like so $P{mypic} .
  20. It seems like the solution is to use the imageExpression tag. <image hyperlinkType="None"> <reportElement x="370" y="2" width="42" height="17"/> <imageExpression class="java.lang.String"><![CDATA["http://www.translatorscafe.com/cafe/images/flags/US.gif"]]></imageExpression> </image> But I am having trouble adjusting it so that it changes per row. So far I tried... <image hyperlinkType="None"> <reportElement x="370" y="2" width="42" height="17"/> <imageExpression class="java.lang.String"><![CDATA["http://www.translatorscafe.com/cafe/images/flags/"$F{Country_ISO3166}".gif"]]></imageExpression> </image> But there appears to be an error with the expression. Any help would be appreciated.
  21. I am trying to take a database value and append a .png a the end to create the path to an image using iReport. If it was html the equivalent would be <img src ="http://someurl.com/${databasevalue}.png"/> I am using iReport 3.1.2 Thanks in advance.
  22. Hello. I am using iReport 3.1.2 I am trying to take a database value add .png to the end and show it in my report. If I was to use html as an example, it would be <img src="${databaseValue}.png"/> Thank you in advance.
  23. I purchased the docs a while ago and expected everything to be in the Ultimate Guide. It seems like the ultimate guide doesn't have a section on the import/export util. But the free User Guide does. The jasper documentation should consider adding it to the ultimate guide. The same goes with any other topic that is describe in the free docs that isn't in the Ultimate Guide.
  24. Thanks. Exactly what I was looking for. I am browsing through the documentation I purchased. It seems like the ultimate guide doesn't have a section on the import/export util. But the free User Guide does. The jasper documentation should consider adding it to the ultimate guide.
×
×
  • Create New...