Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Font in Row on Condition 1

Status
Not open for further replies.

paulcook

MIS
May 28, 2003
22
CA
I need to modify a report so that the font on rows that meet certain conditions is bold italic. I need to use this in combination with a highlight that I created with the section expert that highlights on another condition.

This is what I am thinking of for the bold italic

If {wia_actvy.wia_cmpltn_cd} < '1'
And {wia_actvy.end_dt} > (CurrentDate - 14 days(?))
And {wia_actvy.end_dt} < CurrentDate
Then crBold

Basically I have a report that shows clients that have activities in the system. The report shows the start date, end date and completion code. I need the row higlighted if the end date is within the next two weeks of the date the report is run. If the end date has already past I want the row highlighted and the text to be bold italic.

I know that I can set a condition on the font of a single field but I would like to know how to set a similar condition on the whole row instead of formatting each field independently.

I am using CR 8.5 and starting to use CR 9. If one works better or easier I will use that one.

TIA,

Paul

P.S.
Is there anywhere in CR8.5 or 9 that one can just type all of these conditions in instead of using all of these &quot;experts&quot; which I find a little confusing? I forget which one of the 20 places I have made changes.
 
Try:

If {wia_actvy.wia_cmpltn_cd} < &quot;1&quot;
And {wia_actvy.end_dt} > CurrentDate - 14
And {wia_actvy.end_dt} < CurrentDate Then
crBold

Though your post didn't say anything about unless it's mroe than 14 days past. Note also that this string '1' compare is not the same as a numeric 1.

-k
 
synapsevampire,

Thanks for the reply.

Do I just have to apply this same formula to each field that I want to have the formatting when the end_dt field meets the condition? I know in the Section Expert I can change the background color on conditions set forth in a formula.

Is it possible to apply more than one format?

If {wia_actvy.wia_cmpltn_cd} < &quot;1&quot;
And {wia_actvy.end_dt} > CurrentDate - 14
And {wia_actvy.end_dt} < CurrentDate Then
crBold, crItalic

I thought that I could use

Then True

and then apply the Bold Italic style from the dropdown on the Font tab in the Format Editor but I get an error in the Formula Editor that says &quot;The formula result must be a number.&quot;
 
Nevermind! I was messing around and entered this formula below and received the results which I was wanting.

If isnull({wia_actvy.wia_cmpltn_cd})
And {wia_actvy.end_dt} - 90 < CurrentDate
And {wia_actvy.end_dt} > CurrentDate
Then 5

This caused the formatting in the dropdown to be applied.

Though I have not tried I assume the formula would work with any number following the Then statement.

Thanks for the help synapsevampire!

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top