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

kburns

Members
  • Posts

    92
  • 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 kburns

  1. I'm trying to figure out how to handle cascading inputs and came across this problem. I'm basing my code off the nebulous example code given in the documentation. java.lang.Exception: 1 - null at com.jaspersoft.jasperserver.irplugin.wsclient.WSClient.get(WSClient.java:273) at com.jaspersoft.jasperserver.sample.WSClient.get(WSClient.java:86) Code looks like this: try { ResourceDescriptor r = new ResourceDescriptor(); r.setUriString("/Globals/input_controls/order_status_cascading"); r.setResourceProperty(ResourceDescriptor.PROP_QUERY_DATA, null); ListItem li1 = new ListItem("sponsor_cascading_orderid", "American Express"); r.getParameters().add(li1); java.util.List a = new java.util.ArrayList(); a.add(new Argument( Argument.IC_GET_QUERY_DATA, "")); a.add(new Argument( Argument.RU_REF_URI, "Globals/input_controls/order_status_cascading")); ResourceDescriptor r2 = client.get(r, null, a); cat.debug(r2); } catch (Exception ex) { cat.debug(ex); } Any ideas?
  2. I came across the same problem working with two sub reports in a main/master. Each sub had no page breaks. And in the main/master report I put a single page break between the two. "No space left on device" was a bit confusing, but I made the main/master report size larger in height and the two sub reports smaller in height and the problem went away.
  3. So how would I use my boolean parameter $P(useAll} in the query? ($P(useAll} ? this : that) ($P(useAll}=1 ? this : that) ($P(useAll}=true ? this : that)?? despec Wrote: Here is the format for the "If" statement in Ireport: ( condition expression ? true expression : false expression ) David
  4. I'd like to use some IF ELSE logic in a report. Here is the situationI have two inputs: The first is a list of checkboxes for a multi select (LABEL = "Pick some items"). This is a java.util.List. The parameter name is itemList. The second is a single checkbox that is intended to run the query on all of the previous choices (LABEL = "Use all items"). This is a java.lang.Boolean. The parameter name is useAll.The logic of the query is If (useAll is TRUE) (SELECT * FROM XYZ...) ELSE (SELECT * FROM Something else) In SQL I know I can do this IF (1 = 1) BEGIN SELECT 'wow its true' as result END ELSE BEGIN SELECT 'wow its false' as result END My questionCan I use the IF...ELSE in iReport? And if so what is the syntax? So far these have not worked: IF $P(useAll} ... IF $P(useAll}=1 ... IF $P(useAll}=true ... IF !$P(useAll} ...
  5. Is there any documentation that explains what all the static final int/byte/string's in ResourceDescriptor represent? Some are named logically enough for me to make educated guesses, but most of them are not obvious and I can't find a single piece of documentation explaining this. For example: public static final java.lang.String PROP_VERSION = "PROP_VERSION"; public static final java.lang.String PROP_PARENT_FOLDER = "PROP_PARENT_FOLDER"; public static final java.lang.String PROP_RESOURCE_TYPE = "PROP_RESOURCE_TYPE"; public static final java.lang.String PROP_CREATION_DATE = "PROP_CREATION_DATE"; public static final java.lang.String PROP_FILERESOURCE_HAS_DATA = "PROP_HAS_DATA"; public static final java.lang.String PROP_FILERESOURCE_IS_REFERENCE = "PROP_IS_REFERENCE"; public static final java.lang.String PROP_FILERESOURCE_REFERENCE_URI = "PROP_REFERENCE_URI"; public static final java.lang.String PROP_FILERESOURCE_WSTYPE = "PROP_WSTYPE"; public static final java.lang.String PROP_DATASOURCE_DRIVER_CLASS = "PROP_DATASOURCE_DRIVER_CLASS"; public static final java.lang.String PROP_DATASOURCE_CONNECTION_URL = "PROP_DATASOURCE_CONNECTION_URL"; public static final java.lang.String PROP_DATASOURCE_USERNAME = "PROP_DATASOURCE_USERNAME"; public static final java.lang.String PROP_DATASOURCE_PASSWORD = "PROP_DATASOURCE_PASSWORD"; public static final java.lang.String PROP_DATASOURCE_JNDI_NAME = "PROP_DATASOURCE_JNDI_NAME";... public static final byte DT_TYPE_TEXT = 1; public static final byte DT_TYPE_NUMBER = 2; public static final byte DT_TYPE_DATE = 3; public static final byte DT_TYPE_DATE_TIME = 4; public static final byte IC_TYPE_BOOLEAN = 1; public static final byte IC_TYPE_SINGLE_VALUE = 2;... etc etc etc etc etc etc Any ideas, jasper community?
  6. Hi Ernestoo - Yes, I've found the code snippet in question (see below), but it's not obvious to me what is actually happening. Are those /reports/samples/* something that comes with jasperreports? I am using 4.0 pro and can't find those resources. What should the System.out.println look like? ResourceDescriptor rd = new ResourceDescriptor(); rd.setUriString("/reports/samples/Cascading_multi_select_report_files/ Cascading_state_multi_select"); rd.setResourceProperty(rd.PROP_QUERY_DATA, null); ListItem li1 = new ListItem("Country_multi_select", "USA"); li1.setIsListItem(true); rd.getParameters().add(li1); ListItem li2 = new ListItem("Country_multi_select", "Mexico"); li2.setIsListItem(true); rd.getParameters().add(li2); java.util.List args = new java.util.ArrayList(); args.add(new Argument( Argument.IC_GET_QUERY_DATA, "")); args.add(new Argument( Argument.RU_REF_URI, "/reports/samples/ Cascading_multi_select_report")); ResourceDescriptor rd2 = wsclnt.get(rd, null, args); if (rd2.getQueryData() != null) { List l = (List) rd2.getQueryData(); for (Object dr : l) { InputControlQueryDataRow icdr = (InputControlQueryDataRow) dr; for (Object cv : icdr.getColumnValues()) { System.out.print(cv + " | "); } System.out.println(); } }
  7. If anyone has info on this that would be awesome. I can't find anything in the documentation on how to handle cascading inputs with the web services. Based on Ernestoo's post, I have been looking at iReport-4.0.0-src. I assume the stuff I am looking for is in jasperserver-plugin/src/com/jaspersoft/ireport, but I can't find what I'm looking for. I am not even sure what dictates that a specific input's selection determines the options for a 2nd or 3rd one. Any examples or points in the right direction would be great. Thanks so much!
  8. Ernestoo, I am not quite sure I follow. Do you mean checking the html source code while using jasperreports via a web browser? Or in the actual iReport program, looking at the iReport java source? ernestoo Wrote: So iReport's Repository Navigator uses web services calls AND has implemented cascading input controls. If you're in the navigator and right click on a report, click "Run Report Unit" and the cascading controls will be shown. You'll have to look at the source code for iReport to see how it was done
  9. No ideas on this? I suspect its a pretty simple thing.
  10. Its quite simple. Nothing special. I am able to navigate to it and either run as it should look normally or enter the designer mode and tweak it. Next step is making it my default dashboard when I log in. How can I do this? (also: This is with js 4.0) kb Post Edited by kburns at 03/25/2011 18:26
  11. The above was based on the 4.0 web services documentation. However that documentation is actually content for 3.5 and completely obsolete and incorrect. The correct imports are: import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl import com.jaspersoft.ireport.jasperserver.JServer import com.jaspersoft.ireport.jasperserver.ws.WSClient The necessary jars needed in the classpath are: com-jaspersoft-ireport-jasperserver.jar (in \ireport\modules) and all its dependencies located in \ireport\modules\ext js_activation-1.1.jar js_axis-1.4patched.jar js_commons-codec-1.3.jar js_commons-discovery-0.2.jar js_commons-httpclient-3.1.jar js_jasperserver-common-ws-3.5.0.jar js_jaxrpc.jar js_mail-1.4.jar js_saaj-api-1.3.jar js_wsdl4j-1.5.1.jar
  12. I've successfully build jasper server professional 4.0 from source and am now having some problems finding packages contained therein. MyJSClient.java is a very simple main(). When I try to compile I get this: MyJSClient.java:3: package com.jaspersoft.jasperserver.irplugin does not exist import com.jaspersoft.jasperserver.irplugin.JServer; ^ MyJSClient.java:4: package com.jaspersoft.jasperserver.irplugin.wsclient does not exist import com.jaspersoft.jasperserver.irplugin.wsclient.WSClient; ^ MyJSClient.java:9: cannot find symbol symbol : class JServer location: class MyJSClient private JServer server = null; ^ MyJSClient.java:11: cannot find symbol symbol : class JServer location: class MyJSClient server = new JServer(); ^ MyJSClient.java:20: cannot find symbol symbol : class WSClient location: class MyJSClient WSClient MyWSClient = server.getWSClient(); ^ 5 errors Any ideas where I can find these packages? com.jaspersoft.jasperserver.irplugin.JServer com.jaspersoft.jasperserver.irplugin.wsclient.WSClient Thanks!
  13. Turns out everything was fixed by adding repo-path to default_master.properties. Any ideas why there was no reference anywhere to this setting in the documentation? Anywho. I've now run into another problem, but I think I've hijacked this thread enough. Will start another. (Thanks so much for all your help!)
  14. This is happening on build-pro after getting through all the setup/config/init stuff (ie install-jdbc-dep, set-pro-webapp-name, etc) What do you mean by maven sources? My mvn looks like: /usr/share/maven2/bin/mvn -v Apache Maven 2.2.1 (rdebian-1) Java version: 1.6.0_20 Java home: /usr/local/lib/jdk1.6.0_20/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux" version: "2.6.32-27-generic" arch: "amd64" Family: "unix" Now I am getting "Failed to resolve artifact" which helps, but I'm still not sure what the instructions mean. Where can I find these jars on the "project website"? Why would they not come included with the source? [java] [iNFO] Failed to resolve artifact. [java] [java] Missing: [java] ---------- [java] 1) jaspersoft.ji-pro:ji-license:jar:4.0.0 [java] [java] Try downloading the file manually from the project website. [java] [java] Then, install it using the command: [java] mvn install:install-file -DgroupId=jaspersoft.ji-pro -DartifactId=ji-license -Dversion=4.0.0 -Dpackaging=jar -Dfile=/path/to/file [java] [java] Alternatively, if you host your own repository you can deploy the file there: [java] mvn deploy:deploy-file -DgroupId=jaspersoft.ji-pro -DartifactId=ji-license -Dversion=4.0.0 -Dpackaging=jar -Dfile=/path/to/file -Durl= -DrepositoryId=[id] [java] [java] Path to dependency: [java] 1) jaspersoft.ji-pro:ji-common:jar:4.0.0 [java] 2) jaspersoft.ji-pro:ji-license:jar:4.0.0 [java] [java] ---------- [java] 1 required artifact is missing. [java] [java] for artifact: [java] jaspersoft.ji-pro:ji-common:jar:4.0.0 [java] [java] from the specified remote repositories: [java] JasperForge Maven Repository (http://jasperforge.org/svn/repos/maven2), [java] central (http://repo1.maven.org/maven2), [java] Maven Snapshots (http://snapshots.maven.codehaus.org/maven2), [java] JBoss (http://repository.jboss.org/maven2), [java] js-repo-svn (file://${repo-path}), [java] Repo1 Maven (http://repo1.maven.org/maven2/) [java] [java] [java] [java] [iNFO] ------------------------------------------------------------------------ [java] [iNFO] For more information, run Maven with the -e switch [java] [iNFO] ------------------------------------------------------------------------ [java] [iNFO] Total time: 4 seconds [java] [iNFO] Finished at: Wed Mar 02 12:57:13 EST 2011 [java] [iNFO] Final Memory: 43M/238M [java] [iNFO] ------------------------------------------------------------------------ I am using the 4.0 professional source, but the strangest thing is that when I run js-ant build-ce, it compiles successfully.
  15. Ah yes, good catch. I've taken that out. As an update my default_master.properties has: js-path=/home/kburns/jasperreports-server-4.0.0-src/jasperserver js-pro-path=/home/kburns/jasperreports-server-4.0.0-src/jasperserver-pro js-repo-path=/home/kburns/jasperreports-server-4.0.0-src/jasperserver-repo maven=/usr/share/maven2/bin/mvn And with the verbose flag I see this: BUILD FAILED /home/kburns/jasperreports-server-4.0.0-src/jasperserver/buildomatic/bin/dev.xml:417: The following error occurred while executing this line: /home/kburns/jasperreports-server-4.0.0-src/jasperserver/buildomatic/bin/dev.xml:91: Java returned: 1 at org.apache.tools.ant.taskdefs.Java.execute(Java.java:111) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68) at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:217) at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:154) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:390) at org.apache.tools.ant.Target.performTasks(Target.java:411) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397) at org.apache.tools.ant.Project.executeTarget(Project.java:1366) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1249) at org.apache.tools.ant.Main.runBuild(Main.java:801) at org.apache.tools.ant.Main.startAnt(Main.java:218) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) Total time: 9 seconds
  16. Opps, as a reply to Ernestoo, yes this is a professional 4.0 install. If I don't have js-path or js-pro-path defined, I get this almost immediately on install-jdbc-dep BUILD FAILED /home/kburns/sandbox/jasperserver-4.0-src/js-builds/tags/jasperserver/buildomatic/bin/dev.xml:500: The following error occurred while executing this line: /home/kburns/sandbox/jasperserver-4.0-src/js-builds/tags/jasperserver/buildomatic/bin/dev.xml:91: Java returned: 1 If I have both js-path and js-pro-path defined, I get the above error on assemble-export-files-pro after a minute and a half of running through the script. BUILD FAILED /home/kburns/sandbox/jasperserver-4.0-src/js-builds/tags/jasperserver/buildomatic/build.xml:149: src '/home/kburns/sandbox/jasperserver-4.0-src/js-builds/tags/jasperserver/export-tool/target/js-pro-export-import-tool.zip' doesn't exist.
  17. Yup, those are all set to the same values that are working with the regular 4.0 professional jasperreport server
  18. I've done ask explained here, but am still seeing this error: assemble-export-files-pro: BUILD FAILED /home/kburns/sandbox/jasperserver-4.0-src/js-builds/tags/jasperserver/buildomatic/build.xml:149: src '/home/kburns/sandbox/jasperserver-4.0-src/js-builds/tags/jasperserver/export-tool/target/js-pro-export-import-tool.zip' doesn't exist. default_master.properties is: js-path=/home/kburns/sandbox/jasperserver-4.0-src/js-builds/tags/jasperserver js-pro-path=/home/kburns/sandbox/jasperserver-4.0-src/js-builds/tags/jasperserver js-repo-path=/home/kburns/sandbox/jasperserver-4.0-src/js-builds/tags/jasperserver-repo maven = /usr/share/maven2/bin/mvn maven.home=/usr/share/maven2 Any ideas? Post Edited by kburns at 03/01/2011 17:43
  19. Another thought. I've read in some places that people have made jsp scriptlets for jasper reports. As I understand the code was somehow embedded in the jsrxml to appeared on the jasper server interface. Would it be feasible to embed these reports in our other reports server?
  20. Hello all - This may be competely unfeasible and if so please feel free to shoot it down. Here is the situation: We already have an extensive reporting site. However in the past year we have been creating new reports on JS 3.7. At the moment are moving to JS 4.0 and would like to continue moving forward using jasper for all future reports. Ideally we would port all the old reports to jasper, but this would take a massive amount resources that we can't afford. Rather than having 2 reporting sites we're interested in the possibility of combining our current reports site and jasper 4.0. So my question is whether there is anyway we could: A. Somehow "embed" jasper reports inside the other site? B. Somehow make calls to jasperserver from within our reporting site to display report data? My guess is that if its possible the solution would end up being a combination of A and B. Please let me know if you have any ideas or if this seems completely impossible or would involve a massive amount of custom work. Thanks! kb
  21. mdahlman - Thanks for the help! This makes a lot more sense. I mispoke when I said "key/values pairs". What you described is what I was aiming for. My main problem was in confusing the column and parameter names. After fixing that I was able to use the $X{IN, asdf, qwerty} syntax successfully. As a follow up question, I'd like to display the list of user selected values. I tried simply doing $P{MyParam}, but it spit out the selected IDs. And if possible it would be great to display them not just as ".toString()" output. For example: ["CHOICE 1","CHOICE 4","CHOICE 45","CHOICE 60"]
  22. I have an input control query that returns a list of key/values pairs (id, label). I need to create a multiple select checkbox, but I am having a terrible time figuring out how this seemingly simple task. The value column = xyz The visible query column = abc Type = Multi-select query (check box)In the report query dialogue I have tried creating this parameter several time and it always shows up as "java.lang.NullPointerException". Here is what I do: Go to the right side and click "new parameter" Parameter name = xyz OR abc (both cause the error) Value expression = java.util.List OR java.lang.Object (both cause the error) Default value expression = I've tried leaving it blank or using "select top 1 id, label from my_table" (both cause the error)Please tell me what it is that I am doing wrong here. I can't find any explanations online, in these forums or in the documentation so at this point I am just banging my head against a wall. thx.
  23. mdahlman and tkavanagh - Thanks for the info. We were able to fix this by running perl -p -i -e "s:/bin/sh:/bin/bash:g" * in buildomatic and buildomatic/bin Post Edited by kburns at 02/16/2011 23:15
×
×
  • Create New...