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

zh3ntil

Members
  • Posts

    122
  • 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 zh3ntil

  1. Hi,

    You can achive this by using 3 variable. For example create variable like below. Sort is important. Beacuse jaspersoft calculates the variable by orders.

    1. vSalesCurr =  $F{Sales}
    2. vSalesDiff =  $V{vSalesCurr} - $V{vSalesPrev}
    3. vSalesPrev =  $F{Sales} (you can define 0 as initial value)

    While jasper processing the vSalesDiff,

    • vSalesCurr holds current value because it is calculated already
    • vSalesPrev holds the previous value because it is not calculated yet and still holds the previous value. 

    That's the trick.

  2. Hi,

    I assume that you use the variable on Group header, not on group footer. So you have to set the evaluation type of the textfield which is used for variable on table. Select the text field and go the properties. Under the 'Text Field' section, set the evaluation type as '[Groupname] Group' and try again. You should see the proper values.

  3. Hi psundaravaradhan,

    You are right. That's the only way to make it on Jasper level is giving a filter expression. But If you want to use like that and the result set has too many rows, some performance issue will come with it. Because when you giving a filter expression for the top records, reports show top records after fetching all the query results.

     

     

     
     
  4. For detail band nature, it is normal to behave like that. For example in first iteration dataset has one row but second iteration the result set has two row and goes like that. So. first evaluation of detail band your map has one marker and second iteration there will be two marker with previous one. 

    Create two parameters for lat and long data and try to assign your lat and long fields to that parameters. So your parameters will hold last record while each detail band evaluation. After that use that parameters, not fields, for markers.

  5. Are you sure about this query working on SQL. Because there is a syntax error.

     select
    a.oracle_project_id, a.client_id, a.mhs_client, a.stage, a.Date_Changed
    from (
    select  o.oracle_project_id, o.client_id, o.mhs_client, v.Date_Changed, stg.name stage,
    ROW_NUMBER () OVER (PARTITION BY o.oracle_project_id ORDER BY v.Date_Changed desc) AS RowNumber)
    from inv_investments inv ...

    Remove the end bracket after 'RowNumber' and try again.

  6. create a group from outline based on name field. Click group band and go to group band propertes. check the 'new page' under Group Band Properties.

    After that, go to report properties and check the properies as you want for example 'title on a new page'

  7. It seems you have a connection porblem to your mysql DB.

    "Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure"

    I'm quoting from this answer which also contains a step-by-step MySQL+JDBC tutorial:

    If you get a SQLException: Connection refused or Connection timed out or a MySQL specific CommunicationsException: Communications link failure, then it means that the DB isn't reachable at all. This can have one or more of the following causes:

     
    1. IP address or hostname in JDBC URL is wrong.
    2. Hostname in JDBC URL is not recognized by local DNS server.
    3. Port number is missing or wrong in JDBC URL.
    4. DB server is down.
    5. DB server doesn't accept TCP/IP connections.
    6. DB server has run out of connections.
    7. Something in between Java and DB is blocking connections, e.g. a firewall or proxy. 
     
    To solve the one or the other, follow the following advices:
     
    1. Verify and test them with ping.
    2. Refresh DNS or use IP address in JDBC URL instead.
    3. Verify it based on my.cnf of MySQL DB.
    4. Start the DB.
    5. Verify if mysqld is started without the --skip-networking option.
    6. Restart the DB and fix your code accordingly that it closes connections in finally.
    7. Disable firewall and/or configure firewall/proxy to allow/forward the port.
  8. That's a little bit tricky I guess :) maybe you can try do sth like this. add a column your main report query and the query will be your table dataset query with COUNT().

    (select count(*) from ... where ... ) as checkfield

    so, if checkfield is 0 then it means there is no record for that specific row.

    After that you can use this field for print when expressin of detail band :)

     

     

     

×
×
  • Create New...