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

waalp

Members
  • Posts

    38
  • 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

Posts posted by waalp

  1. At the end we decided to use the HTTP Repository API. This for now seems to work great.

    We do a POST to http://localhost:8080/jasperserver-pro/reportGenerator.html?action=generate

    With a data parameter with the following JSON:

    {
       "label": "SCHEDULED_REPORT",
       "description": "REPORT_CREATED_BY_SCHEDULER",
       "location": "/Users/JOE_USER",
       "overwrite": true,
       "run": false,
       "sourceURI": "/Users/JOE_USER/BASE_REPORT"
    }
     

    Peter

  2. i'm trying to update a user with the rest service. I have the following user descriptor:

      <user>
        <enabled>false</enabled>
        <externallyDefined>false</externallyDefined>
        <fullName>Joe User</fullName>
        <tenantId>develdb</tenantId>
        <username>joeuser</username>
      </user>
     

    Wich i'm using for a post request to the following url: http://localhost:8080/jasperserver-pro/rest/user/

    But it gives a 400 Bad request code. Is this the right user descriptor to send ? I couldn't find a example of a descriptor... We are using jasperserver 4.7.

    Peter

     

  3. We have something like this

    export JAVA_OPTS="$JAVA_OPTS -Xms2048m -Xmx4096m -XX:PermSize=512m -XX:MaxPermSize=256m -Xss2m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled"[/code]

    in the setenv.sh, wich is located in the bin directory of your tomcat installation. If it doesn't exist, you should create it.

    These values are from my local test installation. For production purposes you should proberly use some other values for the memory.

     

  4. We found out how to do this (atleast for us this works)

    One way of doing is, is to create your own version of the DefaultCacheKeyInterceptor, and add a User object (even if there is none specified in the report).

    Then edit the applicationContext-datarator.xml, and change the class entry of the keyInterceptor bean definition to your own class.

     

    Regards,

    Peter

  5.  We have the adhoc cache enabled, but we are using a custom query executer to retrieve the data. For jasperserver it looks like it's using one datasource while instead it could be a different one then before.

     

    Now is there a way to add the LoggedInUser and the Tenant of the logged in user to the adhoc cache key. I know I could add them as parameters to a topic (and this works) but I would like or

    A) the query executer to add this parameters automatically

    B) make the adhoc cache configuration look at the logged in user and tenant by default by adding them to the adhoc cache key

     

    Is this possible ?

  6. When requesting the parameters for a report with rest, like this : http://localhost:8080/jasperserver-pro/rest/resource/public/Reports/Export/AdvertentieRapport

    The label of the parameter looks like this:

    <label><![CDATA[$R{publicatie}]]></label>In jasperserver when you run the report, this label gets localized. But how do I request the localized version of this label through the rest webservice.Regards,Peter[/code]
  7. Apparently the problem here is, that the report i'm trying to pu a schedule on is of the type com.jaspersoft.ji.adhoc.AdhocReportUnit instead of com.jaspersoft.jasperserver.api.metadata.jasperreports.domain.ReportUnit.

    But it is possible in the application itself to put a job on the report. Is there a workaround for this, so that it will also work with the rest service ?

     

    Regards,

    Peter

     

  8. Hi guys,

     

    I'm trying to use the jobsummary service to get the list of scheduled jobs on a report. I tried it using this link:

    http://localhost:8080/jasperserver-pro/rest/jobsummary/public/Reports/Export/OrganisatieRapport

    It gives a bad report uri error. While the following call: http://report-o/jasperserver-pro/rest/resource/public/Reports/Export/OrganisatieRapport (using the resource method on the same report), does result in a valid return.

    Does anybody have any ideas on what's going wrong here ?

    Regards,

    Peter

  9. This is how i did it, mind you the code below is code for the play framework, so some methods like the WS.* methods are play framework specific.

    First I use the login method, to get a jsession if from the jasperserver. This jsessionid is in our case put in a global String, and added to the headers of all following requests.
    Then I run the runReport method with the URI to the report, and the outputformat I want. This returns an xml, wich I parse in the fetchReport method. This method finally
    downloads the report I requested.

    Hope this helps.

     

    Regards,

    Peter
     

    Code:


    Post Edited by waalp at 01/10/2012 11:07
  10. Hi guys,

     

    We are also using the same reports for multiple clients in a multitenancy situation, for this we created our own query executer. Together with a table in the postgres database (we are using postgres for the data) wich maps a customer to a certain database server, we are able to use the same jrxml for multiple customers.

     

    After login we match the tenant name with a record in the customers table, wich then is used to map it to the right database.

    We use the datasource parameter of an ireport to direct to the postgres database so that is the initial connection a report has.

     

    Hope this helps a bit.

    Regards,

    Peter

  11. Hi guys,

    I have a couple of topics, that I need to translate the column headers for. I tried adding resourcebundels as a resource in jasperserver. But it doesn't seem to work.

     

    Does anyone have any pointers in the right direction ?

     

    Greetings,

    Peter



    Post Edited by waalp at 11/07/2011 16:12
  12. Hello Guys,

     

    I'm trying to have another decorator selected when for example the parameter cxs=true is in the URL. I added this to the decorators.xml:

        <decorator name="cxsmain" page="CXSmain.jsp">
           <pattern>*cxs=true*</pattern>
        </decorator>
     

    But it doesn't work. If i put /* in the pattern it does select the decorator i want, but i can't switch it off again.

     

    Any ideas ?

     

    Greetings,

    Peter

     

  13. Hello guys,

    We are trying to use the checkAuthenticationRoles condition in te actionModel-adhocTable.xml to not show the change sources menu and the save option in the save menu (we only want our users to use the save as).

     

    our code looks like this:

        <context name="toolbar_save">
            <condition test="getCanSave">
                <condition test="checkAuthenticationRoles" testArgs="ROLE_SUPERUSER">
                   <simpleAction labelKey="ADH_030_MENU_SAVE_REPORT" action="designerBase.handleSave"/>
                </condition>
                <simpleAction labelKey="ADH_037_MENU_SAVE_REPORT_AS" action="designerBase.handleSaveAs"/>
            </condition>
        </context>
     

    We tought this ment that is the user has the role ROLE_SUPERUSER, the save menu option would show, and if the user didn't have this role, only the save as option would show in the menu. But after we tried this, no user sees the save action in the menu, even user with the ROLE_SUPERUSER role.

    Is it at all possible what we are doing in the code, or are we doing something wrong ?

     

    Regards,

    Peter

     

     

  14. I usualy do this from iReport itself.

     

    -Go to the repository tab in iReport

    - Select the folder in wich you save your input controls

    - right click the folder, select add -> inputcontrol

    - In the id field, put your parameter name (it has to be exact to the value in between the $P{}

    - Give it a prompt name

    - In the input control details tab, select single value, and select a datatype (you can create a datatype in the same manner in iReport)

    - Then go to the folder of you report, and on the input control map right click and select link an existing input control, and select the input control you just created.

     

    Regards,

    Peter

×
×
  • Create New...