Crystal Report Formula French Salutation

I have this code below I'm not sure why it is nto running properly.  WHen i run each separately, they all work but for some reason when i put them together in a longer formula
If IsNull({GfCnBio.GfCnBio_Spouse_ID}) and {GfCnBio.GfCnBio_Key_Indicator} = "I"
    and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and (Trim ({GfCnBio.GfCnBio_Title_1}) like "M.*")
    then "Monsieur " + " " +  {GfCnBio.GfCnBio_Last_Name}
Else if {GfCnBio.GfCnBio_Spouse_ID} <> 0 and {GfCnBio.GfCnBio_Key_Indicator} = "I"
    and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and (Trim ({GfCnBio.GfCnBio_Title_1}) like "M.*")
    then "Monsieur " + " " +  {GfCnBio.GfCnBio_Last_Name} + " " + "Madame " + {GfCnBio.GfCnBio_Last_Name}
else if IsNull({GfCnBio.GfCnBio_Spouse_ID}) and {GfCnBio.GfCnBio_Key_Indicator} = "I"
    and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and (Trim ({GfCnBio.GfCnBio_Title_1}) like "M. et Mme.*")
    then "Monsieur " + " " +  {GfCnBio.GfCnBio_Last_Name}
else if {GfCnBio.GfCnBio_Spouse_ID} <> 0 and {GfCnBio.GfCnBio_Key_Indicator} = "I"
    and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and (Trim ({GfCnBio.GfCnBio_Title_1}) like "M. et Mme.*")
    then "Monsieur " + " " +  {GfCnBio.GfCnBio_Last_Name} + " " + "Madame " + {GfCnBio.GfCnBio_Last_Name}
else if IsNull({GfCnBio.GfCnBio_Spouse_ID}) and {GfCnBio.GfCnBio_Key_Indicator} = "I"
    and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and (Trim ({GfCnBio.GfCnBio_Title_1}) like "Me.*")
    then "Madame " + " " +  {GfCnBio.GfCnBio_Last_Name}
else if {GfCnBio.GfCnBio_Spouse_ID} <> 0 and {GfCnBio.GfCnBio_Key_Indicator} = "I"
    and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and (Trim ({GfCnBio.GfCnBio_Title_1}) like "Me.*")
    then "Madame " + " " +  {GfCnBio.GfCnBio_Last_Name} + " " + "Monsieur " + {GfCnBio.GfCnBio_Last_Name}
else if IsNull({GfCnBio.GfCnBio_Spouse_ID}) and {GfCnBio.GfCnBio_Key_Indicator} = "I"
    and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and (Trim ({GfCnBio.GfCnBio_Title_1}) like "Madam*")
    then "Madame " + " " +  {GfCnBio.GfCnBio_Last_Name}
else if {GfCnBio.GfCnBio_Spouse_ID} <> 0 and {GfCnBio.GfCnBio_Key_Indicator} = "I"
    and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and (Trim ({GfCnBio.GfCnBio_Title_1}) like "Madam*")
    then "Madame " + " " +  {GfCnBio.GfCnBio_Last_Name} + " " + "Monsieur " + {GfCnBio.GfCnBio_Last_Name}
else if IsNull({GfCnBio.GfCnBio_Spouse_ID}) and {GfCnBio.GfCnBio_Key_Indicator} = "I"
    and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and (Trim ({GfCnBio.GfCnBio_Title_1}) like "M.*")
    then "Monsieur " + " " +  {GfCnBio.GfCnBio_Last_Name}
else if {GfCnBio.GfCnBio_Spouse_ID} <> 0 and {GfCnBio.GfCnBio_Key_Indicator} = "I"
    and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and (Trim ({GfCnBio.GfCnBio_Title_1}) like "M.*")
    then "Monsieur " + " " +  {GfCnBio.GfCnBio_Last_Name} + " " + "Madame " + {GfCnBio.GfCnBio_Last_Name}
else if IsNull({GfCnBio.GfCnBio_Spouse_ID}) and {GfCnBio.GfCnBio_Key_Indicator} = "I"
    and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and
    (Trim ({GfCnBio.GfCnBio_Title_1}) like "Mme.*" or Trim ({GfCnBio.GfCnBio_Title_1}) like "Mme")
    then "Madame " + " " +  {GfCnBio.GfCnBio_Last_Name}
else if {GfCnBio.GfCnBio_Spouse_ID} <> 0 and {GfCnBio.GfCnBio_Key_Indicator} = "I"
    and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and
    (Trim ({GfCnBio.GfCnBio_Title_1}) like "Mme.*" or Trim ({GfCnBio.GfCnBio_Title_1}) like "Mme")
    then "Madame " + " " +  {GfCnBio.GfCnBio_Last_Name} + " " + "Monsieur" + {GfCnBio.GfCnBio_Last_Name}
else if IsNull({GfCnBio.GfCnBio_Spouse_ID}) and {GfCnBio.GfCnBio_Key_Indicator} = "I"
    and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and
    (Trim ({GfCnBio.GfCnBio_Title_1}) like "Mlle." or Trim ({GfCnBio.GfCnBio_Title_1}) like "Mlle")
    then "Madame " + " " +  {GfCnBio.GfCnBio_Last_Name}
else if {GfCnBio.GfCnBio_Spouse_ID} <> 0 and {GfCnBio.GfCnBio_Key_Indicator} = "I"
    and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and
    (Trim ({GfCnBio.GfCnBio_Title_1}) like "Mlle." or Trim ({GfCnBio.GfCnBio_Title_1}) like "Mlle")
    then "Madame " + " " +  {GfCnBio.GfCnBio_Last_Name} + " " + "Monsieur " + {GfCnBio.GfCnBio_Last_Name}
else
    "Madame, Monsieur"
when i run the above formula  i do not get all the results i need.
but when i run the below part of the formula separetly, i get the results that i am missing from the above formula.  I am not sure what i could be doing wrong here...
if IsNull({GfCnBio.GfCnBio_Spouse_ID}) and {GfCnBio.GfCnBio_Key_Indicator} = "I"
    and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and
    (Trim ({GfCnBio.GfCnBio_Title_1}) like "Mme.*" or Trim ({GfCnBio.GfCnBio_Title_1}) like "Mme")
    then "Madame " + " " +  {GfCnBio.GfCnBio_Last_Name}
else if {GfCnBio.GfCnBio_Spouse_ID} <> 0 and {GfCnBio.GfCnBio_Key_Indicator} = "I"
    and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and
    (Trim ({GfCnBio.GfCnBio_Title_1}) like "Mme.*" or Trim ({GfCnBio.GfCnBio_Title_1}) like "Mme")
    then "Madame " + " " +  {GfCnBio.GfCnBio_Last_Name} + " " + "Monsieur" + {GfCnSpSpBio.GfCnSpSpBio_Last_Name}

Hi Divyesh,
Since the formula isn't returning any error message, it looks like it could be a logical error that is causing the result to not be what you are expecting.
Since there is a lot of conditions to be fulfilled, it could happen that it meets the criteria for one set of conditions and then it doesn't go down to the next sets of conditions that you expected it to go to, as it went to another branch of the conditions. ( Hope this make sense. )
I will suggest to look at the formula and see what you are the common conditions, for each levels.
For example, maybe 5 of the conditions needs to fufill condition where the country is equal to USA and 3 where it is equal to Mexico, ...
Once you have all the logic down,  then write the formula, but with only the higher level, and test if it returns the desired result, then add the second level of conditions and so on. In this way, you will find out right away if there is a logical error.
Hope this help!

Similar Messages

  • 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

  • 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

  • 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

  • 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

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

  • Mapping Arrays indexing in Crystal Reports formulas and indexes

    <span style="font-size: 10pt; font-family: &#39;Times New Roman&#39;"><p style="margin: 0in 0in 0pt" class="MsoNormal">I just took a Crystal Reports Designer class today and I presented the Array Mapping technique to the instructor. Since he was very interested I decided to post it here, so more people can benefit from it.</p>  <p style="margin: 0in 0in 0pt" class="MsoNormal">This is an idea used a lot in C++. I designed a formula using two symmetric arrays. One to hold values to be used to test a condition, and a second one to hold values to be outputted when the condition is found. Since the index in the test values array for a given value to be tested matches the index of return values array of the correspondent output value, this methodology is called index mapping.</p>  <p style="margin: 0in 0in 0pt" class="MsoNormal">Here follows the code:</p>   <p style="margin: 0in 0in 0pt" class="MsoNormal">//testValues array store values to be tested in the formula</p><p style="margin: 0in 0in 0pt" class="MsoNormal">Local StringVar Array testValues :=<span>     </span>MakeArray ( "S",<span>         </span>"M",<span>    </span><span>    </span>"L",<span>       </span>"XL");</p>  <p style="margin: 0in 0in 0pt" class="MsoNormal">//returnValues array store values to be returned by the test formula</p><p style="margin: 0in 0in 0pt" class="MsoNormal">Local StringVar Array returnValues :=<span>   </span>MakeArray ( "Small",<span>    </span>"Medial",<span>   </span>"Large",<span>  </span>"Extra Large", </p><p style="margin: 0in 0in 0pt" class="MsoNormal"><span>                                                    </span>"App Type not Found");</p><p style="margin: 0in 0in 0pt" class="MsoNormal">Local NumberVar i := 1;</p><p style="margin: 0in 0in 0pt" class="MsoNormal">Local Numbervar returnIndex := -1;</p>   <p style="margin: 0in 0in 0pt" class="MsoNormal">//Loop through the entire array for each values of the field</p><p style="margin: 0in 0in 0pt" class="MsoNormal">While<span>   </span>i <= Ubound(testValues) AND returnIndex = -1 Do(</p><p style="margin: 0in 0in 0pt" class="MsoNormal">//Actual test of the values and return bellow</p><p style="margin: 0in 0in 0pt" class="MsoNormal"><span>        </span>If ToText({CUSTOMER.SIZE}, 0) = testValues<i> Then( </p><p style="margin: 0in 0in 0pt" class="MsoNormal"><span>            </span>returnIndex := i;);</p><p style="margin: 0in 0in 0pt" class="MsoNormal"><span>      </span><span>  </span>i := i + 1;</p><p style="margin: 0in 0in 0pt" class="MsoNormal">);</p>   <p style="margin: 0in 0in 0pt" class="MsoNormal">//If any value found return it, else return last value in the return value array</p><p style="margin: 0in 0in 0pt" class="MsoNormal">If returnIndex = -1 Then</p><p style="margin: 0in 0in 0pt" class="MsoNormal"><span>    </span>returnValues[Ubound(testValues) + 1]</p><p style="margin: 0in 0in 0pt" class="MsoNormal">Else</p><p style="margin: 0in 0in 0pt" class="MsoNormal"><span>    </span>returnValues[returnIndex]</p>  <p style="margin: 0in 0in 0pt" class="MsoNormal">Fell free to email me if you have questions and enjoy the code...</p></span>

    Can you help with the below?
    Group on Client/Location, Brokerage Rate, Product
    Read all records for a particular group and store each different currency in an array
    On change of group display contents of the stored array. 
    e.g.
    Record 1         ABN   AM      FUTURE RATE AGREEMENT       0.012500%      DKK  
    Record 2         ABN   AM      FUTURE RATE AGREEMENT       0.012500%      EUR
    Record 3         ABN   AM      FUTURE RATE AGREEMENT       0.012500%      GBP
    Record 4         ABN   AM      FUTURE RATE AGREEMENT       0.012500%      USD
    On change of group I would like to display the following
                            ABN   AM      FUTURE RATE AGREEMENT       0.012500%      DKK   EUR    GBP    USD

  • Need a Crystal Report formula to concatenate strings during reading records

    I have a report that takes partnumbers and cross references them with other partnumbers.
    I have this information in the details
    Partnumber   XRef                          I need this as the string
    A                  B                              B
    A                  C                              B,C
    A                  D                              B,C,D
    And then start the a new string when it gets to a new partnumber.  Does anyone know how to do this?
    Thanks
    siboyd

    Hi,
    please create a formula field named "MySharedVariableTestGroupHeader" with the following code:
    shared StringVar mySharedVar := "Start";
    Then create a second formula field named "MySharedVariableTestDetails" with the following code:
    shared StringVar mySharedVar;
    mySharedVar := mySharedVar + " Next ";
    Now create a thrid formula field named "MySharedVariableTestGroupFoot" with the following code:
    shared StringVar mySharedVar;
    mySharedVar;
    Insert the newly created formula fileds in your report as follows:
    MySharedVariableTestGroupHeader -> Group header section
    MySharedVariableTestDetails -> Details section
    MySharedVariableTestGroupFoot -> Group footer section
    Watch what is displayed in your group footer.
    I hope I am able to give you an idea about what you can do by using shared variables in Crystal Reports.
    Regards,
    Stratos

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

  • 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

  • SAP Crystal reports formula fields

    hi,
        how to use formula fields in crystal report.
                         thanks & regards,vinoth

    Hi Vinoth,
    That's a very vague question.
    You can create formulae via the Field Explorer > Formula option.
    After you save and close the formula editor, you need to drag and drop the formula on the report for it to execute.
    If you need help with a formula, please post the requirement.
    -Abhilash

  • Where is the Crystal Reports formula reference zip file?

    I am just getting started in Crystal Reports and I have seen a reference to cr8_formularef.zip. This file is supposedly contains all the functions and operators in Crystal Reports. But, when I do a search for it here, all I get is a reference in the Crystal reports for Visual Studio 2005, which then tells me to go search for this file at Business Objects web site!
    Ok, where is this file? I want to download it. Thank you

    If you go to http://help.sap.com/content/bobj/bobj/index.htm, you can download the CR 10 User's Guide/Online Help at http://help.sap.com/businessobject/product_guides/ce10/en/cr10_UserGde_en.zip - that should be compatible with VS2005.

  • Need help with Crystal Report Formula

    IF {GfCnSpSpBio.GfCnSpSpBio_Spouse_ID} > 0 and {GfCnBio.GfCnBio_Key_Indicator} = "I"
    Then
      {GfCnBio.GfCnBio_Title_1} + " & " +  {GfCnSpSpBio.GfCnSpSpBio_Title_1} + {GfCnBio.GfCnBio_Last_Name}
    else if {GfCnBio.GfCnBio_Key_Indicator} = "I" Then
    {GfCnBio.GfCnBio_Title_1} + {GfCnBio.GfCnBio_Last_Name};
    I am trying to code a salutation.  If the person is a individual and does nto have a spouse just put in Mr.Jackson.  if the person has a spouse put in
    Mr & Mrs Jackson.  When put this in my report.  I get a record with an individual who is not married and it still shows up as
    &Stirr.
    I am not sure what i am doing wrong in this code.

    i would probably add this to your formula
    ( IF {GfCnSpSpBio.GfCnSpSpBio_Spouse_ID} > 0 and {GfCnBio.GfCnBio_Key_Indicator} = "I"
    Then
    {GfCnBio.GfCnBio_Title_1} + " & " + {GfCnSpSpBio.GfCnSpSpBio_Title_1} + {GfCnBio.GfCnBio_Last_Name}
    else
    if {GfCnSpSpBio.GfCnSpSpBio_Spouse_ID} = 0 AND {GfCnBio.GfCnBio_Key_Indicator} = "I" Then
    {GfCnBio.GfCnBio_Title_1} + {GfCnBio.GfCnBio_Last_Name});
    see if that works for you

  • Using Crystal Reports formulas in Command Objects

    Post Author: Hamish
    CA Forum: Formula
    Is this possible?
    When I try and reference a formula in a command object
    something like
    select * from tablenamewhere id in (@testFormula)
    @testFormula prints out as 1,2 on the report if I remove the reference in the command object
    I get an error Incorrect syntax near @testFormula from SQL Server
    (I'm using CR XI and SQL Server 2005)

    Post Author: bryanflora
    CA Forum: Formula
    In a matter of fact, Formula is for you to calculate the result you get from DB.And if there's anything you want to pass to DB before you get result, it's Parameter.

  • Need SAP Crystal Report formula for Blance Quantity

    Hi,
         i really need a formula for SAP Crytal report my requirement is
        i have group 2 Groups  one on sale order and another one on Invoice
       Example:
            ================================================================
              Order No:100001 
             Order Quantity:1000
          =================================================================
          Detail Area invoice group
          INV#        INVQty   CreditNoQty        Balance
         10002       100               0                       900
         10003        500             100                    500   
           i need formula for balance quantity . the balance quantity subtract from order quantity and plus with credit note quantity.

    Try this:
    1) Modify the code above to:
    Whileprintingrecords;
    Numbervar x := x +1;
    If x = 1 then
    Numbervar t := ({Order qty} - Invqty) + {Credit};
    Else
    t := ({Order qty} - t) + {credit}
    2) Create a reset formula and place this on the group header 1:
    Whileprintingrecords;
    Numbervar x := 0;
    Numbervar t := 0;
    -Abhilash

Maybe you are looking for