View Full Version : Label in Report


exon
07-09-2010, 12:05 AM
I have a report and at the end of the report I want to include a label (bank details).
If currency Euro to use label euro, if currency US$ to use label US and if currency Singapore Dollars to use SGD.
Any suggestion please?
Thanks in advance.

Trevor G
07-09-2010, 04:19 AM
You can use an IF statment in the report design and select to show the properties in the Detail Section select On Print Event

If me.FieldName.Value="USD" Then
me.LabelName.Visible=True
me.OtherLabelName.Visible=False
me.other1LabelName.Visible=False
ElseIF me.fieldname.Value="GSD" The
me.OtherLabelName.Visible=True
me.LabelName.Visible=False
me.Other1LabelName.Visible=False
Else
me.fieldname.Value="Some Other Currency" Then
me.Other1LabelName.Visible=True
me.LabelName.visible=False
me.OtherLAbelName.visible=False
End IF

exon
07-09-2010, 04:35 AM
You can use an IF statment in the report design and select to show the properties in the Detail Section select On Print Event

If me.FieldName.Value="USD" Then
me.LabelName.Visible=True
me.OtherLabelName.Visible=False
me.other1LabelName.Visible=False
ElseIF me.fieldname.Value="GSD" The
me.OtherLabelName.Visible=True
me.LabelName.Visible=False
me.Other1LabelName.Visible=False
Else
me.fieldname.Value="Some Other Currency" Then
me.Other1LabelName.Visible=True
me.LabelName.visible=False
me.OtherLAbelName.visible=False
End IF

Thank you for the reply.
Could you please explain me more above “Label”.
How to create the three different labels?

vbaInet
07-09-2010, 04:48 AM
You could also do this:
Me.EuroLabel.visible = iif(Me![FieldName] = "Euro", True, False)
Me.USLabel.visible = iif(Me![FieldName] = "US$", True, False)
Me.SingaporeLabel.visible = iif(Me![FieldName] = "Singapore Dollars", True, False)
I'm thinking this is a label that would be shown at the end of each statement so you put the code in the FORMAT event of the GROUP.

Create the three labels and align all of them at the same position, one on top of the other. Set their VISIBLE property to FALSE.

exon
07-09-2010, 04:53 AM
You could also do this:
Me.EuroLabel.visible = iif(Me![FieldName] = "Euro", True, False)
Me.USLabel.visible = iif(Me![FieldName] = "US$", True, False)
Me.SingaporeLabel.visible = iif(Me![FieldName] = "Singapore Dollars", True, False)
I'm thinking this is a label that would be shown at the end of each statement so you put the code in the FORMAT event of the GROUP.

Create the three labels and align all of them at the same position, one on top of the other. Set their VISIBLE property to FALSE.

Thank you. I'll try.
Have a nice week end.

Devcon

vbaInet
07-09-2010, 04:53 AM
Let us know how you get on.

Have a good weekend too ;)

exon
07-09-2010, 05:56 AM
Excellent working perfectly; thank you again for your help reply.
Have a nice weekend.

vbaInet
07-09-2010, 06:07 AM
Glad you got that working!