Showing posts with label highlighting. Show all posts
Showing posts with label highlighting. Show all posts

Friday, March 23, 2012

Highlighting in tables.

I would like to highlight every other line in a table to enhance readability. Is there an easy way to do this? If so, how?

TIAHi Tia,

I just started writing custom code today - so naturally I think it can solve all problems!

I'm thinking you may be able to write custom code to set the table row's background
property based on if it is an "even" or "odd" row. I looked around and there doesn't
seem to be an easy way like we have on ASP.Net grid controls. Has anyone
done something like this using custom code?

Jane|||actually I thgt abt it for a while and its not very complicated. in your properties tab for that textbox or for the row, click on the color property and click on "Expressions" and you can write an expression over there like a regular one

 IIF(Fields!yourval.value <10, " Red", "Blue")

hth|||Dinakar,

Thanks! the expression I finally chose was:

=iif(RowNumber(Nothing) Mod 2, "WhiteSmoke", "White")

set on the row level properties tab in BackgroundColor. This highlights every other row of my table, making it easier to read.

Regards,

Daniel|||

chanbe backgound property of the table as =iif(((rownumber("table1") mod 2)=0),"White","#FFEBBD")

here "table1" is ur table name

sql

highlighting a table row

Have generated a report that uses a table. In the table are 2 fields, the
first is a severity and the last is the timeOfResponse which is a numeric. I
would like to highlight a row if the combination of severity and
timeOfResponse exceeds a maximum. Is this possible for a table? If not, in
a matrix?
The function would be like
iif( (fields!severity = 1 and timeOfResponse > 900),"pink",nothing)In the properties window, put your IIF statement under background color. So
it would be something like
= iif( (fields!severity = 1 and timeOfResponse > 900),"pink","transparent")
"Glass" wrote:
> Have generated a report that uses a table. In the table are 2 fields, the
> first is a severity and the last is the timeOfResponse which is a numeric. I
> would like to highlight a row if the combination of severity and
> timeOfResponse exceeds a maximum. Is this possible for a table? If not, in
> a matrix?
> The function would be like
> iif( (fields!severity = 1 and timeOfResponse > 900),"pink",nothing)|||scraejtp:
I actually have this in the background color property and it colors all rows
of the table pink.
= iif( (fields!timeOfResponse > 900),"pink","transparent")
A warning is also issued:
Value of the background color property for the textbox 'timeOfResponse' is
"transparent", which is not a valid background color.
I tried changing "transparent" to "blue". No warnings but all rows returned
pink.
Glass
"scraejtp" wrote:
> In the properties window, put your IIF statement under background color. So
> it would be something like
> = iif( (fields!severity = 1 and timeOfResponse > 900),"pink","transparent")
> "Glass" wrote:
> > Have generated a report that uses a table. In the table are 2 fields, the
> > first is a severity and the last is the timeOfResponse which is a numeric. I
> > would like to highlight a row if the combination of severity and
> > timeOfResponse exceeds a maximum. Is this possible for a table? If not, in
> > a matrix?
> >
> > The function would be like
> > iif( (fields!severity = 1 and timeOfResponse > 900),"pink",nothing)|||Okay... problem solved. Have placed the expression under the background
properties for 'tablerow'. Also, discovered that cannot use 'transparent' or
'nothing' so used 'white'.
"Glass" wrote:
> scraejtp:
> I actually have this in the background color property and it colors all rows
> of the table pink.
> = iif( (fields!timeOfResponse > 900),"pink","transparent")
> A warning is also issued:
> Value of the background color property for the textbox 'timeOfResponse' is
> "transparent", which is not a valid background color.
> I tried changing "transparent" to "blue". No warnings but all rows returned
> pink.
> Glass
> "scraejtp" wrote:
> > In the properties window, put your IIF statement under background color. So
> > it would be something like
> > = iif( (fields!severity = 1 and timeOfResponse > 900),"pink","transparent")
> >
> > "Glass" wrote:
> >
> > > Have generated a report that uses a table. In the table are 2 fields, the
> > > first is a severity and the last is the timeOfResponse which is a numeric. I
> > > would like to highlight a row if the combination of severity and
> > > timeOfResponse exceeds a maximum. Is this possible for a table? If not, in
> > > a matrix?
> > >
> > > The function would be like
> > > iif( (fields!severity = 1 and timeOfResponse > 900),"pink",nothing)|||Yeah, I thought you were already under table row, or an individual cell.
That is weird that it will not allow transparent because that looks to be
the default background for mine.
"Glass" wrote:
> Okay... problem solved. Have placed the expression under the background
> properties for 'tablerow'. Also, discovered that cannot use 'transparent' or
> 'nothing' so used 'white'.
>
> "Glass" wrote:
> > scraejtp:
> >
> > I actually have this in the background color property and it colors all rows
> > of the table pink.
> >
> > = iif( (fields!timeOfResponse > 900),"pink","transparent")
> >
> > A warning is also issued:
> >
> > Value of the background color property for the textbox 'timeOfResponse' is
> > "transparent", which is not a valid background color.
> >
> > I tried changing "transparent" to "blue". No warnings but all rows returned
> > pink.
> >
> > Glass
> >
> > "scraejtp" wrote:
> >
> > > In the properties window, put your IIF statement under background color. So
> > > it would be something like
> > > = iif( (fields!severity = 1 and timeOfResponse > 900),"pink","transparent")
> > >
> > > "Glass" wrote:
> > >
> > > > Have generated a report that uses a table. In the table are 2 fields, the
> > > > first is a severity and the last is the timeOfResponse which is a numeric. I
> > > > would like to highlight a row if the combination of severity and
> > > > timeOfResponse exceeds a maximum. Is this possible for a table? If not, in
> > > > a matrix?
> > > >
> > > > The function would be like
> > > > iif( (fields!severity = 1 and timeOfResponse > 900),"pink",nothing)

Highlighting a row

Hi,
While previewing the report, Is there any way to highlight the selected row as we do in SpreadSheets (Like Excel)?
I need to hightlight the row which was selected by the user and not a particular row.
If you have any idea, pls help me
ThanksHi,

Yes, it's possible in RDC Method of Crystal Report Design Document Module.

you can catch the table.field click event at run time, in that event make code for change the field background color.

Thanks.

Originally posted by harmonycitra
Hi,

While previewing the report, Is there any way to highlight the selected row as we do in SpreadSheets (Like Excel)?

I need to hightlight the row which was selected by the user and not a particular row.

If you have any idea, pls help me

Thanks|||Thanks,

But I'm using ASP to run my report, using RDC Code and Crystal Report ActiveXViewer Control to display the report.

In this, how can I write the code?

Thanks,