replyrpatil
Programmer
I need to compare two image reports side by side and if there is a change I need to indicate if there is change or no change.
Main report has two sub report (rptPIactiveImages and rptPIInProcessImages )
rptPIactiveImages has following filed name (All the four have height set to zero.)
1) FiledName
2) Filed Image ( which is besides the filed name and the Image is named as “IMfiledName”)
3) Image Change NoChange ( Which is besides the Filed Image that puts a greenArrow image for no change and redarrow image for change) this filed is named as “IMCfiledName”
4) Push Field --- Because I cannot set the Image to Can Grow and Can Shrink , I have put a filed beside the IMCfiledName , if there is a image I am changing the its value that will push the next image down. This filed has Can Grow value set to true. This is named as “exFiledName”
rptPIInProcessImages is copy paste of the rptPIactiveImages and later I have deleted “Image Change NoChange” filed.
rptPIactiveImages and rptPIInProcessImages is pulling information from two different query based on same table with different filter criteria ( One filters the ACTIVE information and other filters INPROCESS information)
What I am doing is just comparing these Image values and showing them side by side .
The following code works fine for me but the problem is that I have about 37 different filed values that I need to compare and I do not want to Copy Paste the same code 37 time just changing the filed values.
I WANT TO CONVER THIS CODE IN A MODULE AND CALL IT LIKE
Call VerifyIMGChange (CASETIF)
Call VerifyIMGChange (DATATIF)
Etc……………………………..
If Nz(Me.rptPIactiveImages.Report.CASETIF, "") <> "" Or Nz(Me.rptPIInProcessImages.Report.CASETIF, "") <> "" Then
If Nz(Me.rptPIactiveImages.Report.CASETIF, "") <> "" Then
s1 = Me.rptPIactiveImages.Report.CASETIF
Else
s1 = "notanimage"
End If
If Nz(Me.rptPIInProcessImages.Report.CASETIF, "") <> "" Then
s2 = Me.rptPIInProcessImages.Report.CASETIF
Else
s2 = "notanimage"
End If
img1 = Right([s1], 4)
img2 = Right([s2], 4)
If img1 = ".TIF" Or img2 = ".TIF" Then
Me.rptPIactiveImages.Report.ImCASETIF.Picture = "(none)"
Me.rptPIactiveImages.Report.ImcCASETIF.Picture = "(none)"
Me.rptPIInProcessImages.Report.ImCASETIF.Picture = "(none)"
Me.rptPIactiveImages.Report.CASETIF.Visible = True
Me.rptPIactiveImages.Report.ImCASETIF.Visible = True
Me.rptPIactiveImages.Report.ImcCASETIF.Visible = True
Me.rptPIactiveImages.Report.exCASETIF.Visible = True
Me.rptPIInProcessImages.Report.CASETIF.Visible = True
Me.rptPIInProcessImages.Report.ImCASETIF.Visible = True
Me.rptPIInProcessImages.Report.exCASETIF.Visible = True
Me.rptPIactiveImages.Report.ImCASETIF.Height = 2800
Me.rptPIactiveImages.Report.ImCASETIF.Width = 3550
Me.rptPIactiveImages.Report.ImcCASETIF.Height = 2800
Me.rptPIactiveImages.Report.ImcCASETIF.Width = 1200
Me.rptPIInProcessImages.Report.ImCASETIF.Height = 2800
Me.rptPIInProcessImages.Report.ImCASETIF.Width = 3550
Me.rptPIactiveImages.Report.exCASETIF = "VVVVVVVVVVVVV"
Me.rptPIInProcessImages.Report.exCASETIF = "VVVVVVVVVVVVV"
If img1 = ".TIF" Then
Me.rptPIactiveImages.Report.[ImCASETIF].Picture = ImagePath & Me.rptPIactiveImages.Report.CASETIF
Else
Me.rptPIactiveImages.Report.ImCASETIF.Picture = ImagePath & "NoImageAvailable.tif"
End If
If img2 = ".TIF" Then
Me.rptPIInProcessImages.Report.[ImCASETIF].Picture = ImagePath & Me.rptPIInProcessImages.Report.CASETIF
Else
Me.rptPIInProcessImages.Report.ImCASETIF.Picture = ImagePath & "NoImageAvailable.tif"
End If
If Me.rptPIactiveImages.Report.CASETIF = Me.rptPIInProcessImages.Report.CASETIF Then
Me.rptPIactiveImages.Report.[ImcCASETIF].Picture = ImagePath & "GreenArrow.bmp"
Else
Me.rptPIactiveImages.Report.[ImcCASETIF].Picture = ImagePath & "redarrow.bmp"
End If
Else
Me.rptPIactiveImages.Report.ImCASETIF.Picture = "(none)"
Me.rptPIactiveImages.Report.ImcCASETIF.Picture = "(none)"
Me.rptPIInProcessImages.Report.ImCASETIF.Picture = "(none)"
Me.rptPIactiveImages.Report.CASETIF.Visible = False
Me.rptPIactiveImages.Report.ImCASETIF.Visible = False
Me.rptPIactiveImages.Report.ImcCASETIF.Visible = False
Me.rptPIactiveImages.Report.exCASETIF.Visible = False
Me.rptPIInProcessImages.Report.CASETIF.Visible = False
Me.rptPIInProcessImages.Report.ImCASETIF.Visible = False
Me.rptPIInProcessImages.Report.exCASETIF.Visible = False
End If
Else
Me.rptPIactiveImages.Report.ImCASETIF.Picture = "(none)"
Me.rptPIactiveImages.Report.ImcCASETIF.Picture = "(none)"
Me.rptPIInProcessImages.Report.ImCASETIF.Picture = "(none)"
Me.rptPIactiveImages.Report.CASETIF.Visible = False
Me.rptPIactiveImages.Report.ImCASETIF.Visible = False
Me.rptPIactiveImages.Report.ImcCASETIF.Visible = False
Me.rptPIactiveImages.Report.exCASETIF.Visible = False
Me.rptPIInProcessImages.Report.CASETIF.Visible = False
Me.rptPIInProcessImages.Report.ImCASETIF.Visible = False
Me.rptPIInProcessImages.Report.exCASETIF.Visible = False
End If
Main report has two sub report (rptPIactiveImages and rptPIInProcessImages )
rptPIactiveImages has following filed name (All the four have height set to zero.)
1) FiledName
2) Filed Image ( which is besides the filed name and the Image is named as “IMfiledName”)
3) Image Change NoChange ( Which is besides the Filed Image that puts a greenArrow image for no change and redarrow image for change) this filed is named as “IMCfiledName”
4) Push Field --- Because I cannot set the Image to Can Grow and Can Shrink , I have put a filed beside the IMCfiledName , if there is a image I am changing the its value that will push the next image down. This filed has Can Grow value set to true. This is named as “exFiledName”
rptPIInProcessImages is copy paste of the rptPIactiveImages and later I have deleted “Image Change NoChange” filed.
rptPIactiveImages and rptPIInProcessImages is pulling information from two different query based on same table with different filter criteria ( One filters the ACTIVE information and other filters INPROCESS information)
What I am doing is just comparing these Image values and showing them side by side .
The following code works fine for me but the problem is that I have about 37 different filed values that I need to compare and I do not want to Copy Paste the same code 37 time just changing the filed values.
I WANT TO CONVER THIS CODE IN A MODULE AND CALL IT LIKE
Call VerifyIMGChange (CASETIF)
Call VerifyIMGChange (DATATIF)
Etc……………………………..
If Nz(Me.rptPIactiveImages.Report.CASETIF, "") <> "" Or Nz(Me.rptPIInProcessImages.Report.CASETIF, "") <> "" Then
If Nz(Me.rptPIactiveImages.Report.CASETIF, "") <> "" Then
s1 = Me.rptPIactiveImages.Report.CASETIF
Else
s1 = "notanimage"
End If
If Nz(Me.rptPIInProcessImages.Report.CASETIF, "") <> "" Then
s2 = Me.rptPIInProcessImages.Report.CASETIF
Else
s2 = "notanimage"
End If
img1 = Right([s1], 4)
img2 = Right([s2], 4)
If img1 = ".TIF" Or img2 = ".TIF" Then
Me.rptPIactiveImages.Report.ImCASETIF.Picture = "(none)"
Me.rptPIactiveImages.Report.ImcCASETIF.Picture = "(none)"
Me.rptPIInProcessImages.Report.ImCASETIF.Picture = "(none)"
Me.rptPIactiveImages.Report.CASETIF.Visible = True
Me.rptPIactiveImages.Report.ImCASETIF.Visible = True
Me.rptPIactiveImages.Report.ImcCASETIF.Visible = True
Me.rptPIactiveImages.Report.exCASETIF.Visible = True
Me.rptPIInProcessImages.Report.CASETIF.Visible = True
Me.rptPIInProcessImages.Report.ImCASETIF.Visible = True
Me.rptPIInProcessImages.Report.exCASETIF.Visible = True
Me.rptPIactiveImages.Report.ImCASETIF.Height = 2800
Me.rptPIactiveImages.Report.ImCASETIF.Width = 3550
Me.rptPIactiveImages.Report.ImcCASETIF.Height = 2800
Me.rptPIactiveImages.Report.ImcCASETIF.Width = 1200
Me.rptPIInProcessImages.Report.ImCASETIF.Height = 2800
Me.rptPIInProcessImages.Report.ImCASETIF.Width = 3550
Me.rptPIactiveImages.Report.exCASETIF = "VVVVVVVVVVVVV"
Me.rptPIInProcessImages.Report.exCASETIF = "VVVVVVVVVVVVV"
If img1 = ".TIF" Then
Me.rptPIactiveImages.Report.[ImCASETIF].Picture = ImagePath & Me.rptPIactiveImages.Report.CASETIF
Else
Me.rptPIactiveImages.Report.ImCASETIF.Picture = ImagePath & "NoImageAvailable.tif"
End If
If img2 = ".TIF" Then
Me.rptPIInProcessImages.Report.[ImCASETIF].Picture = ImagePath & Me.rptPIInProcessImages.Report.CASETIF
Else
Me.rptPIInProcessImages.Report.ImCASETIF.Picture = ImagePath & "NoImageAvailable.tif"
End If
If Me.rptPIactiveImages.Report.CASETIF = Me.rptPIInProcessImages.Report.CASETIF Then
Me.rptPIactiveImages.Report.[ImcCASETIF].Picture = ImagePath & "GreenArrow.bmp"
Else
Me.rptPIactiveImages.Report.[ImcCASETIF].Picture = ImagePath & "redarrow.bmp"
End If
Else
Me.rptPIactiveImages.Report.ImCASETIF.Picture = "(none)"
Me.rptPIactiveImages.Report.ImcCASETIF.Picture = "(none)"
Me.rptPIInProcessImages.Report.ImCASETIF.Picture = "(none)"
Me.rptPIactiveImages.Report.CASETIF.Visible = False
Me.rptPIactiveImages.Report.ImCASETIF.Visible = False
Me.rptPIactiveImages.Report.ImcCASETIF.Visible = False
Me.rptPIactiveImages.Report.exCASETIF.Visible = False
Me.rptPIInProcessImages.Report.CASETIF.Visible = False
Me.rptPIInProcessImages.Report.ImCASETIF.Visible = False
Me.rptPIInProcessImages.Report.exCASETIF.Visible = False
End If
Else
Me.rptPIactiveImages.Report.ImCASETIF.Picture = "(none)"
Me.rptPIactiveImages.Report.ImcCASETIF.Picture = "(none)"
Me.rptPIInProcessImages.Report.ImCASETIF.Picture = "(none)"
Me.rptPIactiveImages.Report.CASETIF.Visible = False
Me.rptPIactiveImages.Report.ImCASETIF.Visible = False
Me.rptPIactiveImages.Report.ImcCASETIF.Visible = False
Me.rptPIactiveImages.Report.exCASETIF.Visible = False
Me.rptPIInProcessImages.Report.CASETIF.Visible = False
Me.rptPIInProcessImages.Report.ImCASETIF.Visible = False
Me.rptPIInProcessImages.Report.exCASETIF.Visible = False
End If