results change when exporting to CSV format

Posted on 2006-03-28
Last Modified: 2008-03-17
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.

Question by:printmedia
    LVL 42

    Expert Comment

    This formula references both minimumROP and weightedAmount - what is in each of these formulas?
    LVL 26

    Accepted Solution

    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.


    Author Comment

    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})
    LVL 42

    Assisted Solution

    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.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
    There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now