CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Report Label - turning a number red

Print topic Send  topic

Author Message
csydow


Posts: 22
Posted: 03/06/2014, 9:34 AM

Hello I am hoping someone can help.

I have a report label, content=html. I've got it coded in before show to turn red if below a certain number.

Doesn't throw an error, but the number does not show at all (let alone red) when it meets this condition.

I had this happen several weeks ago in a report label and discovered a work around but I cannot remember what it is, LOL.

Any advice?

Thank you!
View profile  Send private message
eratech


Posts: 513
Posted: 03/06/2014, 4:47 PM

Hi - if it's a number there are some formatting options in the Manual topic "Number Format" including colours and conditions and thresholds - but is sounds like you are using that already. I've sometimes had problems with that but nothing common enough to remember specifics.

Alternatively, if the content is HTML then I have sometimes put warnings with HTML in the text for the label Before Show:

if (myvalue > 100) then   
     labelWarning.Text = "<font color='red'>Warning!</font>"   
 else  
    labelWarning.Text = "<font color='green'>Ok!</font>"  
  end if

And I've recently found more uses for the 'Attributes' to set things like colours - put an Attribute on the label and then in the 'Before Show' set the attribute like above, and put the attribute (showcolor) into a html tag around the label:

 $labelWarning->Attributes->SetValue('showcolor', 'red') 

I've used this with a <span> around the label, and used the attribute to set the class, and the class has the colours etc. Useful as I needed to have the same colours in multiple places, and less code output, and I can change the CSS once if needed.

Might help

Eric

_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message
anthonyzz

Posts: 19
Posted: 03/12/2014, 8:33 PM

I recently learned something about the label control:

http://www.kettic.com/winforms_ui/csharp_guide/panels_labels_label.shtml

And I think some guide on the label text format would do helps to you:

http://www.kettic.com/winforms_ui/csharp_guide/panels_l...xt_format.shtml


_________________
no more
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.