Jump to content

despec

Members
  • Posts

    114
  • Joined

  • Last visited

 Content Type 

Forum

Downloads

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Events

Profiles

Posts posted by despec

  1. Jasper Dashboards are created through the JasperServer interface: Create--> Dashboard. From there, it's a matter of adding report units using the Dashboard designer, then saving the Dashboard to the server repository. If you have any further question, by all means, please post them and I'll see if I can help with a good answer.

     

    David

  2. I've done this, but it's a bit tricky. it involves using a "sort_by" parameter within your SQL query. Here's a simple example:

     

    select

    employee_name,

    activation_count,

    deactivation count,

    net_adds_count

     

    from

    (some database table)

     

    where

    (some conditions perhaps)

     

    order by $P{sort_by}

     

    Within Ireport when the report is first run, set a default "sort_by" to "activation_count asc". The report runs and sorts by that table field. When you design your report, make the column labels "hyperlinked", so when the user clicks on the column, the same report is run, but the "sort_by" parameter within the hyperlink parameters is changed to be sorted by that column.

     

    There's a little more work to be done to make this work, but hopefully this will get you going on the right track.

     

    David

     

     

  3. Not sure if that's possible.  I was thinking you could use an "OR" condition within the style setup, but that would cause fields to turn red even if that field was less than 5 because one of the other fields might be >= 5.  I think you may be stuck writing a style for each field.

    David



    Post Edited by despec at 06/08/2011 13:09
  4. select

    date_field,

    sum(item1) as item_1_total,

    sum(item2) as item_2_total,

    sum(sum(item1+ item2)) over (order by date_field asc) as running_total

    from

    your_database

    group by date_field

    order by date_field desc

    ===============================================================

    Forgot the "group by" in the initial query, and the sum over wasn't formatted correctly...My apologies.  I tested this query using data at my office and the output shows the day total, then the running total like so:

    Date                       A_Balance                      Running_Balance
    ====                     ========                      =============

    6-1-11                    186066                             3183024

    5-1-11                    192135                             2996958

    4-1-11                    195705                             2804823

     

    .....and so on....

     

     

    David

     

     



    Post Edited by despec at 06/08/2011 12:41
  5. I would imagine that something like this is best accomplished in the SQL query itself...Something like:

     

    select

         date_field,

         sum(item1) as item_1_total,

         sum(item2) as item_2_total,

        sum(item1+ item2) over (partition by date_field desc) as running_total

    from

        your_database

    order by date_field desc

     

    Hopefully this will give you the basic idea...

    David

  6. If I understand you correctly, perhaps an easier way is to use a GROUP BY in your SQL statement:

     

    select

    trans_type,

    sum(value) as trans_type_total

     

    from

    (your db)

     

    group by trans_type

     

    Hope this helps,

     

    David

  7. Yes, you can use Ireport parameters within a SELECT statement...here's an example

     

    Ireport parameter is CUST_NO

     

    select

    cust_name,

    cust_sales

     

    from

    cust_db

     

    where

    cust_no = $P{CUST_NO}

     

     

    Pretty simple stuff, but this should get you started.

     

    David

  8. Well, the thing that sticks out to me is that your query results in a cartesian table because you have nothing joining the tables together. That may be causing the server to timeout depending on the size of these tables.

     

    David

  9. Although I can't say for sure this will work, try assigning a new parameter with the value of the variable in your main report, then "pass" that new parameter to your subreport which needs to also have that new parameter included in it's parameter list.

    David



    Post Edited by despec at 04/01/2011 20:01
×
×
  • Create New...