Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula does not work

Status
Not open for further replies.
Aug 27, 2003
428
US
Hi,
I am using Crystal 9.0 embedded in VB.Net. I want to get the Address as Below

X Systems Management
123 Main Street
New York, 10005, USA

I have the stored proc returning the following columns

Address1 stores the first line above
Address2 stored the second line above
Address3 stores the third line above
Country stores the value USA

Stored procedure returns the columns with value fine. Report in View Data returns all teh columns and values.

The report has a formula @AddressInformation in teh page header as a text object. It can return only two lines at a time.

For instance if I have all the below in the formula and database resultset
Address1, Address2,Address3 adn Country, report only shows Address3 and Country value which is line 3 above.

New York, 10005, USA

I tried having just Address1 and Address2 in the stored procedure resultset as well as in the formula. The report showed Address1 and Address2.

X Systems Management
123 Main Street

But when I added Address3 to the resultset as well as formula, report output displays just Address3 value . Address1 and Address2 are not displayed.

New York, 10005, USA


I made sure that in the text object can grow is checked. I also made sure to reduce the font size. This did not help.

Is it because of the page header? Do I need to add three group sections for each of Address1, Address2 and Address3?

Any help is appreciated.

Below is formula:

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 = {Detail.Address3} + chr(13)
end if

if ISNULL({Detail.CityStateZip}) = False and {Detail.CityStateZip} <> "" then
result = result + {Detail.CityStateZip} + chr(13)
end if

if ISNULL({Detail.Country}) = False and {Detail.Country} <> "" then
result = result + {Detail.Country} + chr(13)
end if

formula = result


Thanks,
junction123


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top