junction123
MIS
Hi,
I am using Crystal Reports with VB Dot Net. I would like to add a confition to page break the report when the value for the formula @AddressInformation is different.
For example if the formula is as below: When any of the values of Address1, Address2, Address3 and Country are different, I need to show the report detail data in a separate page rather than showing all in the same page.
As an illustration if the address for all Titles is the same as below
123 Main Street
New York, NY
United States
ID Name Title
1 John ABC
2 Frank XYZ
3 Josh ABC
As an illustration if the address for a Title is different as below, then the page should break.
For Title ABC below address
123 Main Street
New York, NY
United States
For Title 123 below address
123 Canada St
London,
United Kingdom
Page 1
ID Name Title
1 John ABC
3 Josh ABC
Page 2
ID Name Title
2 Frank XYZ
Dim result as String
if ISNULL({Detail.Address1}) = False and {Detail.Address1} <> "" then
result = result + {Detail.Address1} + chr(13)
end if
if ISNULL({Detail.Address2}) = False and {Detail.Address2} <> "" then
result = result + {Detail.Address2} + chr(13)
end if
if ISNULL({Detail.Address3}) = False and {Detail.Address3} <> "" then
result = result + {Detail.Address3} + chr(13)
end if
if ISNULL({Detail.Country}) = False and {Detail.Country} <> "" then
result = result + {Detail.Country} + chr(13)
end if
formula = result
Thanks in advance for your help
junction123
I am using Crystal Reports with VB Dot Net. I would like to add a confition to page break the report when the value for the formula @AddressInformation is different.
For example if the formula is as below: When any of the values of Address1, Address2, Address3 and Country are different, I need to show the report detail data in a separate page rather than showing all in the same page.
As an illustration if the address for all Titles is the same as below
123 Main Street
New York, NY
United States
ID Name Title
1 John ABC
2 Frank XYZ
3 Josh ABC
As an illustration if the address for a Title is different as below, then the page should break.
For Title ABC below address
123 Main Street
New York, NY
United States
For Title 123 below address
123 Canada St
London,
United Kingdom
Page 1
ID Name Title
1 John ABC
3 Josh ABC
Page 2
ID Name Title
2 Frank XYZ
Dim result as String
if ISNULL({Detail.Address1}) = False and {Detail.Address1} <> "" then
result = result + {Detail.Address1} + chr(13)
end if
if ISNULL({Detail.Address2}) = False and {Detail.Address2} <> "" then
result = result + {Detail.Address2} + chr(13)
end if
if ISNULL({Detail.Address3}) = False and {Detail.Address3} <> "" then
result = result + {Detail.Address3} + chr(13)
end if
if ISNULL({Detail.Country}) = False and {Detail.Country} <> "" then
result = result + {Detail.Country} + chr(13)
end if
formula = result
Thanks in advance for your help
junction123