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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:30:11+00:00 2026-05-31T13:30:11+00:00

I am attempting to generate a cross tab report using JasperReports . The column

  • 0

I am attempting to generate a cross tab report using JasperReports. The column contains time periods and the row contains different group by conditions. Now I need to change the styling of the row headers based on the level. For example, in the grid shown below, web and email need to be in bold while the other row headers are as is.

enter image description here

Now, I have a field in the bean that lets me decide if I should make the text bold or not, so I tried to use this in a conditional style as below

<style name="rowStyle" hAlign="Center">
   <conditionalStyle>
      <conditionExpression><![CDATA[$V{level}.intValue() != 0]]></conditionExpression>
         <style isBold="true" hAlign="Left"/>
   </conditionalStyle>
   <conditionalStyle>
      <conditionExpression><![CDATA[$V{level}.intValue() == 0]]></conditionExpression>
         <style isBold="false" hAlign="Right"/>
   </conditionalStyle>
</style>

and I have a field and a measure expression corresponding to this

<field name="level" class="java.lang.Integer"/>

<measure name="level" class="java.lang.Integer">
   <measureExpression><![CDATA[$F{level}]]></measureExpression>
</measure>

However this style does nothing when used inside the crosstabRowHeader, it takes effect only inside crosstabCell.
So my questions are

  • Is anyway for me to use a conditional style inside the crosstabRowHeader?
  • More specifically, can I access any bean property within the crosstabRowHeader?
  • 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-05-31T13:30:11+00:00Added an answer on May 31, 2026 at 1:30 pm

    Managed to figure this out after all.
    So the issue is to be able to access a property from the bean within the crosstabrowheader (or any other cross tab headers).
    To do this first create a field corresponding to the bean as so –


    <field name="voBean" class="com.jasper.reports.voBean">
    <fieldDescription>_THIS</fieldDescription>
    </field>

    Then in the headers, specify this bean as the bucket class.


    <rowGroup name="voBean" width="200">
    <bucket class="com.jasper.reports.voBean">
    <bucketExpression><![CDATA[$F{voBean}]]></bucketExpression>
    </bucket>

    You can now start to access any property on the bean as below


    <textFieldExpression><![CDATA[$V{voBean}.getRowName()]]></textFieldExpression>

    Hope this helps anybody else with the same problem.

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

Sidebar

Related Questions

I'm attempting to generate documentation for a web service in C# using Sandcastle. What
I'm attempting to generate artifacts for the following amazon wsdl: http://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl using the following
I am attempting to dynamically generate cube-maps in OpenGL using a multi-pass rendering system.
I'm attempting to run TextTransform.exe to generate code using a T4 template file. The
I'm using JLex for our latest assignment, attempting to generate a scanner for a
I am attempting to generate a dOOdads business entity using MyGeneration against an Oracle
I am attempting to use faceting to generate multiple maps filled with different values.
I am attempting to generate a custom tooltip using Microsoft Chart Controls. Microsoft Chart
I am attempting to generate datamatrix barcodes from within itext. This works fine for
I am attempting to generate a BitmapFrame that is based on a UIElement .

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.