results change when exporting to CSV format

I am currently using crystal reports 8.5 , I am trying to export a report to CSV format, but it changes results , when I export it to another format , for example excel, pdf, etc ,then I get the correct results. I am not getting an error message only different results for example, in excel I get the correct answer 13000 but in csv format I get 700.  This is the formula I am using for these fields, can you help?

shared numbervar total;
//  {@minimumROP}

//if {@minimumROP} > total then
//    {@minimumROP}
//    total

if {@minimumROP} > {@weightedAmount} then

Any help will be greatly apreciate it.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

This formula references both minimumROP and weightedAmount - what is in each of these formulas?
Kurt ReinhardtSr. Business Intelligence Consultant/ArchitectCommented:
Shared variables aren't supported for export to CSV per the following whitepaper:

Also, per that same whitepaper, conditional formulas are supported, but with limitations.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
printmediaAuthor Commented:
for minimumROP:

if not(isnull({REORDERPOINT.Minimum_Stock})) then
if not(isnull({REORDERPOINT.Minstoc_Expdate})) then
    if {REORDERPOINT.Minstoc_Expdate} >= CurrentDate then
    (({REORDERPOINT.Std_Vendor_Lead}/30)+{@Safety Stock})*{REORDERPOINT.Minimum_Stock}

    else 0



****In weighted amount:

shared numbervar monthOne;
shared numbervar monthTwo;
shared numbervar monthThree;
shared numbervar monthFour;
shared numbervar total;
numbervar preTotal;
numbervar total;
numbervar pre2Total;

preTotal :=(({REORDERPOINT.Std_Vendor_Lead}/30)+{@Safety Stock})
((monthFour * .1) + (monthThree * .2) +  (monthTwo * .3) + (monthOne * .4));

pre2Total := ((monthFour * .1) + (monthThree * .2) +  (monthTwo * .3) + ((monthOne+{REORDERPOINT.QtyOnSalesOrder}) * .4));

total := preTotal;
total := (total/{REORDERPOINT.PurchaseUMFactor});

if (preTotal/{REORDERPOINT.PurchaseUMFactor}) <> int(preTotal/{REORDERPOINT.PurchaseUMFactor}) then
    if sgn(total-int(total)) = -1 then
        if (total-int(total))*-1 >= .5 then
            total := round(total)
            total := round(total) + 1;
    else //if round(total) = 1 then
        //total := round(total)
        if total-int(total) >= .5 then
            total := round(total)
            total := round(total) + 1;

total := total * {REORDERPOINT.PurchaseUMFactor};

//total & "   " &

//monthOne & "  " & monthTwo & "  " & monthThree & "  " & monthFour

//preTotal/{IM1_InventoryMasterfile.PurchaseUMFactor} & "   " & int(preTotal/{IM1_InventoryMasterfile.PurchaseUMFactor})
Thanks for posting the formulas, but as Kurt already indicated the problem is that Crystal doesn't support the export - I wasn't aware of this myself.

If you need .csv format you may have to export to some other format that does support shared variables (maybe Excel?) and then export from there to .csv.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.