Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 976567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:46:01+00:00 2026-05-16T03:46:01+00:00

I have this Birt report that I inherited from another developer, consisting of a

  • 0

I have this Birt report that I inherited from another developer, consisting of a child table inside a master table. For each row in the master table, the child table lists items belonging to the current master row item.

The two tables are fed from different data sets, the child table dataset taking a parameter indicating the master item whose child items to fetch.

Now, what I need to do is add a SUM aggregate to the bottom of the master table, showing the total (for all master items) of a certain field in the child table.

Consider, for example, the following data:

MasterItem1
            ChildItem1 SomeValue
            ChildItem2 SomeValue
            ChildItem3 SomeValue
MasterItem2
            ChildItem1 SomeValue
            ChildItem2 SomeValue
            ChildItem3 SomeValue
--------------------------------
                       Total

(Why wasn’t this done with grouping instead? Short answer: There are in fact two child tables to each master row, containing different numers and types of fields, so the previous developer probably didn’t figure out a way to accomplish this with grouping.)

At first I thought I could simply add another child table inside the Total field, with an aggregate summing up the values from the child dataset. That didn’t work, however, since the child dataset requires a parameter indicating the master item whose children to fetch, so there is no way to get ALL values from the child dataset at once.

I’m thinking there might be a way to create an expression that references the SomeValue fields in the child table directly, instead of going through the child data set.

Any suggestions are greatly appreciated.

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T03:46:02+00:00Added an answer on May 16, 2026 at 3:46 am

    Thanks Mark and Mystik, both your answers led me on the right path!

    My final solution is as follows:

    1) Declare the sum-variable in the initialize method for the report:

    var total = 0;
    

    2) Add each row’s value to the sum-variable in the onReder method of the data field containing the values:

    total += parseInt(this.getValue());
    

    3) Use the sum-variable as expression in the total-field.

    Works like a charm.


    Update:
    Found a bug in my solution: the last line was left out of the sum. I think the value of the total-cell in the table footer is being defined before the last line has been rendered.

    Fix:

    1. Moved summing code from onRender method to onCreate
    2. Added the following code to the total-cell’s onRender method:

      this.setDisplayValue(total);

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created this report using BIRT and phpjavabridge <?php header(Content-type: application/pdf); header(Content-Disposition: inline;
I installed the BIRT Viewer in Apache Tomcat 7, but I have this error
I have a plugin for an RCP app that uses BIRT. I have a
Have this dictionay retrieving values from DataTable: Dictionary<string,string> meta= ds.Tables[1].Select(key<>'format').AsEnumerable().ToDictionary(k=>k.Field<string>(0),v=>v.Field<string>(1)); How would I apply
I am new to BIRT reporting. In my BIRT report I have two input
I am new to Birt reporting.I have one doubt.I need two report parameter as
i have this js bookmarklet that makes all the current page's font colors black.
I am trying to find a way to create a report in BIRT that
I am a bit confused on this, I made a report template in Birt
I have a Java EE application running on jboss-5.0.0.GA. The application uses BIRT report

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.