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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:03:13+00:00 2026-05-22T01:03:13+00:00

I have a report with a subreport to add a logo to the main

  • 0

I have a report with a subreport to add a logo to the main report. In this subreport I have 2 detail bands to support two differently sized logos; one is long and the other is about a 3rd a long (width). kind of like this…

...........................
|---------logo------------|
address 1, address 2
...........................
|__logo__|    address 1
|        |    address 2
...........................

Between the 1st and 2nd row of periods is the Details 1 band and between the 2nd and 3rd is Details 2 band.

I am trying to use the “Print When Expression” to toggle the 1st or 2nd Detail band depending on the value of $F{LogoName}.

Detail 1 band:

new Boolean($F{LogoName}=="acompanyname")

Detail 2 band:

new Boolean($F{LogoName}!="acompanyname")

but it does not work.

Have also tried these:

(($F{LogoName}=="acompanyname")?Boolean.TRUE:Boolean.FALSE)
(($F{LogoName}!="acompanyname")?Boolean.TRUE:Boolean.FALSE)

The $F{LogoName} is “acompanyname”.

Every time I run the report only Detail 2 band shows. I can not get details 1 to show at all and I am not getting any error messages.

Any help is welcome.

Thank You

  • 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-22T01:03:14+00:00Added an answer on May 22, 2026 at 1:03 am

    Try this:

    $F{LogoName}.equals( "acompanyname" )
    

    In Java, the equality operator (==), when used on objects, checks to see if they are the same reference to the same object. This one catches all report developers without a lot of Java programming experience. You could write:

    $F{LogoName} == $F{LogoName}
    

    That would return true, as you expect, because both objects on either side of the equals operator are the same. Consider the following:

    public class T { 
      public static void main( String args[] ) {                                    
        String s1 = "hello";                                                        
        String s2 = (new StringBuilder( s1 )).toString();                           
    
        System.out.println( s1 );
        System.out.println( s2 );
        System.out.println( s1 == s2 );
      }
    }
    

    This prints:

    hello
    hello
    false
    

    The values of the strings objects are the same, but the references to the strings are different. The equals operation compares the references, not the values.

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

Sidebar

Related Questions

How do i get subreport name in C# ? i have one main report
I have a report like this person | lead count | support count |
I have a report template that has a subreport; in main report I have
I have a main report which contains user information -- and a subreport that
Similar to this question , but I have one master report which contains many
I have a report which lists out a company detail. There are two sections
i'm trying to add subreport to report. I have setted connection type to use
The subreport has two Detail bands, the first is Title and the second is
I have an issue that's pretty baffling: Main report contains subreport Subreport uses a
I am using grails and I have this Jasper report with a subreport in

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.