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

prusyn

Members
  • Posts

    45
  • 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 prusyn

  1. What user are you trying to execute the report as? Only superuser can see absolute path to resources, like /organizations/org_name/path/to/resource/

    To make report available for the user from the organization, you need to specify relative path to the resource. If the absolute path is repo:/organizations/org_name/path/to/resource/ then relative path would be repo:/path/to/resource/

  2. There are a bunch of approaches, which depend on your java knowledge. For example, expressions:

    A)

    String.format("%.2f", new BigDecimal(Double.parseDouble($F{sample})))[/code]

    B)

    new DecimalFormat("0.00").format(new Double($F{sample}))[/code]

    where $F{sample} is a field from dataset, that contains numbers. I used sample query: 

    select '25.45060506506456' as sample[/code]

    Also, attaching report.

  3. Hi,

    I had to play around a bit, but was able to achieve your desired result. I have created parameter:

        <parameter name="cal" class="java.util.Calendar" isForPrompting="false">        <defaultValueExpression><![CDATA[Calendar.getInstance()]]></defaultValueExpression>    </parameter>[/code]

    and variable:

    <variable name="newDate" class="java.util.Date"><variableExpression>    <![CDATA[        (        $P{cal}.set($F{birthdate}.getYear()+1900, $F{birthdate}.getMonth(), $F{birthdate}.getDate()) ||        $P{cal}.add(Calendar.DATE, 6)        )        ? null : $P{cal}.getTime()     ]]></variableExpression></variable>[/code]

    Result looks like that: http://prntscr.com/m8xtdz

    I'll attach sample report with sample data. You should be able to run it without any issues. Let me know if this fits your requirements :)

  4. You are using report rendering function for rendering dashboards - That's the problem. You should be using v.dashboard. For example:

    visualize({    auth: {        name: "jasperadmin",        password: "jasperadmin",    }}, function (v) {    var dashboard = v.dashboard({        resource: "/public/Workshop/Profit_Dashboard",        container: "#container"    });});[/code]

     

  5. As you might notice in logs, your issue is thrown by SQL Validator. By default it does not allow some SQL queries for security purpose. You can edit security configuration options to allow specific SQL or disable the validation completely:

    1 - The following regex fix should work for most cases.

    In this file: webapps/jasperserver/WEB-INF/classes/esapi/security-config.properties/validation.properties  

    Validator.ValidSQL=^s*(?i)(withs+.*)?(select|call|exec(ute)?)s+[^;]+$[/code]

    2 - Alternatively turn it off here: webapps/jasperserver/WEB-INF/classes/esapi/security-config.properties  

    security.validation.sql.on=false[/code]

     

  6. As far as I understand, export to DOC creates tables in table. So from Word perspective if you remove the first page table, you just remove the content of outer table. That is why it doesn't automatically occupy free space, as in fact the space isn't free - it is reserved by first row of outer table. So, if you want to delete the first page table, you also might want to delete the row in outer table. I tried to screencast it. Hope this helps: https://www.screencast.com/t/oQxkgriDDgsV

  7. As I understand the problem is you see two charts, while you should be seeing only one. In this case the problem is that you put the chart in detail band. Everything present in detail band is printed as many times as there are rows in dataset. If you had 100 rows in dataset, you'd end up with 1000 charts :)

    Another issue you might experience would be Caused by: net.sf.jasperreports.engine.JRRuntimeException: Error incrementing bidimensional dataset.

    What I would suggest - place Chart into Summary band.

×
×
  • Create New...