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

asimkin

Members
  • Posts

    196
  • 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 asimkin

  1. Hi,

    in Manage > Server Settings > Server Attributes menu you should add atrbiutes using their name/key, that is just

    userName
    password

    Syntax like {attribute('host','Server')}  should be used in Da tasource definition only:

    jdbc:postgresql://{attribute('host','Server')}:{attribute('port','Server')}/{attribute('db','Server')}

    Best regards,
    Andriy

  2. Hi,

    most probably the error caused the report SQLs.

    JasperReports Server validates report queries to protect against SQL injection:

    https://community.jaspersoft.com/documentation/tibco-jasperreports-server-security-guide/v71/protecting-against-sql-injection

    SQL must meet requirements described in the doc.

    To test is the query triggers the errror, you can temporary disable SQL validation and try to run the report.

    Hope, it helps.

    Best regards,
    Andrew

  3. Hi,

    first of all, I'd like to mention all the SQL queries must return identical set of fields, in your scenario.

    In order to achieve the requirements, you could use $P!{} syntax : 

    https://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-user-guide/v71/using-parameters-queries-0

    The idea is to create an additional hidden parameter which uses selected by user option from drop-down list to specify according query, like

    IF($P{Parameter1}.equals("Q1"),"select orderid as id from orders",IF($P{Parameter1}.equals("Q2"),"select shipvia as id from orders","select 1 as id"))

    Then, the report dataset query should be like

    $P!{p_query}

    Find attached sample report that demonstrates the idea.

    Hope, this helps.

    Best regards,
    Andrew

×
×
  • Create New...