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.

Similar Messages

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

  • Crystal Report Windows Forms Viewer Error in 1 Workstation after upgrade of PL

    Hi all,
    We just upgraded SAP from 8.82 PL02 to 8.82 PL15.
    Afterwards, in just 1 workstation, Crystal Reports layouts have Crystal Report Windows Forms Viewer error I attach.
    Before the upgrade this error did not happen.
    No permissions or authorizations were changed  in the workstation.
    The Crystal Reports layouts remain working fine in server and in the other workstations.
    In the workstation following are installed:
    - Operating System Windows 7;
    - Microsoft .NET Framework 4.5;
    - SAP Crystal Reports runtime engine for. NET Framework;
    - Crystal Report 2008 Runtime SP6;
    - Microsoft SQL Server 2008 R2 Native Client.
    All, but the operating system, are equal to the other workstations.
    User has edit access to SAP folders, temp and access to the attach path.
    We already uninstalled SAP client and client agent and re-installed it but with no avail.
    Can anyone help me?
    Thanks in advance.
    Best regards,
    Pedro Mariano

    Hi San Xu,
    Thank you for your input.
    However I'm facing problem with each software is suitable.
    I installed SAP Crystal Reports for SAP Business One (CR 2011 V14.0.4.738), but with no avail.
    Thanks in advance.
    Best regards,
    Pedro Mariano

  • 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 Windows Forms Viewer problems - table could not be found

    Hi,
    I installed Crystal Report Viewer in SAP Business One 2007. All the while, I can run the reports without any problem. but when I loaded some of the new report, it gives me the following error message:
    the caption says: "Crystal Reports Windows Forms Viewer"
    the message says: "The table 'paymentVoucher' could not be found.
    Error in file C:\...paymentVoucher.rpt. The table could not be found."
    By the way, I can run the report in another workstation.
    Any help or ideas of why this is happening or how to solve this will be greatly appreciated.
    Thanks in advance.

    The report is not created by me. I just help others to transfer the report from one workstation to another workstation. PaymentVoucher is a view in the database and it is being put at a workstation that can be shared by everyone.
    I've go through other forums and found out that it might be permission issues and now managed to solve the problem already.
    Thanks everyone for the advice.

  • 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 Reports Active X Viewer 64-Bit

    Hi All,
    I am searching for some information regarding support of the Crystal Reports Active X viewer with 64-Bit Internet Explorer (version 8)
    We use Cyrstal Report 9, 10, 11 and 11.5 on our clients servers and have no issues with the 32 bit version of Internet Explorer (including on 64-bit operating systems). We have one client attempting to use 64 bit Internet Explorer 8 but this is not showing any reports.
    Even when having manually installed the Active X dll's it still does not work.
    Can someone advise if this set up is possible/supported?
    As I understand it, it is not possible.
    Regards
    Matthew Haines

    Hello,
    All of those versions are 32 bit only and I doubt 64 bit IE will support 32 bit ActiveX controls. No solution for you.
    Possibly moving to CR For VS 2010 and the Cr .NET assemblies may work.
    64 bit IE is not very stable and not many people use it. I suggest you recommend staying away from it at this time. Or at lease CR doesn't like it either.
    Good luck
    Don

  • Crystal Reports and SAP BW Connectivity for OLAP

    Hello,
    Anybody created Crystal reports off SAP BW Infocubes? For some reason I am not able to create or configure BW sever connection. I installed Crystal reports and SAP enhance cd for OLAP.
    Thanks
    Tom

    Hello,
    I was able to connect and create Crystal report based on Bex query..no connection problem there. But, reporting directly off infocubes, the server type "SAP Business Information Warehouse"(add server option in OLAP connection Browser) not showing up in list of values.
    1. I released Info query for PLE DB for OLAP as per 
       user's guide.
    2. The manual says you have to configure SAP BW server  
       log on? For Bex query(Crystal) all available servers
       automatically available
    Thanks

  • 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

  • What varaible is best to use for current fiscal year.

    Hello all,
    I have few restricted key figures which need to be reported as "for current fiscal year" so which ios the best variable we can use for that.In the filter area I have fiscal year variant and comp code do I have to give users the input ready for fiscal year?
    Also then i need comparison between current and previous year for same RKF so I plan to offset the varaible by "-1" .
    Thanks

    It works for me Bhanu. Last I used that it gave me errors so was not sure.
    for YTD i dont see any variable in fiscal year am I looking at wrong place.
    can you suggest something
    Thanks

  • Year To Date for Current Fiscal Year

    Hi All,
    I have installed BC variable Year To Date for Current Fiscal Year 0I_CFYTD..
    foloowing error occurs
    Variable 0I_CFYTD could not be replaced..
    Do i need to write any code or Please help.....

    Hi,
    Please check if fiscal year variant is used in the filter. Else the BC variable throws an error. Drag fiscal year variant to the filter area and set a value or variable input for the same.
    Regards,
    Satya

  • Giving error while creating a sales contact for the previous year (2008)

    Hi Friends,
    We are currently with SP12. When we try to create a sales contract for the previous year it is giving error like "Schedule line is for the item 100 cannot be after the order's latest delivery date".
    i tried debugging and found that that there is a rule created for this (in SP12). I commented the rule and tried to create a contract but, again got an error "Error while saving". This error I can't catch while debugging.
    I even didn't find where the schedule line date and header cancel dates are set so that I can change the dates manually.
    If any one has any idea, kindly help me.
    Best regards,
    Swarna Seeta

    Hi Wolfhard,
    Thanks for the reply.
    You are right and I have uncommented the line which assigns true to the return value and the contract got saved now.
    Thank you so much.
    I just want to know whether commeting this rule effects any of the functionalities of the sales contract.
    Best regards,
    Swarna Seeta

  • Cannot save Crystal report layout or view new layout of report

    I am trying to make a change to a system crystal report (cust. recievables detailed aging). I had to make the date feild a little wider, so I edited the "system layout" that came with SAP (in my test DB of course), and I go to add-ins>sap business one>save. I get the following error "current user has no permissions for this operation". I am logged in as a superuser and full perm.
    If I "save-as" and save it to a layout in sap....when I go to open the aging with my newly created layout it freezes and asks for DB logon info to connect to my server from crystal. I do not normally have to do this when I preview my reports in the out of the box layouts. WHat am I doing wrong? I am new to crystal.

    The system will not allow me to export the system crystal report....it is grayed out, and it IS a crystal report. HOwever I can open it in crystal, then save it to my desktop, then from INSIDE of SAP in the report and layout manager I import the crystal report I made the changes to from my desktop into SAP and it saves and imports no problems. However when I go to view the report (and this is only the ones I import), it prompts me with the db login for our server to connect, and it is only with that report, once I enter sa credentials it is fine and shows up from there on in, but not if I log out of SAP and back in...then I have to put in my credentials again. Is this something having to do with the report when I make changes to it? I cant have users entering login info each time they run the new aging details report. Please advise what I may be doing wrong when I make changes to a crystal report. It was a very minor change....just moved a feild width.

  • Crystal Report Windows Forms Viewer error: "The field name is not known"

    Hi,
    My report runs fine in the Crystal Reports viewer.  When we try to view the crystal report through a piece of 3rd party software, I start to get errors in a few of my formulas indicating that "the field name is not known".  I can clearly see that the field is in my crystal report.  Has anyone else had this problem?  Any ideas on what might be happening?
    Thank you.

    Just to provide some further clarification on my problem:
    The "field name is not known" error seems to be occurring only in a few formulas where I have a statement like this:
    if ISNULL({somefieldfromdatabase}) Then
    I've used this for many other formulas and not had an issue with them.  I've verified that the database and the stored procedure contain this field.

Maybe you are looking for

  • How to delete one invoice document in FI module!

    Hi all, Does anybody know the T-code to delete a invoice document in FI module. Thanks in advance! Best regards, Wendong Feng

  • Adobe Reader new challenges... the tool is becoming obsolete?

    Hello everybody. Im a big fan of the Adobe Reader. I use it a lot in my daily work. But im very worried.With the new plataforms (iphone, android, google chrome...) the Reader functionality get worse. Works ok and fine in windows & IE, but not in the

  • Error occured while writing cube data

    Hi all, I was working around with the manage ownership section. When i tried to change [PCON] or [POWN] values and save it, I get an error message saying "Error occurred while writing cube data". After doing some googling I found out that this was be

  • Refresh of report hides jQuery calendar popup anchors

    In an attempt to build an interactive tabular form in Oracle Apex 4.0.2.00.07, we have based an interactive report on a query containing: SELECT ...      , apex_item.date_popup2( p_idx              => 11                             , p_value         

  • Multiple copies in contacts

    Whenever I sync my iPhone to my iMac and it syncs contacts, I find that after syncing I have one additional copy of each contact after each sync. I have synced at least 10 times, and have as many copies on my iPhone.