Crystal query formula

what would be the simplest way for the sql coding for a query to read and pick up data from the 'interaction' table, 'Desciption' field that does 'not contain' the words 'NO BACS'
i've tried:
({Interaction.Description}) <> "NO BACS"
but it doesn't seem to work?

In SQL:
Interaction.Description not like '%NO BACS%'
In Crystal:
InStr({Interaction.Description}, "NO BACS" ) = 0
HTH,
Carl
Edited by: Carl Sopchak on Mar 18, 2010 1:03 PM

Similar Messages

  • Crystal Report Formula field function  on OLAP SAP BI/BW Cube

    Dear All
    We create OLAP Cube Report in  Crystal Report 2008 (BO)  base  SAP ( DB2)  BI/BW  Cube, Grid report coming correctly.  Crystal Report Formula Field  functionalities are not avilabel or suporting.  If any one explain or some kind of documentation available pl.  help me.
    Thanks,   in advance.
    Alfred.M

    Hi,
    you are using the OLAP Grid which will only have limited functionality. You can use the BW MDX Driver and then connect to a BEx query and you will have the complete functionality in CR
    Ingo

  • Basic functions (high) in query formula for highest # of days past due

    Hi All,
    I hope you can help.  I am trying to create a formula in a query for FIAR Line Item Cube (0fiar_c03).  I would like to calculate the hightest number of days past due for open line items.  There is an operator 'high' in basic functions within the query formula.  Is it possible to use this?
    Regards,
    Cheryl Adamonis

    There is a workaround usind conditions.That is you can try to filter the top 10 % or top 10 after calculating the no of days past.However this way you will not be displaying complete dataset

  • Crystal Report formula with datediff not working as expected

    We need a Crystal Report formula to display the number of seconds the oldest arriving call has been waiting.  Across multiple resources that can each have an "oldest call".  The database stores a datetime value for the time the oldest call arrived.  If there are no waiting calls, then this field is NULL.  (MSSQL database).  It seemed reasonable to implement this in a formula that 1) discovers the minimum of "oldest call" timestamps in the selected records, and 2) to use "datediff" to produce the difference (in seconds) between the "oldest call" timestamp and current time.
    The first attempt at this relied on "implied" iteration that could be done within a formula.  Something like:
    data: OLDESTARRIVALTIME
           null
           '2014-06-14 08:08:08.000'
           null
          '2014-06-14 08:07:55.000'
           null
    whilereadingrecords;
    datetimevar minArrival;
    if isNull({SVCCLASSMEASURES_VW.OLDESTARRIVALTIME}) = False
                   and minArrival < {SVCCLASSMEASURES_VW.OLDESTARRIVALTIME} then
         minArrival := {SVCCLASSMEASURES_VW.OLDESTARRIVALTIME};
    DateDiff("s", minArrival, {SVCCLASSMEASURES_VW.UTCDATE})
    We tried storing the values of OLDESTARRIVALTIME in an array.  We could see it iterating, but the values in the array only contained
    the column value from the first record.
    This was to solve the problem of screening null values and producing the minimum of the set.
    Since that didn't work (and the web articles seemed to imply this would iterate over all the records, we tried another approach.  This
    time we set NULL timestamps in the table to a timestamp far in the future, so that we could directly apply "minimum" to produce
    the correct "begin" for datediff.
    data: OLDESTARRIVALTIME
              '2030-01-01 00:00:00.000'
              '2014-06-14 08:08:08.000'
              '2030-01-01 00:00:00.000'
              '2014-06-14 08:07:55.000'
              '2030-01-01 00:00:00.000'
    datetimevar minArrival = minimum({SVCCLASSMEASURES_VW.OLDESTARRIVALTIME});
    datetimevar minUTC = minimum({SVCCLASSMEASURES_VW.UTCDATE});
    if minArrival < minUTC then
         DateDiff("s", minArrival, minUTC)
    else
         0
    (minUTC would be current time in UTC)
    So, to start things off, the last formula produces negative numbers!  They hover in negative seconds within a negative minute (-33, -45, etc.).
    That's inconceivable, considering the test for minArrival < minUTC.  Both of the fields are "datetime".
    As it turns out, in the near term, it's most important to get the second formula working.  And, of course, insights into getting the first
    formula to work are welcome as well!
    Have we run into some weird behavior of the "DateDiff" function?
    Thanks!

    If DateDiff is always returning a negative number you could try swapping the dates around in the call to DateDiff - it should look like this:
         DateDiff("s", minUTC, minArrival)    
    Or you could use the Absolute Value of the calculation:
         Abs(DateDiff("s", minUTC, minArrival) )
    As for your first formula, you need to initialize the variable to a value prior to using it in the comparison.  If you don't, its value is null and comparing it against a value won't work.  (See What is Null and Why is it Important for Crystal Reports | SAP BI BLOG for a blog that I wrote about working with nulls in Crystal.)
    You should change your existing formula to something like this:
    whilereadingrecords;
    datetimevar minArrival;
    if OnFirstRecord then minArrival := DateTime(2013, 1, 1, 0, 0, 0);
    if not isNull({SVCCLASSMEASURES_VW.OLDESTARRIVALTIME})
                   and minArrival > {SVCCLASSMEASURES_VW.OLDESTARRIVALTIME} then
         minArrival := {SVCCLASSMEASURES_VW.OLDESTARRIVALTIME};
    Note how I changed the If statement.  Also, you want to replace minArrival with the field value if the field is less than the current value of minArrival - so you need to use ">" instead of "<" in the comparison.  Place this formula in the details section.  It will now show anything because of the semi-colon on the end.  This will ensure that it gets evaluated for every record.
    Now, create a second formula that looks like this:
    whileReadingRecords;
    datetimevar minArrival;
    DateDiff("s", minArrival, {SVCCLASSMEASURES_VW.UTCDATE})
    Place this formula in a footer section - it will not work in a header section.  If you need it in a header section you might be able to take the "whilereadingrecords" off of both formulas and use the "Maximum()" summary function to get the correct value.
    -Dell

  • Error in File... Failed to create the Crystal Query Engine.

    I am attempting to use Compliance Suite 4 to open a report.  The error I get is:
    Error in File
    S:\Applications\Apps\CSuite\Reports\schedstu.rpt:
    Failed to create the Crystal Query Engine.
    S:\Applications\Apps\CSUITE\Report\schedstu.rpt
    When we attempt to open the report with Crystal Reports XI we get the following:
    NO SAVED DATA
    This report file does not contain saved data and cannot be viewed.
    These reports will open for the same account on a different PC.  Has anyone seen this?  Thanks!

    You'll probably get a quicker answer from the people at Compliance Suite. All that error is telling me is that the database engine does not understand what it is that you're throwing at it in terms of a database connection or data type. As it's a 3rd party app, I do not know how this is implemented so that is all I can say...
    Ludek

  • Query formulas

    Hi All
    Can anyone please give me a list of query formulas e.g. pulling current date to paste into delivery date then add one day to display tomorrows date.
    Thanks

    Hi Dear,
    Please follow the following steps
    1) save this query in the Qry manager via Modules>Reports>Qry Wizard.
    then select any table>Next>select any row>next>next-->Finish then click on middle Pencil to edit the query..Paste the following qry..
    SELECT getdate() + 1
    then save this qry under any category.
    2) Apply the Formatted search by the saved query.
    Hope this wil hlp you...
    Warm Regards,
    Mahendra

  • Problem in using  Nested  IF-ELSE in Crystal Report  formula

    Hi Experts ,
                         I am having some problem using  Nested IF-ELSE in Crystal Report formula ,
    there is no error in the formula but only one condition is working. other condition is not working
    i am using this concept in formula workshop :-
    ' if{EXCISE_INVOICE;1.Basic Excise Duty BED@10 %}<>0 and{EXCISE_INVOICE;1.Education Cess @2%}<>0 and {EXCISE_INVOICE;1.Secondary Education Cess @1%}<>0 and {EXCISE_INVOICE;1.Central Sales Tax(CST)@2%}<>0
    then
    Sum ({EXCISE_INVOICE;1.Amount}) + {EXCISE_INVOICE;1.BedAmount@10%} + {EXCISE_INVOICE;1.EcessAmount@2%} + {EXCISE_INVOICE;1.SecCessAmount@1%} + {EXCISE_INVOICE;1.CSTAmount@2%}
    else
    if {EXCISE_INVOICE;1.Basic Excise Duty BED@10 %}<>0 and {EXCISE_INVOICE;1.Education Cess @2%}<>0 and  {EXCISE_INVOICE;1.Secondary Education Cess @1%}<>0 and   {EXCISE_INVOICE;1.Input VAT@5%}<>0  and {EXCISE_INVOICE;1.Addtional Tax@1%}<>0
    then
    Sum ({EXCISE_INVOICE;1.Amount}) + {EXCISE_INVOICE;1.BedAmount@10%} + {EXCISE_INVOICE;1.EcessAmount@2%}+{EXCISE_INVOICE;1.SecCessAmount@1% } + {EXCISE_INVOICE;1.VATAmount@5%} +{EXCISE_INVOICE;1.AddTaxAmount@1%(for VAT@4)}
    I want that  all conditions  should work and the condition which is applicable there according to formula it display the result,  if i add another condition then it should also work.
    kindly tell me the solution of this problem
    Regards
    Rahul

    Try this logic:
    if{EXCISE_INVOICE;1.Basic Excise Duty BED@10 %}!=0 and{EXCISE_INVOICE;1.Education Cess @2%} !=0 and {EXCISE_INVOICE;1.Secondary Education Cess @1%} !=0
    then
    Sum ({EXCISE_INVOICE;1.Amount}) + {EXCISE_INVOICE;1.BedAmount@10%} + {EXCISE_INVOICE;1.EcessAmount@2%} + {EXCISE_INVOICE;1.SecCessAmount@1%}
    else
    0
    +
    IF {EXCISE_INVOICE;1.Central Sales Tax(CST)@2%} !=0
    then
    {EXCISE_INVOICE;1.CSTAmount@2%}
    else
    IF  {EXCISE_INVOICE;1.Central Sales Tax(CST)@5%} !=0
    then
    {EXCISE_INVOICE;1.CSTAmount@5%}
    +
    if {EXCISE_INVOICE;1.Addtional Tax@1%} !=0
    then
    EXCISE_INVOICE;1.AddTaxAmount@1%(for VAT@4)}
    else
    0
    If not work, try SQL command.
    Thanks,
    Gordon

  • BEX query formula

    HI,
        We want to write below formula in bex query, Kindly guide me, for inital(no value) i dont know what i have to use in query formula.
    if(temp = inital)
    elseif(temp>0)
    Thanks

    We can't check for SPACE, NULL, INITIAL in bex.... And the IF statement you can include keyfigure only.
    If you want to check for characteristics, then you have to go for Virtual characteristics.
    Search in the forum, you will get lot of thread on Virtual Characteristics.
    --- Thanks...

  • Crystal Report Formula to select Record  of only MAX Value

    hi Everyone,
    i need a simple crystal report formula to select one department whose recived quantity Maximum.
    for example:
    itemcode    dscription      departmen   op       recived       issue        
      1                   a                ab               2              2              2         
      1                   a                bb              0             2              2          
      1                   a                bc               4             8              2         
      1                   a                cc              2              2              2
    i group by item  the item show just once but i want a formula to show one department who's recived quantity is maximum.i suppress the detail section.and just show the group footer/
    itemcode    dscription      departmen   op       recived       issue        
      1                   a                  bc                 8             14             8 

    Thanks
    Re: Crystal Report Formula to select Record  of only MAX Value
    Abhilash Kumar

  • Another Problem will Crystal Query Engine

    Post Author: AHandford
    CA Forum: Upgrading and Licensing
    Hello,
    I have in the past had problems with the crystal query engine, which were resolved by registering the crqe.dll  in the bin directory.  That was on Windows 2000. In that case I was able to open reports in  CR developer successfully and export Crystal reports in PDF format from a third party LIMS system. No problems.
    I have now got XP and am having to troubleshoot the problem again. I registered the dll and my install of CR10 is working fine but  I get the usual "Failed to create the Crystal Query engine" when trying to export the Crystal report from LIMS. If I replace the CRQE.dll ( dated 2003) which was shipped with v10 with another CRQE dll (dated april2006) I can now export from the third party LIMS OK but cannot open the reports in developer.
    Is there any specific problem with doing this on XP?  Do I need a full set of more recent dlls to get this to work?
    Manty thanks,
    Andy Handford

    You'll probably get a quicker answer from the people at Compliance Suite. All that error is telling me is that the database engine does not understand what it is that you're throwing at it in terms of a database connection or data type. As it's a 3rd party app, I do not know how this is implemented so that is all I can say...
    Ludek

  • Crystal Query Engine stopped working in VS2005

    Post Author: JayZee
    CA Forum: .NET
    Hi
    I am using the Crystal Reports built into VS2005.
    I have a VB.Net application that has worked for months but when I loaded it up tonight and tried to view a Crystal Report I got 2 error messages:
    1.  Failed to open document2.  Failed to create the Crystal Query Engine
    Other forum posts suggest it is a consequence of installing and uninstalling an application that uses the merge modules and proposed solutions suggest uninstalling Crystal Reports and then Re-installing it via the add/remove programs.
    Are there any other suggestions as typically I have a tight deadline and really want to resolve this quickly.
    Thanks in advance for any help
    Jayzee

    Post Author: JayZee
    CA Forum: .NET
    Hi All
    Some further info about my problem which hasn;t been resolved yet.
    I attempted to uninstall and re-install Crystal Reports using Add/Remove programs and changing the install - This didn't work.
    I then attempted a re-install of Visual Studio via Add/Remove programs - this hasn't worked either.
    I can't add reports, edit or view reports, I can't create a Crystal Reports project.  When I try to run the application I get the 2 messages above.  some more info on those is:
    Try to open an existing report and I get a messagebox that says Crystal Reports ActiveX Designer Failed to open document
    When I click on OK I get another message box that says Microsoft Visual Studio Failed to create the Crystal Query Engine.
    Agaqin, any help or pointers would be greatly appreciated.
    Thanks
    Jayzee

  • Failed to create the Crystal Query Engine. Please Help me resolve this issu

    i keep getting the this error :
    Failed to create the Crystal Query Engine.
    on this line of code :
    billing.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, fileName);
    i'm trying to use export it to pdf.
    the page works fine on my notebook. but when deployed to window server 2003 server i get this error.
    Crystal Reports Basic Runtime for Visual Studio 2008 is already installed there.
    I have provided NETWORK_SERVICE and ASPNET access to the root drive C:, which is the only drive on the server. but i'm getting this error.

    I'd like you to download the Process Monitor utility from here:
    http://technet.microsoft.com/en-ca/sysinternals/bb896645.aspx
    Filter for the name of your process as this utility makes large logs. Once you have a log, search for any error messages (Access denied, etc.).
    The only note I found on the same error is [here|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do] which points to the crqe.dll being at fault.
    See if the Depends utility tells you of any missing dependencies. Depends is here:
    http://www.dependencywalker.com/
    (Simply open the dll in the utility)
    Ludek

  • Crystal Report Formula for traversing the Hierarchy

    Hi Friends,
    I have a Hierarchy Node Variable in Query Designer and I use the same in my Crystal Report.
    I need to create a formula, which will traverse and find all of the child nodes of the selected Hierarchy Node (through the variable). Could you please let me know if this is possible and send me the code.
    Thanks in Advance!
    Regards,
    Vinaya Paulraj.

    Hi Vinaya
    In Crystal, under the 'Report' menu, there is an item called ''Hierarchical Grouping Options'. This item allows you to sort information based on the relationship between two fields.
    For example:
    The following example is based on using the sample database called Xtreme that ships with Crystal Reports and Xtreme's Employee table.
    There is an {Employee ID} field and {Reports to} field in the Employee table. These fields both contain an Employee ID number. There can be employees with employees that report to them. In other words, there can be employees that report to a higher level of management. You want to see the overall hierarchy of the employees. To do so, you would use the 'Hierarchical Grouping Option' in Crystal Reports.
    To view the employee hierarchy from the Employee table, complete the following:
    1. Create a group and group on {Employee ID}. You want to group on {Employee ID} because you want to see the overall hierarchy of employees.
    · From the 'Insert' menu, select 'Group'.
    · From the 'Insert Group' dialog box, select {Employee.Employee ID} in the first drop-down list.
    · Click 'OK'.
    2. Create a hierarchical group.
    · From the 'Report' menu, select 'Hierarchical Grouping Options'.
    · Select 'Sort Data Hierarchically'.
    · Select {Reports to} from the drop-down list for 'Parent ID'. In this example, the {Reports to} field is the parent field; therefore, we must select it in the 'Parent ID' field.
    3. Indenting the hierarchical group, you must enter a value between 0 and 4 inches.
    The 'Group Indent' setting only affects the display of the report. If you enter a value other than zero (0) the various levels of hierarchy will appear indented when the report is previewed. Thus making it easier to see the various groups of employees, managers, etc.
    For more information, search the online help for 'Grouping data hierarchically'.
    Regards
    Girish

  • 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.

  • Problem with combination of two working query formulas

    Hey guys,
    I have a problem in building a formula correctly with the BEx formula logic. I am sure, you can help me with this.
    Right now I have four columns in my query. The first column (Actual) displays actual amounts either in local (10) or reporting (25) currency type depending on the optional selection either in the variable screen or in the free characteristics filter. The second column (Actual with Budget exch. rate) always shows the actual amounts with the budget exchange rate of the reporting currency. The third column (Budget) is build in the same way as the first column, but shows budget amount data. In the fourth column (Variance) the variance between budget and actual data should be calculated, but here lies the problem:
    The formula should differentiate the chosen columns for the calculation depending on what currency type is selected either from the optional variable selection before the query is executed or from the free characteristics filter. So if I select currency type 10 it should calculate the variance by subtracting the budget column from the first column, but if I select currency type 25 it should subtract the budget columng from the second column.
    I have implemented a formula which works already, but not for both selection possibilities (variable screen or free characteristics filter). Either the formula works when I input a currency type in the variable selection screen or when I select a filter value in the free characteristics filter. However, I need to combine both formulas in one working formula so that the user can choose if he wants to filter the currency already in the variable screen in the beginning or in the filter after query execution. Here are the two formulas which I need to get combined into one formula:
    Used Variables:
    VScreen_Selection --> value from the key of the optional Currency Type Variable from the Variable Selection Screen
    Filter_Selection: --> value from the key of the InfoObject Currency Type
    Formula for Variable Screen Selection:
    (VScreen_Selection == 10) * (Budget - Actual) + (VScreen_Selection == 25) * (Budget - Actual with Budget exch. rate)
    Formula for Free Characteristics Filter Selection:
    (Filter_Selection == 10) * (Budget - Actual) + (Filter_Selection == 25) * (Budget - Actual with Budget exch. rate)
    Can you help me to combine both Formulas? I can't believe that this is too difficult. Many Thanks in advance.
    Best Greets,
    Norbert

    Hello.
    Did you try this:
    Formula 1: Hidden
    (VScreen_Selection == 10) * (Budget - Actual) + (VScreen_Selection == 25) * (Budget - Actual with Budget exch. rate)
    Formula 2: Hidden
    (Filter_Selection == 10) * (Budget - Actual) + (Filter_Selection == 25) * (Budget - Actual with Budget exch. rate)
    Formula 3:
    (Filter_Selection <> 10) * (Filter_Selection <> 25) *Formula 1 +
    (VScreen_Selection <> 10) * (VScreen_Selection <> 25)*Formula 2

Maybe you are looking for