Formula in Crystal Report

hi
can anyone tell what is the error in this formula
if  not isnull {GetDataTable.MARK_PRICE_RATE} then
(({GetDataTable.mark_price_rate} * {GetDataTable.BILL_DET_COUNT})  -  {GetDataTable.JARIMEH } )
it is displaying the error like this
The keyword 'then' missing

Hi,
Please post your question at crystal reports forum below for a better assistance on this, this is C# code related forum:
https://scn.sap.com/community/crystal-reports
Regards,
Fouad
Fouad Roumieh

Similar Messages

  • Accessing trend line formula in Crystal Report

    I am using Crystal Reports 8.5 and CR2008.  I have a report showing a trend line (specifically the quadratic regression).  I can show the formula that is being used for the report in the chart.  How can I access the regression formula in Crystal Reports?
    Thank you for your help.

    hi James,
    in short you can't...the charting engine is a separate 3rd party dll so what you see there is not necessarily available in the rest of cr in summaries etc.
    in order to do things like this, you either have to do the calcs on your database or using formulas. i've attached an example of linear regression that i did a while ago. change the .txt extension to .rpt after you extract the contents. sorry, there are no instructions on how to do this.
    on the attached sample though it does figure out the regression formula and also extrapolate data, show residuals etc.   there are a couple of other "fits" in a parameter but i never finished those as it made my head hurt
    -jamie

  • Is there a way to Extract all formulas from Crystal Reports files?

    Hi:
    I have about 40 Crystal Reports (.rpt files).  I need to go through each one and look at formulas if a certain variable/value is used since it has currently changed.  It is taking way too long and not to mention inefficent to open each file, look through any place where there could be custom formulas such as when to suppress - etc.  Is there are way to easily exact all custom formulas from all those report into say a Text file so I can do a Search for it?  That would be the easiest way to find what I'm looking for.
    I have Crystal Reports XI.
    Thanks in advance for your help.

    One option is to use a tool such as rptInspector.  See: [http://www.softwareforces.com/Product/ri/pro/3/rptInspector.htm|http://www.softwareforces.com/Product/ri/pro/3/rptInspector.htm]

  • How to set Formulas in crystal reports 2008

    Hi,
    I am generating crystal reports in vb6 using CR 8.5 and vb6 and below is the code snippet for the same
    CrystalReport1.Formulas(0) = "PrintTitle= '" & strMyTitle & "'"
    CrystalReport1.Formulas(1) = "FromDate= '" & MskFromDate.Text & "'"
    CrystalReport1.Formulas(2) = "ToDate= '" & MskToDate.Text & "'"
    Please let me know how the same functionality can be achieved in VB.Net using Crsytal reports 2008
    Any code snippet would be of great Help.
    Thanks in Adnvance.
    Ramnath

    Something like this:
    Imports CrystalDecisions.CrystalReports.Engine
    Imports CrystalDecisions.Shared
    Public Class Form1
    Inherits System.Windows.Forms.Form
    Dim Report As New CrystalReport1()
    Dim FormulaFields As FormulaFieldDefinitions
    Dim FormulaField As FormulaFieldDefinition
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    FormulaFields = Report.DataDefinition.FormulaFields
    FormulaField = FormulaFields.Item(0)
    FormulaField.Text = "[formula text]"
    CrystalReportViewer1.ReportSource = Report
    End Sub
    Also, see the Developer help file:
    http://help.sap.com/businessobject/product_guides/boexir31/en/crsdk_net_dg_12_en.chm
    API reference:
    http://help.sap.com/businessobject/product_guides/boexir31/en/crsdk_net_apiRef_12_en.chm
    and [Crystal Reports for Visual Studio 2005 Walkthroughs|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2081b4d9-6864-2b10-f49d-918baefc7a23]
    And don't forget to use the search box at the top right of this page before posting to the forums...
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Edited by: Ludek Uher on Jul 26, 2010 8:57 AM

  • Programmatically create objects and formulas in Crystal Reports XI Developer edition?

    <p>Is it possible to programatically/dynamically create a text, line, formula field object, etc. in Crystal XI Developer edition?  I have been programming with the Crystal .Net reports component that came with VS 2005 for the past 6 months and know for a fact you can&#39;t programmatically create those objects although you can programmatically control their properties.  My intention is to create a dynamic report that can be reused extensively.  My current work-around for this was to create a generic report with about 40 formula field objects which draws data from 40 corresponding formula fields that I can programmatically set it&#39;s formula thus imitating a report field.  I want to update to the developer edition because I heard with this edition we can programmatically create and manipulate these objects but I found no reference or examples anywhere that proves we can do this?  Does anyone know for a fact or point me to the right place to look for documentation?  TIA</p>

    Hi,
    How can I programmatically refresh list of values status on CR server XI R2?
    Currently, after I modified the data source in the data connection, some of the LOVs in the report prompt window became empty when I tried to generate the report. I have to use Business View Manager to log onto the Crystal reports server XI R2, find and double click the list of values object to bring up the Edit LOV window, and then click on "Refresh Status" button to make the LOV available in the report prompt window.
    What SDK should I use to create a simple application (preferable a desktop application) to find all LOV objects on CR server XI R2 and to refresh their status? That is an application similar to the "Refresh Status" function in Business View Manager.
    I found Report Engine SDK has the Lov.Refresh function to refresh LOV. On the other hand, Report Engine SDK seems to be for BusinessObjects Enterprise, not for Crystal Reports Server. Can this or other function achieve what I want, i.e. to refresh list of values status on CR server XI R2? If yes, can I use it to develop a self-contained desktop application instead of a web application? I only need to run this application after I modify the data source in the data connection, so I prefer not need to deploy it as a web service.
    Thanks for your help.
    C.T.

  • Last date for an invoice formula for Crystal Reports

    Post Author: jegva
    CA Forum: Crystal Reports
    I sure hope someone can help me write a formula to list only the last dated invoice from our database.  Let me explain, our sales would like a report listing all of our customers showing their last dated invoice.  We use SQL and Crystal Reports 8.5 (yea outdated).  They are interested in showing all our customers and their last invoice/date so they can try to contact those who have not done business for some time. Please help!!!!!!!

    Hi Scott,
    One reason is the older versions introduced a .5 font reduction in the viewers. This was a good thing for some but bad thing for others so I assume what the developers have done is leave the font as is and show those # symbols now to indicate the viewer you are using and font you are using works differently on the OS and the various viewers being used.
    In CR designer it uses the GDI+ to render the data through classic C++ function calls. I .NET it too uses GDI+ but it's the Framework making the calls and the Framework handles screen mapping differently. We've had this issue/functionality limitations since version 9. Various reasons and various work arounds resulted in various outputs.
    Another reason is the C++ viewer built into the Report Designer and the .NET framework handling the fonts work slightly differently when rendering. This has been tracked and few times here by me and in both cases the cause is GDI+ has bugs in it so it's nothing we can do. Post or log your issue with Microsoft, they may be able to fix it. Once they do then if it's still a problem in CR we can fix it depending on what MS does.
    Another work around may be to use a fixed font like Courier or some other font that has a specified character area all characters use, it may make the characters space oddly but as for displaying it's always the same size.
    All I can suggest is they get into a practice of testing their reports in your app before "publishing"
    Thanks again
    Don

  • Hyperlink using formula in Crystal Reports 8.5

    Is there a way to create hyperlink formula to link to nth page in the report (in the exported pdf file)
    for example:
    i want to created a link to a text and when clicked on the link it should take me to page 8 in the same report.
    Thanks
    -Vivek

    Hi Navin
    Thank you so much for your response.
    Is it particular to any one single report or all the reports which contain hyperlink.
    basically it's just one report that should have filer names and pages numbers in the first page followed by the detailed report of all filers
    Also let us know to what type you are linking to, Is it any email address else a website or a file type.
    The table of contents is loaded from a sub report which is connected to a temporarty table with filer names and page numbers.
    it's a database field
    -Vivek

  • Passing values at run time through a JSP page to selection formula to crystal report

    <p>hi,</p><p>   i am using one jsp page.in that page there is a field to select a date </p><p>this value will go to the report and report contain one selection formula.</p><p>which value we are passing on that basis the report should display</p><p>with date which we are passing  from GUI.</p><p>help.............................................................</p><p>//R</p>

    I believe the value of this is based on the owner of the scheduled object.  So if the Admin is scheduling it on behalf of a user I think it should use the user the Admin scheduled on behalf of.  It should be simple to test, simply create a report with this value being displayed and nothing else and see what values you get.

  • Formula Help Crystal Reports 11

    Hello,
    I am having trouble with a selection formula.  I wrote a report that queries 2 tables that have been joined within my report.  A primary table and a secondary table. The secondary table can contain multiple detail records that are associated with each primary record.
    There is a field in each record of the secondary table that contains an alpha character.  I need a slection formula to scan through the fields of the secondary records and if one of those secondary records has a particular value (In this case "T") I would like ALL of the secondary records included in my report along with the primary record indexed to it.  If no secondary record in the series has a value of "T" then all records should be excluded from the report including the primary record indexed to that series of secondary records.
    Is there a function I can use to accomplish this type of logic?...an example of the appropriate syntax would be helpful.
    Your help is much appreciated!
    Mark

    Hi Mark,
    Use the InStr function.  This will allow you to search for a string and it will return a numeric value which represents the placement. 
    Instr ({Table.FIELD}, "T") > 0;
    This will return all records that have a "T" in that field. 
    Good luck,
    Brian
    Edited by: Brian Dong on Oct 23, 2008 4:39 PM

  • Adding formula in crystal report

    Hi Experts,
    I am trying the below formula to combine the fields to consolidate the address .
    whereas, if there is any null field in the combination, i getting the blank output. how to fix this in CR2011 ?
    {OCRD.Building} +" "+ {OCRD.Block}
    Thanks in advance,
    Dwarak

    Hi got it, default value for nulls on the top of formula screen.

  • Crystal report formulas to view revenue for current & Previous Year

    Hi all,
    We have a requirement to create a formula in crystal reports to display the current month revenue and previous month revenue along with few dimensions and also current fiscal year revenue and previous year.
    For ex on SAp ecc table CE11000.
    Please provide the syntax for above requirement.
    Quick response is appreciated.
    Thanks.
    DJ

    HI AlunJD,
    Thanks for your quick turnaround.
    Here's the structure of table i have fields like Currency type,Document Number,Fiscal year , Company code,country, Countrygrp,Document type, Sales quantity & Revenue.
    My requirement is to display Revenue for current Fiscal Year and Previous Fiscal year and aswell as Current Month And previous month in the same report.
    Is there any functions to create a formula to display data on above mentioned logic.
    Thanks.
    DJ.

  • Formula in the Crystal report 2008 R2

    Hi Experts,
    I want a formula in the Crystal report.
    Scenario is that i want the sum of INV4.taxsum where INV4.Relatetype = 1 .(means, i want only sum of taxsum of  lines having relatetype = 1 and not all ).
    how to write the formula for crystal report filed ?
    Thanks in advance,
    Regards,
    Dwarak

    Hi Dwarak,
    Go to the Field Explorer > Right-click Running Total Fields > New.
    Choose INV4.taxsum as the field to summarize and in the Evaluate section, choose 'Formula' and click on the formula button beside it. Use this code:
    INV4.Relatetype = 1
    Drag and drop the Running Total field on the Footer section.
    You can also do this using two formulas.
    First formula goes on the Details section with this code:
    whileprintingrecords;
    numbervar summ;
    if INV4.Relatetype = 1 then
         summ := summ + INV4.taxsum;
    And another one to display with this code. This goes in the footer:
    whileprintingrecords;
    numbervar summ;
    -Abhilash

  • Crystal report formula

    hello
    i am creating a simple sum but where there is no data its placing a null instead of zero
    table
    custom_orders
    =============
    customerid number
    order1 number
    order2  number
    order3  number
    order4  number
    order5 number
    i am creating total orders formula in crystal reports
    order1+order2+order3+order4+order5
    and i am grouping by customer and adding summary by the formula
    when i summarize and when no orders i prefer to place/print zero on the crystal output rather a empty column
    Please advise
    thanks

    hello
    as test i tried this
    IsNull({test.order5})-IsNull({Test.order3})
    it thorws a popup box with message
    "a number,currency ,date -time is required here"

  • Formula Issue in Crystal Reports 8.5

    Hello, I am having an problem figuring out an issue I am having with a formula in Crystal Reports 8.5. What is happening is if there are 2 or more records on a specific table, the formula does some weird things. Basically what is happening, is the formula works, but if there are more then 1 record on the table, it double, or add numbers twice. Here is an example:1st record has two value, value 1A = 63.36, value 1B = 197.132nd record has one value, value 2A = 23.10So on the first pass, it takes 1A plus 1B plus 2B and sums them and loads that to a variable. Then because there is a second record, it takes the variable which now has a value of 284.19, adds the variable value back into itself for a total of 522.18 and then adds value 2A for a total of 545.78.
    What I need it to do is only run through the formula once to get the value of...
    This topic first appeared in the Spiceworks Community

    What product are you using to schedule the reports?
    Ludek

  • How to incorporate ratio in Crystal Report?

    Hi,
    I am new in Crystal report and had no technical background.
    I would like to  know how to build ratio in crystal report? The draft layout as below:
                                                  (RM)        %
    Sales Revenue                        A           (A/A)*100
    Cost of sales                           B            (B/A)*100
    Where A and B are formula in crystal report.
    Regards
    Thomas

    Hi Thomas,
    Ratio is just a result by division.  If you take one field over another as a denominator, you got your ratio.
    Thanks,
    Gordon

Maybe you are looking for