L
Lorenzo
Hello There,
I am trying to costumize the output of a report that has 5 subReports. What
I want to do is the following:
I am displaying cleaning services and I want to color with red whenever a
service comes on a Saturday .
In one of the subReports I have the follwoing code:
Dim MyDate As Date
Dim MyWeekDay As Integer
Dim lngRed As Long
lngRed = RGB(255, 0, 0)
MyDate = dteDataPulizia
MyWeekDay = Weekday(MyDate)
If MyWeekDay = 7 Then
dteDataPulizia.ForeColor = lngRed ' fields in the
subReport
Me.dteOrario.ForeColor = lngRed ' fields in the
subReport
Me.intNumeroPulizia.ForeColor = lngRed ' fields in the
subReport
Me.strDescrizione.ForeColor = lngRed ' fields in the
subReport
Me.strNote.ForeColor = lngRed ' fields in
the subReport
End If
Next
This is 1 of the 5 subReports that are all the same so the name of the
fileds doesn't change.
This works fine when I put the code on each subReport but what if I wanted
to do it from the mainReport that holds the subReports?
I know I have to access the collection (?) and go through each one of the
subReports maybe with a: for next.........next statement
but how is that actually to be done is far from my possibilities...any help
greatly appreciated
Ciao,
Lorenzo
I am trying to costumize the output of a report that has 5 subReports. What
I want to do is the following:
I am displaying cleaning services and I want to color with red whenever a
service comes on a Saturday .
In one of the subReports I have the follwoing code:
Dim MyDate As Date
Dim MyWeekDay As Integer
Dim lngRed As Long
lngRed = RGB(255, 0, 0)
MyDate = dteDataPulizia
MyWeekDay = Weekday(MyDate)
If MyWeekDay = 7 Then
dteDataPulizia.ForeColor = lngRed ' fields in the
subReport
Me.dteOrario.ForeColor = lngRed ' fields in the
subReport
Me.intNumeroPulizia.ForeColor = lngRed ' fields in the
subReport
Me.strDescrizione.ForeColor = lngRed ' fields in the
subReport
Me.strNote.ForeColor = lngRed ' fields in
the subReport
End If
Next
This is 1 of the 5 subReports that are all the same so the name of the
fileds doesn't change.
This works fine when I put the code on each subReport but what if I wanted
to do it from the mainReport that holds the subReports?
I know I have to access the collection (?) and go through each one of the
subReports maybe with a: for next.........next statement
but how is that actually to be done is far from my possibilities...any help
greatly appreciated
Ciao,
Lorenzo