DocTotal in words Crystal Report

Hello,
I am trying to convert DocTotal field into words and not able to do so. Please advise a formula which an help me to get the doctotal in words in Purchase Order Crystal Report Layout
For example by doctotal is 22,750.00 so I want the amount in words as
Twenty Two Thousand Seven Hundred Fifty US Dollors & Zero cents.
Please advise.
Kind Regards,
Ravi

Hi Ravi,
Use this :
numbervar RmVal:=0;
numbervar Amt:=0;
numbervar pAmt:=0;
stringvar InWords :="Rupees ";
Amt := <Enter your value here or Pass field here>
if Amt > 10000000 then RmVal := truncate(Amt/10000000);
if Amt = 10000000 then RmVal := 1;
if RmVal = 1 then
InWords := InWords + " " + towords(RmVal,0) + " crore"
else
if RmVal > 1 then InWords := InWords + " " + towords(RmVal,0) + " crores";
Amt := Amt - Rmval * 10000000;
if Amt > 100000 then RmVal := truncate(Amt/100000);
if Amt = 100000 then RmVal := 1;
if RmVal = 1 then
InWords := InWords + " " + towords(RmVal,0) + " lakhs"
Else
If RmVal > 1 then InWords := InWords + " " + ToWords(RmVal,0) + "Lakhs";
Amt := Amt - Rmval * 100000;
if Amt > 0 then InWords := InWords + " " + towords(truncate(Amt),0);
pAmt := (Amt - truncate(Amt)) * 100;
if pAmt > 0 then
InWords := InWords + " and " + towords(pAmt,0) + " paisa only"
else
InWords := InWords + " only";
UPPERCASE(InWords)

Similar Messages

  • Opening a file in Crystal Reports

    Hello.  When I try to open a file in Crystal Reports it gives me an error message "the parameter is incorrect".  Please advise.  Thanks.
    Cindy

    Hi everyone,
    I wonder if someone could say me how I can open
    (launch) PDF / Word / Crystal Reports files by a
    Java application.
    I thank you in advance.
    RegardsLaunch them, as in their own respective applications (MS Word, Acrobat viewer, etc)?
    By invoking Runtime.getRuntime().exec(command)
    Where command is something like: "cmd.exe /c START " + documentName

  • Crystal Report-Amount in Words Need correction and Delivery date.

    Dear Experts,
    Issue 1
                            In crystal reports i'm converting Amount in to words using the following formula. In that i am getting Every thing in Uppercase with - i.e. RUPEES ONE THOUSAND-FIVE HUNDRED AND .
    I need in Sentence case i.e all First Letters in Capital and also want to Remove '-'
    Amount in Word
    numbervar RmVal:=0;
    numbervar Amt:=0;
    numbervar pAmt:=0;
    stringvar InWords :="Rupees ";
    Amt := {OPOR.DocTotal};
    if Amt > 10000000 then RmVal := truncate(Amt/10000000);
    if Amt = 10000000 then RmVal := 1;
    if RmVal = 1 then
    InWords := InWords + " " + towords(RmVal,0) + " crore"
    else
            if RmVal > 1 then InWords := InWords + " " + towords(RmVal,0) + " crores";
        Amt := Amt - Rmval * 10000000;
        if Amt > 100000 then RmVal := truncate(Amt/100000);
        if Amt = 100000 then RmVal := 1;
        if RmVal = 1 then
            InWords := InWords + " " + towords(RmVal,0) + " lakhs"
        Else
            If RmVal > 1 then InWords := InWords + " " + ToWords(RmVal,0) + "Lakhs";
            Amt := Amt - Rmval * 100000;
            if Amt > 0 then InWords := InWords + " " + towords(truncate(Amt),0);
            pAmt := (Amt - truncate(Amt)) * 100;
            if pAmt > 0 then
                InWords := InWords + " and " + towords(pAmt,0) + " paisa only"
            else
                InWords := InWords + " only";
            UPPERCASE(InWords)
    Issue 2.
    At Delivery terms I'm using the following formula to display the delivery data. If the document date and due date is same it will print Delivery Immediate otherwise it should calculate the Delivery date from document date, but now it's printing DocDue date.
    I need to calculate Delivery Date = DocDuedate - DocDate. 
    If {OPOR.DocDate} = {OPOR.DocDueDate} Then
        "2. Delivery immediate"
    Else
        "2. Delivery on or before " &  {OPOR.DocDueDate}
    Thanks
    Kamal

    Hi
    Try this formula
    numbervar RmVal:=0;
    numbervar Amt:=0;
    numbervar pAmt:=0;
    stringvar InWords :="Rupees ";
    Amt := {@GrandTotal} ;
    if Amt > 10000000 then RmVal := truncate(Amt/10000000);
    if Amt = 10000000 then RmVal := 1;
       if RmVal = 1 then
            InWords := InWords + " " + ProperCase (towords(RmVal,0)) + " crore"
       else
            if RmVal > 1 then InWords := InWords + " " + ProperCase (towords(RmVal,0)) + " crores";
        Amt := Amt - Rmval * 10000000;
        if Amt > 100000 then RmVal := truncate(Amt/100000);
        if Amt = 100000 then RmVal := 1;
        if RmVal = 1 then
            InWords := InWords + " " + ProperCase (towords(RmVal,0)) + " lakhs"
        Else
            If RmVal > 1 then InWords := InWords + " " + ProperCase (ToWords(RmVal,0)) + " Lakhs";
            Amt := Amt - Rmval * 100000;
            if Amt > 0 then InWords := InWords + " " + ProperCase (towords(truncate(Amt),0));
            pAmt := (Amt - truncate(Amt)) * 100;
            if pAmt > 0 then
                InWords := InWords + " and " + ProperCase (towords(pAmt,0)) + " paise only"
            else
                InWords := InWords + " only";
            ProperCase(InWords)
    Regards
    Vivek

  • Amount in words in crystal report

    Hi all,
    I am new to crystal report.
    What i need is i need to create a formula for amount to display in words.
    That is,
    if the value is AED 15,68,595 then i need this to be converted into
    " one million five sixty eight thousand five hundred ninety five only"
    That is,
    10 lakhs is equal to 1 million,
    then 5 lakhs is equal to 500 thousand + 68 thousand,
    five hundred and ninety five.
    Help me solving out this issue.
    Regards,
    Janani

    HOW TO IMPLEMENT THE LOGIC.
    STEP1: IN CRYSTAL REPORT  RIGHT CLICK N  FIELD EXPLORER RIGHT CLICK ON FORMULA FIELD AND THEN CREATE NEW..EXAMPLE WORDS
    STEP2:UNDER FORMULA FIELDS CLICK ON WORDS AND THEN CLICK ON EDIT..
    U CAN SEE THE BELOW FORM
    THE BELOW CODE JUST COPY AND PAST IT..
    IN THE BELOW BOLD COLOR U HAVE CHANGE ONLY ONE LINE..
    ORDR.DocTotal I AM USING ORDER.DOCTOTAL
    IN YOUR CASE THE AMOUNT IS COMMING FROM WHERE WHICH TABLE AND FIELD
    THAT IS ENOUGH
    numbervar RmVal:=0;
    numbervar Amt:=0;
    numbervar pAmt:=0;
    stringvar InWords :="";
    Amt :={ORDR.DocTotal};
    if Amt > 10000000 then
    RmVal := truncate(Amt/10000000);
    if RmVal = 1 then
    InWords := InWords + " " + towords(RmVal,0) + " Crore"
    else if RmVal > 1 then
    InWords := InWords + " " + towords(RmVal,0) + " Crores";
    Amt := Amt - Rmval * 10000000;
    if Amt > 100000 then
    RmVal := truncate(Amt/100000);
    if RmVal = 1 then
    InWords := InWords + " " + towords(RmVal,0) + " Lakh"
    else if RmVal > 1 then
    InWords := InWords + " " + towords(RmVal,0) + " Lakhs";
    Amt := Amt - Rmval * 100000;
    InWords := InWords + " " + towords(truncate(Amt),0);
    ProperCase(InWords)
    STEP3: IN FORMULA EDITOR JUST CLICK ON X2 ICON FOR CHECKING ERRORS IN THE
               FORMULA
    AFTER THAT PRESS OK..
    STEP4: JUST DRAG AND DROP WORKS INTO CYRSTAL REPORT THIS IS ENOUGH

  • Programmatically adding a Word Document or PDF to a crystal report

    I am using Crystal XI for windows.  I have a VB.Net windows application that I am trying to insert a Word Document and/or PDF into.  I want to programmatically be able to add any file(s) to a crystal report.  Is there any sample code or guidance that can show me how to programmically add a file to a report?
    In the user interface, the user can click on unlimited number of PDFs, Word Documents... to insert into a Crystal Report.  Is this possible?   If so, please show steps and some sample code how to do this.
    Kind Regards,
    Jeff

    In this example, the ReportAppFactory gets initialized with the instance from the session object... If I am doing this in windows (not a web application), how would this change it if this is a windows application with no session object?
    I am connecting against an  ADO.Net (XML) file on the same computer - no connection information required... I just want to open the report file, SetDataSource to a dataset ...then do the other stuff in the example.  I think after I get past connecting to the data and opening the report, the rest of working with sections and adding ole objects I can get from the examples.  All of the sample code that I found are web based and don't show how to connect if you are windows based - not over a web page.
    I am not using a CMS or anything web / network based... I just want to connect to a local XML file that was generated from Visual Studio .Net 2005.   The example below is one of the Crystal Samples... they are all web based samples.  ...I am looking for a windows based sample to see how to connect and open a report file.
    Example:
            If Not (Session("boEnterpriseSession") Is Nothing) Then
                boEnterpriseSession = CType(Session("boEnterpriseSession"), CrystalDecisions.Enterprise.EnterpriseSession)
            Else
                'Log on to the Enterprise CMS
                boSessionMgr = New CrystalDecisions.Enterprise.SessionMgr
                boEnterpriseSession = boSessionMgr.Logon(Request.QueryString.Item("username"), Request.QueryString.Item("password"), Request.QueryString.Item("cms"), Request.QueryString.Item("authtype"))
                Session.Add("boEnterpriseSession", boEnterpriseSession)
            End If
            'get report object from session or create a new report object
            If Not (Session("boReportClientDocument") Is Nothing) Then
                boReportClientDocument = CType(Session("boReportClientDocument"), CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocument)
            Else
                boEnterpriseService = boEnterpriseSession.GetService("", "InfoStore")
                boInfoStore = New CrystalDecisions.Enterprise.InfoStore(boEnterpriseService)
                boReportName = "SimpleRCAPIReport.rpt"
                'Retrieve the report object from the InfoStore, only need the SI_ID for RAS
                boQuery = "Select SI_ID From CI_INFOOBJECTS Where SI_NAME = '" + boReportName + _
                 "' AND SI_Instance=0"
                boInfoObjects = boInfoStore.Query(boQuery)
                boInfoObject = boInfoObjects(1)
                boEnterpriseService = Nothing
                'Retrieve the RASReportFactory
                boEnterpriseService = boEnterpriseSession.GetService("RASReportFactory")
                boReportAppFactory = CType(boEnterpriseService.Interface, CrystalDecisions.ReportAppServer.ClientDoc.ReportAppFactory)
                'Open the report from Enterprise
                boReportClientDocument = boReportAppFactory.OpenDocument(boInfoObject.ID, 0)
                'First determine where to add - in this case the details Area
                boArea = boReportClientDocument.ReportDefController.ReportDefinition.DetailArea
                'Create the new section object
                boSection = New CrystalDecisions.ReportAppServer.ReportDefModel.Section
                'Set the properties for the section
                boSection.Kind = CrystalDecisions.ReportAppServer.ReportDefModel.CrAreaSectionKindEnum.crAreaSectionKindDetail
                boSection.Name = "Detail2"
                boSection.Height = 1000
                boSection.Width = 11520
                'Now add the section
                boReportClientDocument.ReportDefController.ReportSectionController.Add(boSection, boArea, -1)
                'Add the reportClientDocument to session
                Session.Add("boReportClientDocument", boReportClientDocument)
            End If
    Thanks,
    Jeff
    Edited by: Jeff Dressing on Aug 20, 2008 10:48 AM

  • Crystal Report error exporting to Word

    My company recently deployed a Microsoft Security Patch to our workstations that's causing a problem with Crystal Reports. When exporting a Crystal report to a Word file (from a VB 6 application) the following error is generated when opening the file: "You are attempting to open a file that was created in an earlier version of Microsoft Office. This file type is blocked from opening in this version by your registry policy setting."
    My company uses Crystal Reports v 8.0.1.0. Is there a more recent release that provides a fix for this error?
    Thanks.
    David
    Edited by: David Verbinski on Nov 5, 2008 10:35 PM

    I know 100mb works because I have created word document reports with that size before using the crystal export.  Just really big reports.  I'm not sure on the exact size because it doesnu2019t work but I know there is more data in the report than the 100MB report which works so it doesnu2019t work on some reports larger than that (don't know the specific size because it doesnu2019t work) sorry for being redundant.
    Not sure about a size limitation on an RTF formatted document that is saved as a *.doc (word document).
    It's my understanding that exporting to a .doc is the same as exporting to .rtf because the .doc is in .rtf format.  I may be wrong but if you change a .rtf extension to a .doc extension, you get the same thing when opening the file in word.
    When exporting to RTF format I get the same error, so I believe they are using the same or similar process.
    Yes I tried on other machines and different servers and the error only occurs when exporting large documents to word.  Small documents work fine.
    If there are file constraints in exporting to word, I believe a more distinct error message could be displayed related to the specific error.
    No I did not upgrade my pc or software, I developed the report and am running specificly for 11.5 release 2 with service pace 3 installed. 
    Thanks,
    K

  • Problems in exporting crystal report to word format

    Hi All,
    I am getting trouble in exporting crystal report to word formats.
    Here are my questions:
    1) The exported word file will have a text "R..950" added on top right hand corner, How to get rid of it?
    2) For those "Can Grow" fields, it can show multiple line data correctly in the viewer. However, the text box in exported word file will be too small to show all the content and lower half of the text is cut.
    Thanks and Regards,
    Cherry

    Hi Asha,
    Thanks for reply.
    The version of crystal report designer and viewer which I am using is version 11 Release 2.
    Besides, I guess it might relate to the format of report so I would like to tell you more.
    Font Face: Arial Unicode MS (in order to show chinese characters)
    Font Size: 9 pt
    For the text "R..950" issue, I just found that some people in the internet having the same issue and they suggested that may relate to the locate. In my case, the locate is Chinese (Hong Kong S.A.R.).
    If it is necessary, I may send you my report with sample for test.
    Regards,
    Cherry

  • The export of a Crystal Reports to MS Word creates big files

    Hi all,
    if I export a report to pdf the file size is 72 KB . But if I export to Microsoft Word (97-2003) format, the filesize amounts to 1,35 MB.
    After I opened the exported document in MS Word and saved it with a new name, the size is only 176 KB.
    Is this a common problem? Is it possible to force crystal reports produce a smaller document?
    Why does Crystal Reports create such large files?
    (Environment: Crystal Reports 2008 SP1)
    Regards, Timo

    Hallo Don,
    first Iwill tell you, if I do export the Report to MS Word, in the FileDialog, it is only possible to create a *.rtf - File.
    Do it act normal?
    So due to your suggestion, i replaced an Image in the report (embedded as an OleObject) as a Graphic-JPG-Object.
    The size of the exported report has reduced from 1,39 MB to 141 KB.
    Thanks a lot!
    Timo

  • Display Chinese Word In Crystal Report's Cross-Tab

    Hi all,
    I am trying to display chinese word in my cystal report. It can be display correctly in detail, page header or formula. But when come to cross-tab, it just will show some funny symbol on it. any idea?
    i am using Crystal report xI release 2.
    Thank You
    Wong

    Hi,
    I solve it.Just for your reference, change the font type inside cross-tab.

  • Paginacion Word editable crystal report

    Buenas
    Tengo un problema al exportar a word editable, me sale en todas las pagina page 1 de N, en los otros formatos si me sale bien. El cliente necesita editar y por eso es necesario exportarlo a este formato.

    Hi
    Need more info.
    - What version of Crystal Reports are you using? What patch level?
    - What version of Visual Studio?
    - is it a windows or a web application?
    - Does this happen on dev box or server?
    - Does the report view and export fine from CR designer?
    - What happens when you export the report using viewer export button to any other format e.g. PDF, excel?
    - How are you exporting the report, using the code or viewer export button?
    - Bhushan
    Senior Engineer
    SAP Active Global Support
    Follow us on Twitter
    Got Enhancement ideas? Try the SAP Idea Place
    Getting started and moving ahead with Crystal Reports .NET applications.

  • Pagination word editable Crystal Report

    Hi,
    I have a problem when I export to Word editable in Crystal report. the header constains only the text from de first page on every page (page 1 of 9) I need to solve this because the client needs to edit the document.

    Hi
    Need more info.
    - What version of Crystal Reports are you using? What patch level?
    - What version of Visual Studio?
    - is it a windows or a web application?
    - Does this happen on dev box or server?
    - Does the report view and export fine from CR designer?
    - What happens when you export the report using viewer export button to any other format e.g. PDF, excel?
    - How are you exporting the report, using the code or viewer export button?
    - Bhushan
    Senior Engineer
    SAP Active Global Support
    Follow us on Twitter
    Got Enhancement ideas? Try the SAP Idea Place
    Getting started and moving ahead with Crystal Reports .NET applications.

  • Import text / word documents into a Crystal Report

    Good morning,
    I need to import a Text file/Word Doc. into a crystal report, these files are based on a field, i mean
    The data in the field is "alr-finclk", then the file to import is alr-finclk. if the data is "alr-pro" the file is alr-pro and so on..
    Have we any way of getting this report ?
    Thks for your help
    Jose Marin

    I have found the following formula which is running when the file isn't a big one...,
    StringVar sFile;
    NumberVar i;
    i := 1;
    while FileGetText( "c:\file.txt", i) <>"" Do
    sFile := sFile + FileGetText( "c:\file.txt", i);
    i := i + 1
    sFile;
    but when the file is big i get
    A STRING CAN BE AT MOST 65534 CHARACTERS LONG
    Any way of solving this?
    Thks
    Jose Marin

  • Crystal report AS ole object into word

    I've been searching the web on using crystal reports as an OLE object inside a word document, but all results have been about using a word document inside a crystal report.
    I am trying to create a quarterly report document for a  business. This document is built using MS word. The document needs to include various tables, charts and the like, which they want to build in crystal reports so that they can be used either as part of the quarterly or as standalone reports.
    I would like to embed these reports into MS Word. Ideally, every three months the reports would be updated with new parameters, the word document would be opened, and the linked OLE reports would display the updated data tables and charts.
    I'm not sure if this is possible. I just attempted to embed a crystal report inside a word 2007 document, but the OLE object only showed up as an object containing the report filename, not the actual report.
    Can crystal act as an ole server for a word document to do what I want it to do, or will I need to programatically export the batch of crystal reports to images in order to have them show up in the word document?

    if you have business objects enterprise & live office, you can use Business Objects Live Office to embed the following from crystal reports into word or excel or powerpoint:
    1) charts
    2) cross tabs
    3) summaries
    4) fields
    to name a few.
    you can also use prompts in the word doc to allow you to change up the above on the fly.

  • How to embed the Word Document and PDF file into Crystal report?

    How to embed the Word Document and PDF file into Crystal report?
    I have word doc which having 10 pages. I need to show all of the 10 pages at a time. I tried OLE object but problem is it shows only one page.
    Is there any solution to show word doc / PDF file in CR?

    Symptom :
    When embedding a pdf document into a Crystal Report, only the one page shows.
    Reproducing the Issue
    Environment:
    Crystal Reports OLE object
    Cause
    An OLE object only displays the first page.
    Resolution
    Embed multiple objects, one for each page
    Or
    Use a hyperlink to the object instead
    Hope this helps!
    Regards,
    Vinay

  • How to make Crystal Report Document from MS Word document?

    Hi
    Is it any way to use MS Word document as template for Crystal Report document.
    I can Insert document as OLE Object, but I want to disassemble it to Text Objects.
    Thanks.

    You can insert 1 page at a time as background (Insert in page header and elect to Underlay following section).
    There is also 1 3rd-party tool that can use formulas from a Crystal report to fill a template MS Word document and save/email to a new MS Word document.
    If you explain the actual end-product required by the user, it may be easier to suggest a solution.

Maybe you are looking for

  • SSRS 2012. ReportServer takes long time to be up.

    SSRS 2012 Sp1 Hi guys, I am using SSRS as my reporting platform, but I have always got the following issue. SSRS ReportServer takes time to load. The first time takes long, then less time but only if the ReprotServer web page is continuosly retrived.

  • Please help with a query were struggling with.

    Any help please, were struggling to get the result we require. We have Scheduled data returned from another program(job table). Shows our jobs 1 through 9 and the time that each job is loaded on a machine. i.e. if you look at the job table, job 1 is

  • I had already forgot my answer ! Now I can't purchase any app, help ! Thanks!

    Hi,I want to buy some apps today. While I was ready to purchase , the store ask me to answer my security questions. But I had already forgot my answer ! Now I can't purchase any app, help ! Thanks!

  • System settings for purchasing organization --------- incomplete

    Dear all, I am getting above error while doing vendor evaluation. I have configured all seetings related to criteria & subcriterian. Still I am getting above error, Thanks & regards Gitesh

  • Creating a Paragraph Format

    Hi All, Please let me know how to create a paragraph format in sap scripts. I tried to create a paragraph format, because there were some tab space issues with the old paragraph formats.for this at the header level I clicked on paragraph format and e