Jump to content
Changes to the Jaspersoft community edition download ×

arnaudsimon091

Members
  • Posts

    54
  • Joined

  • Last visited

Community Answers

  1. arnaudsimon091's post in REST API : List all reports problem was marked as the answer   
    Hello there,
    Your problem is caused by a default limit on the "resources" API request, if you don't modify the "limit" parameter, only 100 results max will be fetched.
    Use your query like this to deactivate pagination and fetch all results : http://localhost:8080/jasperserver-pro/rest_v2/resources?limit=0&resourceType=reportUnit.
     
    Best regards
  2. arnaudsimon091's post in Hide credentials in datasource expression was marked as the answer   
    Hello there,
    I think that it would be easier for you to use default adapters instead of java.sql.Drivermanager, moreover it isn't needed to write credentials.
    To do so, you need to export your data adapter to a XML file, then publish it to jasperReports server.
    After, that, configure each "Default Data Adapter" property in each subreport, compile them, compile your main report and publish it without datasource connection.

    (more information in this jaspersoft documentation : https://community.jaspersoft.com/wiki/how-deploy-and-use-data-adapter-tibco-jasperreports-server-v56)
    Best regards
     
  3. arnaudsimon091's post in use UUID in mongoDB query (filter by id) was marked as the answer   
    I finally found how to use a UUID in a mongo query.
    You should first convert your UUID in base64, to do so I used 2 online converters, the first one gave me the 12 first base64 caracters, the second one the 12 last 
    (yes, this is strange).
    To give you a concrete example : 
    Basic UUID : 41e73145-2489-54e1-d2fc-d400bea5e9b1
    Site 1 : QecxRSSJVOHS/AAA1AC+pQ
    Site 2 : RTHnQYkk4VTS/NQAvqXpsQ==
    Final base64 result :  QecxRSSJVOHS/NQAvqXpsQ==
    Then to use it in Jasper, you'll need this syntax : 
    _id: new BinData(4,"QecxRSSJVOHS/NQAvqXpsQ==")
     
  4. arnaudsimon091's post in Use condtionnal filter on query to choose a table was marked as the answer   
    Hello Iggy,
    Your query should work if you use $P!{Database}, this syntax is mandatory.
    old question : https://community.jaspersoft.com/questions/1115771/how-set-sql-query-dataset-dynamically
  5. arnaudsimon091's post in Enable user to create domains was marked as the answer   
    Hi jean-pierre,
    Try to use a role name with the prefix "ROLE_" like "ROLE_USER" for example.
    It worked for me !
  6. arnaudsimon091's post in Can't export Dashboard to pdf was marked as the answer   
    I have contacted the support for this issue.
    The problem was the absence of the "Temp" folder inside the organisation folder, it's necessary to have it with Administer permissions on ROLE_USER in order to export a dashboard in PDF / docx.
    Contact me if you have a similar problem.
  7. arnaudsimon091's post in Is it possible to publish a japser report (JRXML file) with command line prompt ? was marked as the answer   
    Hi jean-pierre !
    You can publish reports with the REST API,  go to this documentation (https://community.jaspersoft.com/wiki/how-use-rest-v2-upload-report-unit-jasperreports-server-base64-encode-approach) for more information.
    Example of a shell script right here : 
    #put all the jrxml into a variable
    JRXML_DATA_1=$(cat ../select_acti.jrxml) 
    #curl command to publish the jrxml file
    curl  -X POST http://your_server:8080/jasperserver-pro/rest_v2/resources/path_where_you_want_to_put_the_report -H "Content-Type:application/jrxml" -H "Content-Disposition:attachment; filename=name_of_the_jrxml_file" -H "Content-Description:your description" -d "$JRXML_DATA_1" --user username:password
    #load a reportUnit into a variable :
    RESOURCEDESCRIPTOR_XML_1=$(cat ../select_acti_reportUnit.xml)
    #curl command to create the reportUnit
    curl -X POST http://your_server:8080/jasperserver-pro/rest_v2/resources/path -H "Content-Type:application/repository.reportUnit+xml" -d "$RESOURCEDESCRIPTOR_XML_1" --user username:password
     
    example of reportUnit file : 
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <reportUnit>
        <description></description>
        <label>select_acti</label>
        <permissionMask>1</permissionMask>
        <uri>/path/select_acti</uri>
        <version>0</version>
        <dataSourceReference>
            <uri>/datasource_path</uri>
        </dataSourceReference>
        <alwaysPromptControls>true</alwaysPromptControls>
        <controlsLayout>popupScreen</controlsLayout>
        <inputControlRenderingView></inputControlRenderingView>
        <jrxmlFileReference>
            <uri>/path/select_acti_jrxml</uri>
        </jrxmlFileReference>
    </reportUnit>
    Best regards,
    Arnaud
  8. arnaudsimon091's post in Copy a report / resources of a folder to another folder with REST API was marked as the answer   
    Hi jean-pierre ! 
    If you want to copy a report to another folder,  you'll need to use a syntax like this : 
    Method : POST
    Headers : Content-Location resource_to_be_copied_path
    Request : http://your_server:8080/jasperserver/rest_v2/resources/path_to_folder_where_you_want_to_copy_resource?overwrite=true&createFolders=true
    Sample image : 

    If you need more informations, you can check the REST API documentation in the Docs section of this website, it's pretty usefull.
    Best Regards,
    Arnaud
  9. arnaudsimon091's post in Use JMeter on REST API calls ? was marked as the answer   
    Hi iggy !
    Yes it's possible to test REST API calls in JMeter, you only need to add a HTTP Request with POST method and your credentials to the path jasperserver-pro/j_spring_security_check.

    Check this website for more information https://community.jaspersoft.com/wiki/jmeter-and-rest-data-source-performance-testing
    Best regards,
    Arnaud
  10. arnaudsimon091's post in Update several "slaves" report when a "master" report is updated was marked as the answer   
    HI iggy !
    I found a way to approximately do it, I will give you a sample case :
    In this sample, we want to have a "master report" and a "slave report" which will copy the content of the master.
    1) Build the master report (just a classic text field inside) and publish it on jasperserver
    2) Build the slave report, put only a subreport in it with this expression "repo:/path_to_your_master_folder/master_report_files/main_jrxml" then publish it
    3) Check with the main_jrxml file of your slave report that you have a subreport with the good expression in it (can be buggy sometimes)
    -> Now when you update the master report and publish it again (change the static text for example), the slave report is updated
    WARNING : This method doesn't work if you have external config (images, input controls, ...) so be prepared to copy them with another method
    Hope this will be helpfull !
  11. arnaudsimon091's post in Can't load a jrxml file into my subreport was marked as the answer   
    Hi man,
    I had a similar problem but when I published my report on jasperserver it worked, check my quesion here if you want to have more details : https://community.jaspersoft.com/questions/1147591/subreport-which-contains-jasperreports-server-report
  12. arnaudsimon091's post in Subreport which contains a JasperReports Server Report was marked as the answer   
    I finally found what I should do in order to have a report of the jasperserver inside my subreport.
    Let's say I have a "master report" in jasperserver and a ''slave report" = subreport which contains master report.
    To put I had used this expression in the subreport "repo:/path_to_report/report_files/main_jrxml" and published it.
    Then everything worked (subreport contained  a jasperserver report).
    But I had another problem, when I updated my "master report", I saw that my "slave report" weren't updated.
    So I opened the "main.jrxml" file of the "slave report" and I saw that instead of a subreport, it contained only a static text.
    So I modified my "slave report" until I had a subreport with the expression "repo:/path_to_report/report_files/main_jrxml"
     -> 
    Now when I modified my "master report", my "slave report" is updated.
    PS : With this method, external resources like "input controls" or "images" in the "master report" can't be automatically updated in to the "slave report"
  13. arnaudsimon091's post in subreports display behaviour was marked as the answer   
    Hi jean-pierre, when one of your subreport is upper than the others in a band, you can change the position type to "float" for all the sub reports except the upper one.
    Everything should be well displayed after this setup !
  14. arnaudsimon091's post in Bad excel export in jasperReports server was marked as the answer   
    Hello again iggy,
    If you want a good rendering in the XLS format, you need to place carefully your elements in yoaur report (no overlaping) and add this property in your report to render images / graphics (in the source tab) : 
    <property name="net.sf.jasperreports.export.xls.ignore.graphics" value="false"/>
     
    PS : You haven't got a missing line in the second report, it's just not aligned, change your column header and it should be fine
  15. arnaudsimon091's post in Can't sort my AdHoc view (growing / decreasing) was marked as the answer   
    Hi iggy,
    If you want to use the "ascending/descending" filter in your AdHoc view, you need to put this measure into the column tab.
    Tell me if everything work after
     
  16. arnaudsimon091's post in Is it possible to export jaspersoft dashboard with visualize.js ? was marked as the answer   
    Hi jean-pierre ! I had the same problem, and I think that exporting dashboards is not possible for the moment with visualize.js.
    If you want to export your dashboard inside your Angular application (in PDF for example), you should just put the PDF of your dashboard into a folder of your JasperReports server and create a button in your Angular application which will redirect the user to this resource.
    I put you some images here to show you how it works, have a nice day !
    /sites/default/files/user_uploads/arnaudsimon091/2019-07-30_09h33_03.png
    /sites/default/files/user_uploads/arnaudsimon091/2019-07-30_09h39_09.png
  17. arnaudsimon091's post in Upload jaspersoft Scriptlet on jasperReports server was marked as the answer   
    Hi jean-pierre, to upload a report with scriptlets you need to put your scriptlets in jasperreports-server-7.1.1apache-tomcatwebappsjasperserver-proWEB-INFlib and in jaspersoft studio, choose the option "all sections and no details" in the "if no data type" option  :
    /sites/default/files/user_uploads/arnaudsimon091/2019-05-23_13h59_51.png
    Watch my video for more details : 
  18. arnaudsimon091's post in Help with Hyperlink was marked as the answer   
    Hi yfattibene ! 
    To do this you need to use Anchors, first set an anchor name to the element you want to go (a text field in the title band for example) :
    /sites/default/files/user_uploads/arnaudsimon091/title.png   /sites/default/files/user_uploads/arnaudsimon091/properties_of_title.png
    Then, create another text field in your header and set the hyperlink properties to "Self", "LocalAnchor", "your_anchor_name" like i did in this picture :
    /sites/default/files/user_uploads/arnaudsimon091/header.png /sites/default/files/user_uploads/arnaudsimon091/2019-05-22_15h51_29.png
    Preview your report and everything should work fine :) 
×
×
  • Create New...