INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Microsoft Dynamics SL report edit in Crystal reports 2008

Microsoft Dynamics SL report edit in Crystal reports 2008

(OP)
Let me start by saying I am very green!! I took a 2 day beginner course in crystal reports via webinar. Now I am the company expert.....

I have a report that basically creates an invoice that was created by a long gone employee. The company is actually 3 companies with mutiple sites; 2 of these companies have a single billing address each easy peasy works great. The 3rd company has 2 billing addresses dependent upon the site. They now want the invoices to reflect this change. Right now it is using this code: which works but just 1 billing address per company.

// Don't show Country when in US.
//StringVar Address;

//If ToNumber(ADGclsADGCryFunctionsSOSetup ("PrtCpny")) = 1 Then
// Address := AddressLine1( ADGclsADGCryFunctionsSOSetup("Addr1"), ADGclsADGCryFunctionsSOSetup("Addr2") ,ADGclsADGCryFunctionsSOSetup("City") ,ADGclsADGCryFunctionsSOSetup("State") ,ADGclsADGCryFunctionsSOSetup("Zip") ,ADGclsADGCryFunctionsSOSetup("Country") );
// If Trim(Address) <> "US" and Trim(Address) <> "USA" then
// Address
//Else
// ""

If {SOShipHeader.CpnyID} = 'MDC' then
'P.O. Box 639'
Else



If {SOShipHeader.CpnyID} = 'RKY' then
'13027 County Rd. 18'
Else

If {SOShipHeader.CpnyID} = 'WST' then
'4975 W. Winnemucca Blvd.'
Else


""

So following the same logic I tried this and The report is blank and I am sad.
// Don't show Country when in US.
//StringVar Address;

//If ToNumber(ADGclsADGCryFunctionsSOSetup ("PrtCpny")) = 1 Then
// Address := AddressLine1( ADGclsADGCryFunctionsSOSetup("Addr1"), ADGclsADGCryFunctionsSOSetup("Addr2") ,ADGclsADGCryFunctionsSOSetup("City") ,ADGclsADGCryFunctionsSOSetup("State") ,ADGclsADGCryFunctionsSOSetup("Zip") ,ADGclsADGCryFunctionsSOSetup("Country") );
// If Trim(Address) <> "US" and Trim(Address) <> "USA" then
// Address
//Else
// ""

If{SOShipHeader.CpnyID}='MDC'and{SOShipHeader.SiteID}='MDCDALGNRL'then
'P.O. Box 784'
Else

If{SOShipHeader.CpnyID}='MDC'and{SOShipHeader.SiteID}='MDCHERGNRL'then
'P.O. Box 784'
Else

If{SOShipHeader.CpnyID}='MDC'and{SOShipHeader.SiteID}='MDCSUNGNRL'then
'P.O. Box 784'
Else

If {SOShipHeader.CpnyID} = 'MDC' then
'P.O. Box 639'
Else

If {SOShipHeader.CpnyID} = 'RKY' then
'13027 County Rd. 18'
Else

If {SOShipHeader.CpnyID} = 'WST' then
'4975 W. Winnemucca Blvd.'
Else


""

I then try the below with the same result.

// Don't show Country when in US.
//StringVar Address;

//If ToNumber(ADGclsADGCryFunctionsSOSetup ("PrtCpny")) = 1 Then
// Address := AddressLine1( ADGclsADGCryFunctionsSOSetup("Addr1"), ADGclsADGCryFunctionsSOSetup("Addr2") ,ADGclsADGCryFunctionsSOSetup("City") ,ADGclsADGCryFunctionsSOSetup("State") ,ADGclsADGCryFunctionsSOSetup("Zip") ,ADGclsADGCryFunctionsSOSetup("Country") );
// If Trim(Address) <> "US" and Trim(Address) <> "USA" then
// Address
//Else
// ""
if {SOShipHeader.SiteID} = 'MDCGCKLCAG' then 'P.O. Box 639'; if {SOShipHeader.SiteID} = 'MDCGCKSHOP' then 'P.O. Box 639'; if {SOShipHeader.SiteID} = 'MDCGCKTRUK' then 'P.O. Box 639';
if {SOShipHeader.SiteID} = 'MDCGCKUCAG' then 'P.O. Box 639';if {SOShipHeader.SiteID} = 'MDCGCKYRDC' then 'P.O. Box 639'; if {SOShipHeader.SiteID} = 'MDCGCKYRDE' then 'P.O. Box 639';
if {SOShipHeader.SiteID} = 'MDCGCKYRDW' then 'P.O. Box 639'; if {SOShipHeader.SiteID} = 'MDCHCMGNRL' then 'P.O. Box 639';
if {SOShipHeader.SiteID} = 'MDCDALGNRL' then 'P.O. Box 784'; if {SOShipHeader.SiteID} = 'MDCHERGNRL' then 'P.O. Box 784'; if {SOShipHeader.SiteID} = 'MDCSUNGNRL' then 'P.O. Box 784';
if {SOShipHeader.SiteID} = 'WSTRENGRL' then '4975 W. Winnemucca Blvd.'; if {SOShipHeader.SiteID} = 'WSTWINGRL' then '4975 W. Winnemucca Blvd.'; if {SOShipHeader.SiteID} = 'WSTBFLGNRL' then '4975 W. Winnemucca Blvd.';
if {SOShipHeader.SiteID} = 'RKYFTLDRLS' then '13027 County Rd. 18'; if {SOShipHeader.SiteID} = 'RKYFTLFLDS' then '13027 County Rd. 18';
if {SOShipHeader.SiteID} = 'RKYFTLSHOP' then '13027 County Rd. 18'; if {SOShipHeader.SiteID} = 'RKYFTLYARD' then '13027 County Rd. 18';if {SOShipHeader.SiteID} = 'RKYFTLYRDN' then '13027 County Rd. 18';
if {SOShipHeader.SiteID} = 'RKYFTLYRDS' then '13027 County Rd. 18' else
""

RE: Microsoft Dynamics SL report edit in Crystal reports 2008

If{SOShipHeader.CpnyID}='MDC'and{SOShipHeader.SiteID}='MDC*' then
'P.O. Box 784'
Else
If {SOShipHeader.CpnyID} LIKE 'MDC*' then
'P.O. Box 639'
Else
If {SOShipHeader.CpnyID} LIKE 'RKY*' then
'13027 County Rd. 18'
Else
If {SOShipHeader.CpnyID} LIKE 'WST*' then
'4975 W. Winnemucca Blvd.'
Else
""

RE: Microsoft Dynamics SL report edit in Crystal reports 2008

CORRECTION


If{SOShipHeader.CpnyID}='MDC'and{SOShipHeader.SiteID}='MDCDALGNRL'then
'P.O. Box 784'
Else
If{SOShipHeader.CpnyID}='MDC'and{SOShipHeader.SiteID}='MDCHERGNRL'then
'P.O. Box 784'
Else
If{SOShipHeader.CpnyID}='MDC'and{SOShipHeader.SiteID}='MDCSUNGNRL'then
'P.O. Box 784'
ElseIf{SOShipHeader.CpnyID} LIKE 'MDC*'
'P.O. Box 784'
Else
If {SOShipHeader.CpnyID} LIKE 'MDC*' then
'P.O. Box 639'
Else
If {SOShipHeader.CpnyID} LIKE 'RKY*' then
'13027 County Rd. 18'
Else
If {SOShipHeader.CpnyID} LIKE 'WST*' then
'4975 W. Winnemucca Blvd.'
Else
""

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close