CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

  value to date field before show

Print topic Send  topic

Author Message
henrikn

Posts: 9
Posted: 06/20/2004, 8:09 AM


Only 3 days left of our trial-



I have a problem with his code used in event before show:

If tasks.task_finish_date.Value < now() Then
tasks.task_finish_date.Value = "<b><font color=""red"">" & tasks.task_finish_date.Value & "</font></b>"
End if

I catch the right records but the fields are blank instead of bold and red
what am I dooing wrong?

Henrik


View profile  Send private message
peterr


Posts: 5971
Posted: 06/20/2004, 12:11 PM

Hi,

I couldn't find this section in the tutorial, so the question is if the regular tutorial works for you? For example: http://docs.codecharge.com/studio/html/QuickStart/EnhAp...FieldValue.html ?
And what happens if you don't apply the blue color to the date? Can you see the dates in standard color?
And, have you applied step 6 from http://docs.codecharge.com/studio/html/QuickStart/EnhAp...rTextColor.html to your date field?
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Henrik Nielsen
Posted: 06/21/2004, 12:43 AM

yes - we try to test a bit further than the tutorial - It is easy to assign red to all columns bigger or smaller than task_finsh_date.

The problem occurs when we try to apply font attributes to the task_finish_date
tasks.task_finish_date.Value = "<b><font color=""red"">" & tasks.task_finish_date.Value & "</font></b>"

in the above case the chosen fields just blanks, where the code below
works fine and we get the nice red status_id (status_name)

If tasks.task_finish_date.Value < now() Then
tasks.status_id.Value = "<b><font color=""red"">" & tasks.status_id.Value & "</font></b>"
End if

Henrik
henrikn

Posts: 9
Posted: 06/21/2004, 12:54 AM

maybee a look here can help:
http://helpdeskacademy.com/helpdesk2/Default.asp
View profile  Send private message
peterr


Posts: 5971
Posted: 06/21/2004, 1:35 AM

I think that this doesn't work because the "Date" type field must contain the date. Once you change it's value then it is no longer the date and becomes a string or text. Therefore please change "Date Type" property of that field to "Text". The only problem then could be that then you would also be responsible for formatting this text in the date format that you want to use.
Alternatively, you could place a new Label in front of your Date label and then mainpulate that other Label, for example:
If (something) then tasks.Label1.Value = "<font color=""red"">" Else tasks.Label1.Value = "<font>"
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
henrikn

Posts: 9
Posted: 06/21/2004, 2:32 AM

tx for helping.
the field is changed to text - and I'm sure the problem has something to do with the date format - unfortunately I couldn't make your last solution work.
I'm stuck-
maybee- someone else has tried this and got a solution?
Henrikn
View profile  Send private message
peterr


Posts: 5971
Posted: 06/21/2004, 10:50 AM

I tried both of these solutions and both worked OK for me.
So, what happens if you set the "Date Type" to "Text"?
And what happens when you use the 2nd solution? What is the problem?
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
E43509

Posts: 283
Posted: 06/24/2004, 6:33 PM

When you are using cascading style sheets, those styles override your font attributes. create a style or class instead and programmatically set it
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.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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