Results 1 to 5 of 5

Thread: [RESOLVED] Is there a way to hide columns in report if they contain zeros

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2008
    Posts
    513

    Resolved [RESOLVED] Is there a way to hide columns in report if they contain zeros

    Hello: My sql stored procedure is returning several columns and some times certain columns may only contain zeros. if this happens, i would like to hide the entire column but didn't know if this was possible in a crystal report.

    thanks,
    Proctor

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Is there a way to hide columns in report if they contain zeros

    There are a few ways to do this in Crystal Reports.

    1) Right click on the report object and select Format Field. On the Format screen -> Number tab click the Customize button. On the Custom Style screen -> Number Tab check the "Suppress If Zero" box.

    2) Set the Object Visibility formula. On the Format Screen -> Common Tab click the button beside the Suppress checkbox. Enter a formula similar to
    {DatabaseTable.FieldName} = 0

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2008
    Posts
    513

    Re: Is there a way to hide columns in report if they contain zeros

    brucevde: Hello - I'm finally getting around being able to try out your suggestions and so I tried suggestion #1 and it's working great!!!

    I would also like to supress the header that's associated with it. do you know if there's also a way to do this?

    Thanks again for your help!!!
    Proctor

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2008
    Posts
    513

    Re: Is there a way to hide columns in report if they contain zeros

    Brucevde:

    i used your suggestion #2 to suppress the column headers and so now I'm all set!!!

    Thank you again for showing me how to do this.

    Proctor

  5. #5
    Fanatic Member
    Join Date
    Jul 2007
    Posts
    617

    Re: [RESOLVED] Is there a way to hide columns in report if they contain zeros

    great post!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width