federico.cattozzi
-
Posts
87 -
Joined
-
Last visited
Content Type
Forum
Downloads
Featured Visualizations
Knowledge Base
Documentation (PDF Downloads)
Blog
Documentation (Test Area)
Documentation
Dr. Jaspersoft Webinar Series
Security Advisories
Events
Profiles
Posts posted by federico.cattozzi
-
-
Every Java Application Server has an own way to configure JNDI data source, you have to use the Websphere's way. In alternative you can try to write JNDI data source configuration into .../jasperserver/META-INF/context.xml
-
Define a parameter into master report that contains the subreport name.
Use the parameter into "Print when Expression" or "Subreport Expression" properties to manage how subreport to load.
-
Hi,
My reports on JasperReports Server use a JNDI Data Source defined into this file
C:Program Filesjasperreports-server-5.1apache-tomcatconfCatalinalocalhostjasperserver-pro.xml
Developing with iReport I use a JDBC connection instead of JNDI to test the reports.
Now I'm trying to switch to JasperSoft Studio.
When I use JasperSoft Studio to try to open any Input Control placed on the server, JasperSoft Studio does not found JNDI Data Source and throws this exception:
java.lang.Exception: 1 - Name <JNDI_NAME> is not bound in this Context at com.jaspersoft.ireport.jasperserver.ws.WSClient.get(WSClient.java:274) at com.jaspersoft.studio.server.protocol.soap.SoapConnection.get(SoapConnection.java:74) at com.jaspersoft.studio.server.protocol.ProxyConnection.get(ProxyConnection.java:52) at com.jaspersoft.studio.server.editor.input.InputControlsManager.getInputControls(InputControlsManager.java:120) at com.jaspersoft.studio.server.editor.ReportRunControler$1.run(ReportRunControler.java:81) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)[/code]
If I manually add the JNDI Data Source to "Data Adapters" using "Import From Workspace" option and then I test it, this exception is thrown:
javax.naming.NameNotFoundException; remaining name 'env/<JNDI_NAME>'//See attached image[/code]
So how can I configure JNDI Data Source into JasperSoft Studio?
-
Hi, I am experiencing the same problem.
My environment:
Client: Jaspersoft iReport Designer 4.5.1 -> 4.6
Server: JasperReports Server 3.5 -> 4.5
Java: JRE 7 update 7
System: Windows 7 version 6.1 64bit
I think that the guilty is Java 7.
Surfing the web you can find other bugs related to SocketException in Java 7.
I solved forcing iReport to use Java 6.
Edit iReport shortcut adding appropriate "jdkhome" option as below:
"C:\Program Files (x86)\Jaspersoft\iReport-4.5.1\bin\ireport.exe" --jdkhome "C:\Program Files\Java\jdk1.6.0_33"
-
Or you can use JasperReports Server to run the reports (which is optimized to do it) and you can control it via web services or url.
-
Have you tried it? I'm using Community Edition and this is a very basic feature.
If you are lazy :) try the attacched file on your JasperReports Server without Input Control and without Data Source.
Post Edited by helyair at 07/05/2012 09:20 -
Oracle:
Code: SELECT (SELECT COUNT (*) FROM holder WHERE TRUNC (MONTHS_BETWEEN (SYSDATE, born_date) / 12) < 25) AS under_25, (SELECT COUNT (*) FROM holder WHERE TRUNC (MONTHS_BETWEEN (SYSDATE, born_date) / 12) >= 25) AS equal_25_and_over FROM DUAL
-
I don't understand... every column in Crystal is a database table column or what?
Put here your sql query or describe your data source.
-
The first exception message is not complete.
The second say to me that you are using varchar (String) value in a condition with a int (Integer) column.
-
You put the subreport into a column or page header?
See this
http://jasperforge.org/projects/jasperserver/tracker/view.php?id=5455
-
Try Ad hoc reports on JasperReports Server Professional.
-
Use REPORT_COUNT built-in variable into a textField with attribute evaluationTime="Report".
You can use REPORT_MAX_COUNT parameter to limit the number of rows fetched.
I also use a textField with following expression:
Code: $V{REPORT_COUNT}.intValue() == $P{REPORT_MAX_COUNT}.intValue() ? "Not all data could be fetched" : null
-
Workaround:
If you are using SQL and your subreports do not use the result of the main query as parameter, move the query from main report to another new subreport, so you will have 3 subreports and the main report becomes only a container.
In the "container" instead of the main query put something like "SELECT 1 FROM DUAL", this permits to print the detail band only one time with the content of all 3 subreports inside.
Post Edited by helyair at 06/18/2012 13:41 -
Try to search before posting and use JasperServer's forum not this:
http://community.jaspersoft.com/questions/523038/query-filtered-loggedinusergetusername
Post Edited by helyair at 06/15/2012 08:38
-
It could be useful if you opened the text of the exception and read the cause.
I think it is a limitation of the filter to prevent SQL injection.
Post Edited by helyair at 06/15/2012 08:28 -
I think that it is not a new feature but a bug. Compatibility mode doesn't work for me.
I opened an issue on the tracker.
Post Edited by helyair at 06/12/2012 09:31 -
Read iReport console:
com.jaspersoft.ireport.designer.errorhandler.ProblemItem@1f32f9a
Warning : Element bottom reaches outside band area : y=201 height=20 band-height=0 com.jaspersoft.ireport.designer.outline.nodes.ElementNode@d36d73[Name=, displayName=$F{cidade}]
-
I answer to myself.
An example:
Code: public class MyJRDefaultScriptlet extends net.sf.jasperreports.engine.JRDefaultScriptlet {} public int getMaxValue(String s) throws JRScriptletException, SQLException{ Connection con = ((Connection)this.getParameterValue(JRParameter.REPORT_CONNECTION)); Statement stmt = null; String query = "SELECT max(foo.value) FROM foo WHERE foo.s = '" + s + "'"; int max = 0; try { stmt = con.createStatement(); ResultSet rs = stmt.executeQuery(query); while (rs.next()) { max = rs.getInt("value"); } } catch (SQLException e ) { } finally { if (stmt != null) { stmt.close(); } } return max; }}
-
I have a workaround:
Code: public class MyEngineServiceImpl extends EngineServiceImpl { public OrderedMap executeQuery(ExecutionContext context, ResourceReference queryReference, String keyColumn, String[] resultColumns, ResourceReference defaultDataSourceReference, Map parameterValues) { Object reportMaxCount = parameterValues.get(JRParameter.REPORT_MAX_COUNT); if (reportMaxCount instanceof String) parameterValues.put(JRParameter.REPORT_MAX_COUNT, Integer.valueOf((String)reportMaxCount)); else if (reportMaxCount instanceof BigDecimal) parameterValues.put(JRParameter.REPORT_MAX_COUNT, Integer.valueOf(((BigDecimal)reportMaxCount).intValue())); return super.executeQuery(context, queryReference, keyColumn, resultColumns, defaultDataSourceReference, parameterValues); }}
-
Hi,
I want to put a SQL query into a scriptlet to set a default value for a parameter.
What is the correct way?
Thanks.
-
Importing my reports from JS 3.5 to JS 3.7.1 or 4.1 I think to have found a bug on instantiation of the built-in parameter REPORT_MAX_COUNT.
Im my reports a user can choice REPORT_MAX_COUNT number from a "Single Select List of Values".
This works always in JS 3.5, but in JS 3.7.1 or 4.1 doesn't work if in the same form "Cascading Input Controls" are present.
If I remove them report runs, but links inside it that send REPORT_MAX_COUNT to other reports don't work.
See attacched images to understand the two errors.
-
The order of Parameters is important.
Read this case:
http://jasperforge.org/plugins/espforum/view.php?group_id=112&forumid=102&topicid=42807&page=3#66420
-
It could be useful a option like "--delete" for the command "js-import" to remove useless resources from repository:
js-import --delete --input-zip=myReports.zip
-
I don't understand if you are using JasperServer or a your "web app".
If you are using JS, you can't generate report output into a zip file, but you can use a OS scheduled task that calls "js-export" to export them into a zip file when you want.
Jasperserver 5.5.0 CE Scheduled report parameters disabled
in Products
Posted
Same issue, please fix it!