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 9171103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:07:03+00:00 2026-06-17T16:07:03+00:00

DB Table – RunRecord Name Student_ID Meter(m) Time(s) ABC 1016 100 13 ABC 1016

  • 0

DB Table – RunRecord

Name      Student_ID   Meter(m)   Time(s)
ABC       1016         100        13   

ABC       1016         200        26

ACB       1017         100        15

BAA       1018         100        18

BAA       1018         200        22

BBB       1019         100        14

CDE       1020         200        22

CDE       1020         100        14

What should I do so that I can get the following result in Jasper Report?

                      Student Run Record

                  ABC           ACB           BAA        BBB         CDE
100M              13            15            18         14          14
200M              26                          22                     22
  • 1 1 Answer
  • 0 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-06-17T16:07:04+00:00Added an answer on June 17, 2026 at 4:07 pm

    You can achieve this by using a crosstab element.

    I used the query as provided by you, I have in my sample these fields:

    • Name: String
    • Meter: Long
    • Time: Long

    Drag and drop the crosstab from the Palette into the summary band of the report in the Report Designer, a wizard will pop up.

    Follow the wizard:

    • Select the dataset that holds the query.
    • Configure as rows Meter with grouping set to unique, as column you choose Name with grouping also set to unique.
    • As measure you use Time, and change the aggregator to Sum (anything but count, as you only have one value per student and distance the sum will be the same as the value).

    Once the crosstab is added click in the Report Inspector and expand the crosstab, click on row groups > Meter and in the Properties panel select as Total Position:None. Same for Column Groups > Name.

    The output will be then as shown in the image below.

    draft report

    In order to get the output closer to what you drafted in your query:

    • In the Report Inspector select Row Groups > Meter, in the Properties panel change the Bucket Value Class to java.lang.String. Then in the designer edit the field that holds $V{Meter} and change it to $V{Meter} + "m" to have output 100m instead of 100.
    • In order to hide 0, click in the Designer on the field that holds the measure and change it from $V{TimeMeasure} to $V{TimeMeasure} == 0 ? null : $V{TimeMeasure}. In the Properties Panel check the box for property Blank when null.

    finished report

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

Sidebar

Related Questions

Table structure: title { name varchar(100) } If I try to insert a following
Table A has two columns: ID and name I want to input 3 ID
Table #1: qa_returns_items Table #2: qa_returns_residues I have a long time trying to get
table order id_order | date | id_product | id_size | id_gender | name |
Table A Id Name 1 Apple 2 Mango 3 Banana Table B Id Locale
table a (t_a): id name last first email state country 0 sklass klass steve
table: USERS | id | name | city_id | | 1 | jonh |
Table stores id name date 1 foo 2011-06-15 15:10:34 2 bar 2011-07-02 16:45:18 Table
Table Each row represents a video that was on air at particular time on
Table - user_feed column name - date_n_time (type - datetime) How do I write

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.