locked
Crystal report query - Hiding Text Object in absence of its value and move next Text object upward RRS feed

  • Question

  • User2039333251 posted

    I have created crystal report where the data fields are set in a single vertical column. See below link

    http://intelnet.in/Report.aspx

    I want to hide Text object with blank or 0.00 value and move next text object upwards

    e.g In Terms and Condition - Transporter is blank so I want to hide it and move Delivery upwards , similarly for Education cess and other Text objects.

    I have formatted Detail section with Section Expert as Suppress Blank Section and Text Object with Fromat Object as Suppress Embedded Field blank Lines.


    But I could not make Text object invisible in absence of its value and move next Text object upward.

    If there is any coding require, Pls provide the sample code if possible.

    Pls guide me in this regard.

    Thanks in advance.

    Tuesday, March 6, 2012 1:24 AM

All replies

  • User-1923420989 posted

    hi good day,

    you have the option not only to suppress blank field , also you based on the condition you can suppress if the value =0 or whatever. i don't remember how the option is .. may be ( suppress if ) .. there you write your condition and do return true or false.

     

     

     

    Tuesday, March 6, 2012 1:32 AM
  • User2039333251 posted

    Thanks for reply

    I repeate my query,

    I want to suppress Field Heading if there is No value for it and move the next Field Heading up if it has corresponding value.

    e.g. Transporter : LMN Transport

           Delivery :

           Taxes  :

           Payment : 30 days credit

    i want output as 

     Transporter : LMN Transport

     Payment : 30 days credit

    If possible pls provide working eg. or any reference for the same.

    Wednesday, March 7, 2012 1:26 AM
  • User-1923420989 posted

    i have found your the relevant answer here http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=5278

    copied a piece of information here

    text/labels don't have the ability to be suppressed...so I make a formula.  In this case the formula would be:

    "Source: " + {datafield}
    Then when you 'format the field' for the formula, on the common tab there is a line to suppress, click the x-2 button and enter the code to suppress ie isnull({datafield})
    Hope this helps

     

    Wednesday, March 7, 2012 7:08 AM
  • User2039333251 posted

    Thanks for your reply.

    After following yr suggestion, I could hide the Label but I could not suppress blank Space after it. Now I am getting output as

    Transporter: LMN Transport

     

     

    Payment: 30 days credit.

    Steps I have followed are

    Right click on Label > Format Object > Common tab > In Suppress X-2 option > isnull({datafield})  e.g. For Delivery: isnull({Doc.Deliveryname})=true or {Doc.Deliveryname}=""

    So blank space still remains.

    Also in http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=5278, one suggetion was to put above fomula in Suppress(No drill Down)" of Section Expert, when I done so for Delivery label or any other and when its datafield is null , all the data of that section goes invisible. 

    Friday, March 9, 2012 5:28 AM
  • User1243880387 posted

    Hi, if anyone is searching for the same, then might be useful, you cannot shift like this.

    You can although apply formula on the size and position of the text object conditionally.

    Thursday, August 21, 2014 3:32 AM