Jump to content
Changes to the Jaspersoft community edition download ×

srang

Members
  • Posts

    64
  • 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 srang

  1. Hmmm the code is in a private repo but I can try and post some relevant snippets
  2. I came across this same issue. The problem is that when using preauth token to authenticate, visualize.js doesn't pass along the timezone param.
  3. So I have been having trouble using the extended job search rest service. I have looked at the examples in the documentation like http://<host>:<port>/jasperserver[-pro]/rest_v2/jobs?example=%7b%22outputFormat%22%3a%22PDF%22%7d[/code]but it wasn't using the search parameters passed in via encoded json. I finally got something working using just the plain params like this http://<host>:<port>/jasperserver[-pro]/jasperserver-pro/rest_v2/jobs?owner=joeuser%7cdummyorgv&reportUnitURI=%2FReports%2FFinance%2Freport_title[/code]but if anyone knows how to use json I'd love to get that working
  4. Yeah sure. So what I ended up getting working is using the apache packages for authentication, specifically: org.apache.http.HttpResponse;org.apache.http.client.HttpClient;org.apache.http.client.methods.HttpGet;org.apache.http.impl.client.DefaultHttpClient;[/code]Using those packages I did something like this: public String init(Integer userId) { server = cfg.getString("server"); String target = server + "/"; String token = reportAuthorizer.buildToken(userId); // builds my preauth token with user id String ret = "cookie"; URI uri = UriComponentsBuilder.fromHttpUrl(target).queryParam("pp", token).build().toUri(); HttpClient client = new DefaultHttpClient(); HttpGet req = new HttpGet(uri); try { HttpResponse resp = client.execute(req); ret = resp.getHeaders("Set-Cookie")[0].getValue(); } catch (IOException e) { LOGGER.error("Error with jasper cookie"); LOGGER.error(e.toString()); } return ret; //sessionid }[/code]
  5. This is an awesome and much needed movement for this product. It would be great if Studio and Server also were hosted on github.
  6. I also had to figure this out. So my default values for multiselect inputs look something like this: '(java.util.Collection)(Arrays.asList(1,2,3))' with java.util.Collection as the class and java.lang.Integer as the nested type. Those represent the pk for the field we're comparing to. Then when setting up the input in Jasper Server I'll add label and value so it shows the description but compares the ids. Hopefully this answers your question... If you question was how to use a query to set the default value of an input then I can't help because that is what I'm trying to figure out now
  7. I actually did end up getting a patch for this from support, although I know that doesn't help you much. Sorry!
  8. From your stack trace, it looks like your issue is similar to http://community.jaspersoft.com/questions/851286/jasper-server-601-aws-ssl-errors-key-spec-not-recognised and http://community.jaspersoft.com/questions/842421/cant-email-reports-jasper-server-aws It seems like the accepted solution to this is to switch JDKs. I've tried looking into this more and seen problems with ssl on openjdk1.7 and have tried adding bouncycastle as an external JCE security provider, with limited success... If anyone else has ideas how to fix this issue without switching to the oracle jdk or at least an explanation for why that seems to work I'd be super thankful
  9. I know that there is a rest endpoint, but I was hoping that, since visualize is already using the rest api pretty heavily, there would be a way to schedule reports without having to roll my own rest client. Its really a shame visualize isn't part of the community project, cause I can't put in a patch to it to simplify my code and potentially help people in the future.
  10. Is there a way to schedule a report job via visualize? If not is there any chance that will be a new feature in a future release?
  11. There are links to the trial pro version downloads on the bottom right of the downloads page http://community.jaspersoft.com/download
  12. Are you using the jasperserver-pro version or community edition? You can only use highcharts (the html 5 graphs) if you have the pro version.
  13. So there is one copy of it in /usrshare/jrs_dist/jasperreports-server-bin/buildomatic. I haven't found it in /usr/share/tomcat7/webapps/jasperserver-pro yet but that doesn't mean its not there.
  14. Oops posted that as a comment meant for it to be an answer! I'm not sure of their availability in community vs commercial editions but I did come across a few problems getting them to work the way you'd expect. First of all I couldn't get $p{LoggedInUser} to resolve within jasperstudio but once it was uploaded to the server it worked fine. Second, I had to split up getting a property into multiple steps that had to execute in a certain order. Here is a snippet of how I've gotten an attribute from a user in the past. <parameter name="LoggedInUser" class="com.jaspersoft.jasperserver.api.metadata.user.domain.User" isForPrompting="false"/> <parameter name="OrgAttr" class="com.jaspersoft.jasperserver.api.metadata.user.domain.ProfileAttribute" isForPrompting="false"> <defaultValueExpression><![CDATA[(com.jaspersoft.jasperserver.api.metadata.user.domain.ProfileAttribute)$P{LoggedInUser}.getAttributes().get(0)]]></defaultValueExpression> </parameter> <parameter name="OrgID" class="java.lang.Integer" isForPrompting="false"> <defaultValueExpression><![CDATA[integer.valueOf($P{OrgAttr}.getAttrValue())]]></defaultValueExpression> </parameter>[/code]Then you can use $P{OrgID} as the actual attribute either within the report query or passed as a param to a subdataset. Hopefully this helps!
  15. I'm not sure of their availability in community vs commercial editions but I did come across a few problems getting them to work the way you'd expect. First of all I couldn't get $p{LoggedInUser} to resolve within jasperstudio but once it was uploaded to the server it worked fine. Second, I had to split up getting a property into multiple steps that had to execute in a certain order. Here is a snippet of how I've gotten an attribute from a user in the past. <parameter name="LoggedInUser" class="com.jaspersoft.jasperserver.api.metadata.user.domain.User" isForPrompting="false"/> <parameter name="OrgAttr" class="com.jaspersoft.jasperserver.api.metadata.user.domain.ProfileAttribute" isForPrompting="false"> <defaultValueExpression><![CDATA[(com.jaspersoft.jasperserver.api.metadata.user.domain.ProfileAttribute)$P{LoggedInUser}.getAttributes().get(0)]]></defaultValueExpression> </parameter> <parameter name="OrgID" class="java.lang.Integer" isForPrompting="false"> <defaultValueExpression><![CDATA[integer.valueOf($P{OrgAttr}.getAttrValue())]]></defaultValueExpression> </parameter>[/code]Then you can use $P{OrgID} as the actual attribute either within the report query or passed as a param to a subdataset. Hopefully this helps!
  16. So it looks like you have the syntax right for the comparison in sql. Then set up a parameter with class Collection and then nested type name as whatever your list is made of (eg Integer). Then you can either define a static paramter on the server or define your list of available values from a query based input. You can also assign a default value for the list like so '(java.util.Collection)(Arrays.asList(1,2,3))'
  17. Well what is probably happening is that it is casting 20 and 25 to integers so it is rounding the result to the nearest integer as well. If they are variables change their class to BigDecimal or Double etc and if not, change them to decimal numbers eg 20.0 and 25.0
  18. I'm not 100% sure about this but from playing around with visualize in my own app it seems that config doesn't actually make the REST call to the server for the authentication, but only sets up the credentials for when another visualize function is called, which is useful for running multiple containers with shared credentials. To troubleshoot you may want to try just the simple authentication methods shown in the cookbook and work up from there.
  19. Hi I am starting to get super frustrated with this so any help would be fantastic. So my goal is to show a table and html5 pie chart in the same report. The problem I'm running into is that for some reason the chart can't find fields or variables from the dataset for the label expressions. The reason this is important is because I would like to show the percentage for each sector of the pie in the label field and have the value show something else. I got pretty close to what I wanted when I used the report dataset but then I couldn't figure out how to make the table use that. If possible I would like to stick with the sub dataset because I have inherited a project with everything working except the percentage labels and there are 40 reports and converting them all over would be a serious pain. Thanks!!!!!
  20. There is a svn repo for all the community code here at http://code.jaspersoft.com/svn/ the user and pass are anonsvn
  21. Another option you might want to try is use organization/tenant/user attributes to dynamically determine the host of your datasource and have all of your reports point to a single datasource object. To get this to work across organizations would be to have the datasource in a public folder and restrict access to execute/read.
  22. This might be a silly question but did you create a data adapter in jasper sudio/ireport, verify that the connection worked, and then set that as your data adapter when creating your report?
  23. Thanks to a comment on this post I was able to figure it out. So what I ended up doing is creating a report level query to get my base result set of id's. These ids were stored as an integer field. Then I created a report level variable with a class of ArrayList (variables don't have nested classes for some reason). Then in the initial value expression I put 'new ArrayList()' and then calculation I put System. Finally for the actual variable expression I put $V{<myvarname>}.add($F{<myfieldname>}). Then in my table dataset I do the basic $X{IN, <subreportfieldname>, <newparamname>} then create a tabledataset level parameter with the name I just used in my query. And to top it all of I linked up the parameter and report variable in the table configuration. Hope This helps someone!!!
×
×
  • Create New...