How to fix 20 character invoice number is truncated to 15 characters on receipt

SOLVED

I am using Sage 50 2103  - this issue may or may not be related solely to using Crystal Reports (it may be happening with the native reports; I haven't had time to check).

We sometimes use 20 character invoice numbers. On the invoice it's okay, but on a receipt, onscreen it's okay, but on emailing, the invoice number is being truncated to 15 characters. Is this a setting in Sage I can change? I seem to recall at one point changing from 13 to 20 characters - I can't find that setting today in order to verify it.

Is Sage sending only 15 characters in the .csv to the report ?

Or is it in Crystal that I change this - I'm not finding where it is. I have expanded the physical width of the field box - it certainly will accomodate all 20 characters, but something is specifying 15.

  • 0
    verified answer

    Good catch JJD!  I never noticed that myself, though I have not done a Crystal Receipt modification in a lot of years.

    The invoice and customer statements show the proper width of characters but the Receipt is truncated as you said, however it is not truncated in the data level, only the presentation level in Crystal.  This is due to the file formatting of the csv files.

    I did some quick tests and it look like you need to do some editing of the ODBC settings.  I doubt Sage will ever fix this and I cannot guarantee my fix below will work in future versions.  Even the 2017 version has the same settings.

    In my tests, my 20 character invoice number is in the csv file, it is just not displayed as 20 characters, only 15.

    WARNING: Use the fix below at your own risk.  I am not responsible for messing up your computer!

    First find the following path

    C:\Users\Windows Login Name\My Documents\Simply Accounting\forms\CAN2013

    You may have to find it under the Library Documents\Simply Accounting\forms\CAN2013 instead.

    You may find two Simply Accounting folders in the library called Documents but only one has this full path.

    BACKUP THE schema.ini FILE

    Edit the original schema.ini file in Notepad.

    Change the last line in the section below

    [rcpt2.csv]
    ColNameHeader=True
    Format=TabDelimited
    MaxScanRows=25
    CharacterSet=ANSI
    Col1=COMPANY_NUMBER Integer
    Col2=VENDOR_NAME Char Width 35
    Col3=INVOICE_NUMBER Char Width 15

    Change the last line Col3 from 15 to 20

    Col3=INVOICE_NUMBER Char Width 20

    Note: Change nothing else and save.

    Open Sage 50 2013 and reprint the receipt with the longer invoice numbers.

    Then backup your original copy of the Crystal receipt, restart Crystal and reopen your receipt as you did when you took the images.  It doesn't matter if you are in Design or Preview at this point.

    Use the Database menu, Verify Database.  Answer the prompts (OK is the only option for both prompts).

    Then refresh (if you are not already in Preview mode) and you should see your longer invoice number(s).

    Save the rpt and you should be able to print directly from Sage 50 with the longer invoice numbers.

    In my quick tests, the closing and opening of Sage 50 2013 did not alter the schema.ini file.  However, in future versions of the program, it might because after 2014, Sage is now deleting the csv files when closing the program as a security measure.  I have not bothered to track if they change the schema.ini back to the original.

    Let us know if it works after testing the concept of going home and coming back again (you can just close the programs and reboot the computer, Open Sage 50 and print a receipt again to test, after doing the above steps).

    Hope this helps

  • 0 in reply to Richard S. Ridings
    verified answer

    Thank you!
    This worked, except at every print, the schema.ini regenerated/reverted my change and the file date went back to 2012. So I edited it one last time then set it to Read-only*. And once more verified the database and refreshed within Crystal and saved that .rpt. The fix then persisted between prints and after close/re-open of the program.

    * To set schema.ini to Read-only: In Windows Explorer right-click on the file schema.ini -> Properties -> General tab -> (at bottom) Attributes: [X] Read-only

    Do you know whether schema.ini is written to if you make settings changes? Or would it only be updated with periodic program updates (in which case I suspect it replaces the whole /forms/CAN2013/ folder.)

  • 0 in reply to JJD

    Glad to hear it. I forgot about the timing of the updating of the schema.ini. I'm not sure it does replace on every print in more current versions but now I'll have to go back and check. Nice idea to set it to read-only, not sure I would have thought of that.

    It doesn't replace the entire folder at all, just the schema.ini. In fact the csv files and any crashed emailing pdfs will remain in there until the next print/email. In current versions the csv files are deleted when opening and closing the program.

    I haven't seen the schema.ini file get updated for several years now and I doubt it will going into the future. In fact it still has the settings for the T4's but the T4's are no longer Crystal forms.

    Edit:  Sorry I should add that if you did upgrade, the path would then be for what ever year is the version you installed and it would have the schema.ini file from that year.  If it changed between years, it would be updated, theoretically.  In 2017 they didn't do that.  They changed the format of the settings.csv file but didn't change the headers in the csv file or the schema.ini to match, so many forms are breaking now and won't print without reprogramming.  I'll have to try your read-only option to see if it will work so reprogramming is not necessary.