BackColor in SubReport

  • Thread starter Thread starter Luis
  • Start date Start date
L

Luis

I need to change the color on a subReport for each record that is print
(displayed, showed). I tried the code below but does not fulfill the
requirement.

If Me.Baselined = "Y" Then
Reports!NeedDateScoreCard!NeedDateScoreCardDetail!!Investigate.Visible =
False
Me.Section("Detail").backColor = vbWhite
Else
Reports!NeedDateScoreCard!NeedDateScoreCardDetail!!Investigate.Visible = True
Me.Section("Detail").backColor = vbYellow
End If

Wonder if I can use something like the code below. However, I don't know how
to make it works! Suggestions please.

Reports!NeedDateScoreCard!NeedDateScoreCardDetail!!Section(0).backColor =
vbYellow

Thank you for guidance and collaboration solving this problem.

What is does is change the total section of the subReport based on the last
record read. Is there any suggestions to overcome this problem.
 
You should have code in the On Format event of the section you want to color.
In addition, the fields/values you want to reference must be bound to
controls in the section. Your code assumes Baseline is a text value/field.

Try something like:

If Me.Baselined = "Y" Then
Me.Investigate.Visible = False
Me.Section("Detail").backColor = vbWhite
Else
Me.Investigate.Visible = True
Me.Section("Detail").backColor = vbYellow
End If
 
Luis said:
I need to change the color on a subReport for each record that is print
(displayed, showed). I tried the code below but does not fulfill the
requirement.

If Me.Baselined = "Y" Then
Reports!NeedDateScoreCard!NeedDateScoreCardDetail!!Investigate.Visible =
False
Me.Section("Detail").backColor = vbWhite
Else
Reports!NeedDateScoreCard!NeedDateScoreCardDetail!!Investigate.Visible =
True
Me.Section("Detail").backColor = vbYellow
End If

Wonder if I can use something like the code below. However, I don't know
how
to make it works! Suggestions please.

Reports!NeedDateScoreCard!NeedDateScoreCardDetail!!Section(0).backColor =
vbYellow

Thank you for guidance and collaboration solving this problem.

What is does is change the total section of the subReport based on the
last
record read. Is there any suggestions to overcome this problem.
 
Luis said:
I need to change the color on a subReport for each record that is print
(displayed, showed). I tried the code below but does not fulfill the
requirement.

If Me.Baselined = "Y" Then
Reports!NeedDateScoreCard!NeedDateScoreCardDetail!!Investigate.Visible =
False
Me.Section("Detail").backColor = vbWhite
Else
Reports!NeedDateScoreCard!NeedDateScoreCardDetail!!Investigate.Visible =
True
Me.Section("Detail").backColor = vbYellow
End If

Wonder if I can use something like the code below. However, I don't know
how
to make it works! Suggestions please.

Reports!NeedDateScoreCard!NeedDateScoreCardDetail!!Section(0).backColor =
vbYellow

Thank you for guidance and collaboration solving this problem.

What is does is change the total section of the subReport based on the
last
record read. Is there any suggestions to overcome this problem.
 
Luis said:
I need to change the color on a subReport for each record that is print
(displayed, showed). I tried the code below but does not fulfill the
requirement.

If Me.Baselined = "Y" Then
Reports!NeedDateScoreCard!NeedDateScoreCardDetail!!Investigate.Visible =
False
Me.Section("Detail").backColor = vbWhite
Else
Reports!NeedDateScoreCard!NeedDateScoreCardDetail!!Investigate.Visible =
True
Me.Section("Detail").backColor = vbYellow
End If

Wonder if I can use something like the code below. However, I don't know
how
to make it works! Suggestions please.

Reports!NeedDateScoreCard!NeedDateScoreCardDetail!!Section(0).backColor =
vbYellow

Thank you for guidance and collaboration solving this problem.

What is does is change the total section of the subReport based on the
last
record read. Is there any suggestions to overcome this problem.
 
Luis said:
I need to change the color on a subReport for each record that is print
(displayed, showed). I tried the code below but does not fulfill the
requirement.

If Me.Baselined = "Y" Then
Reports!NeedDateScoreCard!NeedDateScoreCardDetail!!Investigate.Visible =
False
Me.Section("Detail").backColor = vbWhite
Else
Reports!NeedDateScoreCard!NeedDateScoreCardDetail!!Investigate.Visible =
True
Me.Section("Detail").backColor = vbYellow
End If

Wonder if I can use something like the code below. However, I don't know
how
to make it works! Suggestions please.

Reports!NeedDateScoreCard!NeedDateScoreCardDetail!!Section(0).backColor =
vbYellow

Thank you for guidance and collaboration solving this problem.

What is does is change the total section of the subReport based on the
last
record read. Is there any suggestions to overcome this problem.
 
Back
Top