Calculation problem in report

Baseline date+ payment terms gives Net due date
Ex:-
Baseline data   Payment terms    Due date  
  13/12/06               45 days             28/01/07           
so how to calculate this in my report
Thanks
Priya

Priya,
   for this you should derive another date based on payment terms, right? Well, you can deal with this in cube level using a start routine I belive. Doing it at reporting level is a bit tedious. Its possible to show the diff between two dates in days in report simply using a function. Tryout displaying payment terms in date format. I think there is a function but I don't remember it ....just check it.

Similar Messages

  • Shared DateVar in Subreport and datediff calculation in Main Report?

    Hello experts,
    I am using CRXI sp2.  I have a report that contains two subreports for different dates in the same date field that are identified by a Service Code.  The subreports have been placed in the same group footer 1a to be displayed and the calculation resides in the main report group footer 1b.  The shared variables are as follows:
    whileprintingrecords;
    shared datevar Codedate5473;
    Codedate5473:={@Codedate5473};
    and
    whileprintingrecords;
    shared Datevar Codedate5623;
    Codedate5623:={@Codedate5623}
    The main report has the following calculation is in group footer 1a.
    Whileprintingrecords;
    Shared numbervar daysbetween;
    if (isnull({@Shared 5623})or isnull({@Shared 5473})) then 0
    else daysbetween:= datediff("d",{@Shared 5623},{@Shared 5473})
    This returns negative numbers as well as calculations where one of the shared variables is null.
    I reset the calculation in the report header as well.
    Thanks for your help in advance.
    Kevin

    Hi Kevin,
    I can reproduce your issue, As per my knowledge the crystal will make some issues in null value computation as well as  shared variable  computation
    In your report i can see , you tried to access values from subreport to main report through shared variable. that will make problem. we can access values from main report to subreport without any issue using shared..dont ask me the reason..i am not the right person to say that... lol.
    The another wrong thing  i was found in your formula is , you are not resetting the shared variable any where.. so once the date field is null, the shared variable returning the previous value.
    So this is the solution for you..
    1,You have to add one more subreport for displaying your result., Lets say 'Sub report3'
    and create a formula, like.(Same which you have write before for the result)
    shared datevar Codedate5473;
    shared Datevar Codedate5623;
    numbervar daysbetween;
    WhilePrintingRecords;
    daysbetween:= datediff("d",Codedate5473,Codedate5623);
    daysbetween;
    2, Re- write your first two formulas like this
    For Subreport1,
    WhilePrintingRecords;
    shared dateVar Codedate5473;
    if isnull({Codedate5473}) then
    Codedate5473:=date(0,0,0)
    else
    Codedate5473:=date({Codedate5473});
    For subreport2
    WhilePrintingRecords;
    shared dateVar Codedate5623;
    if isnull({Codedate5623}) then
    Codedate5623:=date(0,0,0)
    else
    Codedate5623:=date({Codedate5623});
    Hope this will works for you,
    Cheers,
    Salah.
    Edited by: salahudheen muhammed on Aug 7, 2009 1:05 PM

  • Calculations with Web Report results

    Hello, I'm just getting started with SAP BW and Web Reporting and that’s why I need some help. I have created a Web Report that shows the query results in a table. Now I want to make further calculations within the report. Therefore I have to access the results of the web report and I just don’t know how to do this. Maybe there are some javascript functions for that problem?

    A basic form of web report is to show the Bex report in Web table form, for that we assign the query to the table in the web table item.
    if further calculations need to be done using the already present keyfigures, then you can use the Calculated Key figure.
    Depending on the scenario you can also define the cell calculations, if you have structures both in the rows and columns.
    Refer to Web Table API to manipulate the cells of  the web table. This article using Web Table API could be helpful for you.
    Table interface doubt ?

  • Crystal reports- Calculation between two reports

    Hi Experts
    I have designed a sales and purchase transaction report using crystal reports and i have designed another report for accounting transactions like Excise Duty payable and receivables, Vat payable and receivables, Expenses(like EB, Maintenance) and so on. Finally I added accounting report as sub-report into First Report.
    My question is, is it possible to made some calculations between sub-report and main report.
    Hope some solutions from you.
    By
    Kala

    Hello,
    right upto the linking is good?
    Right now you have to create a formula (which you might have already done for "Total expenses", you just need to alternate it slightly.
    Example:
    On 2nd report (subreport) You might have a formula like given below.
    Instead of Numbervar CAvg, which is the last shown value in the below formula, you have to make it like Shared Numbervar CAvg.
    Whileprintingrecords;
    Numbervar TJs;
    Numbervar TotalJobs=0;
    Shared Numbervar CAvg;
    Shared Numbervar CAvg=0;
    TotalJobs := DistinctCount({lab_credits.credit_no},{lab_credits.reason_code}); 
    CAvg:= TotalJobs /{@WorkingDays};
    TJs:=TJs + CAvg;
    CAvg
    Do your calculation above.
    Now in the main report you will create another formula which will look like below.
    Whileprintingrecords;
    Shared Numbervar CAvg;
    Numbervar TAvg:=fieldname;
    Numbervar TotalBoth:= Shared Numbervar CAvg+ Numbervar TAvg;
    TotalBoth;
    You will have a reset formula which will be placed ontop of the report header , group header if you are using grouping like this
    Whileprintingrecords;
    Shared Numbervar CAvg:=0;
    SHared Numbervar TAvg:=0;
    bearing in mind that we do not have to declare CAvg field here as it is being shared.
    Hope this helps
    Regards
    Jehanzeb

  • Problem refreshing reports with params in the Interactive viewer from ASP

    I have a problem getting reports to refresh by clicking the Interactive Viewer's refresh button and reusing the supplied parameters. I am seeing this exact same problem on both V9.2 and 11.5 unmanaged RAS servers.
    I am using the following  function code to set the reports parameters:
    Public Sub PassParameter(param_index, param_value, param_is_multi,param_range_kind)
        Dim param_old ' parameter field in the report
        Dim param_new ' parameter field that will replace old parameter
    Dim paramValue ' discrete parameter value
    Dim aValues
    Dim rValues
    Dim iLoop
    Set param_old = clientDoc.DataDefinition.ParameterFields.Item(param_index)
    Set param_new = objFactory.CreateObject("CrystalReports.ParameterField";)
    If param_range_kind = 1 then
    Set paramValue = objFactory.CreateObject("CrystalReports.ParameterFieldDiscreteValue";)
    paramValue.Value = param_value
    else
    Set paramValue = objFactory.CreateObject("CrystalReports.ParameterFieldRangeValue";)
         rValues = split(param_value, "|")
    paramValue.BeginValue = rValues(0)
    paramValue.EndValue = rValues(1)
    paramValue.LowerBoundType = 2
    paramValue.UpperBoundType = 2
    end if
    param_old.CopyTo param_new
    if param_is_multi = 0 then
    param_new.CurrentValues.Add paramValue
    else
         aValues = split(param_value, ",")
       For iLoop = LBound(aValues) to UBound(aValues)
    param_new.CurrentValues.Add Trim(aValues(iLoop))
        Next
    end if
    clientDoc.DataDefController.ParameterFieldController.Modify param_old, param_new
        ' Clean up
        Set paramValue = Nothing
        Set param_new = Nothing
    End Sub
    and then redirecting to another ASP page to invoke the viewer (the report "clientDoc" object is passed to the viewer asp page a s a session variable). The code of the viewer page is:
    <%
    Response.ExpiresAbsolute = Now() - 1
    Response.Charset=";UTF-8"
    Dim clientDoc
    Set clientDoc = session("clientDoc")
    Dim ObjFactory, RptAppSession
    Set ObjFactory = CreateObject("CrystalReports.ObjectFactory";)
    Dim viewer
    Set viewer = ObjFactory.CreateObject("CrystalReports.CrystalReportInteractiveViewer";)
    viewer.PageTitle = "Interactive Report - " & Request("rptnam")
    viewer.IsOwnForm = true
    viewer.IsOwnPage = true
    viewer.HasRefreshButton = true
    viewer.EnableParameterPrompt = false
    viewer.ReuseParameterValuesOnRefresh ; = true
    viewer.HasExportButton = false
    ' viewer.HasPrintButton = false
    viewer.ReportSource = clientDoc.ReportSource
    Dim BooleanSearchControl
    Set BooleanSearchControl = ObjFactory.CreateObject("CrystalReports.BooleanSearchControl";)
    BooleanSearchControl.ReportDocument = clientDoc
    viewer.BooleanSearchControl = BooleanSearchControl
    viewer.ProcessHttpRequest Request, Response, Session
    %>
    If I set viewer.EnableParameterPrompt = false then I get an erro upon clicking the viewer's refresh button (error is: Missing parameter values. webReporting.dll error '8004100e' ), but if I set viewer.EnableParameterPrompt = true, then I get the automatically generated prompts appear but they are all empty. Either way, RAS doesn't remember the supplied parameters. I know the parameters are being read by RAS as the report's contents prove this fact, but they are not remembered after refreshing. If the automatically generated prompts are filled in and submitted, subsequent refreshes work correctly.
    How do I get the report viewer to reuse the parameters that have been set programmatically after a refresh? BTW, changing my implementation to anything other than using ASP against an unmanaged RAS server is not an option at this time.
    Thanks in advance!
    Dave.

    Hi Dave,
    I don't have a "nice" set of code lines but below hard codes one parameter name and value:
                ISCRParameterField newParameterField = new ParameterFieldClass();
                newParameterField.ParameterType = crParameterFieldTypeEnum.crParameterFieldTypeReportParameter;
                newParameterField.Name = "YourParamName"; // you can make a collection here
                newParameterField.ReportName = "";
                newParameterField.Type = CrFieldValueTypeEnum.crFieldValueTypeStringField;
                newParameterField.AllowMultiValue = true;
                newParameterField.AllowCustomCurrentValues = true;
                Fields parameterFields = reportClientDocument.DataDefinition.ParameterFields;
                ISCRField existingParameterField;
                RowsetMetaData rowsetMetaData = new RowsetMetaDataClass();
                Fields fields = new FieldsClass();
                ArrayList defaultValues = new ArrayList();
                reportClientDocument.DataDefController.ParameterFieldController.SetCurrentValue("", @"YourParamName", @"YourParamValue");
    Thanks again
    Don

  • Mailing Problem in Reports Writer 3.0 (URGENT)

    Hello,
    I 'm facing mailing problem in Reports Writer 3.0.
    All Reports files (.rep) are stored on NT Server(in a particular
    dir) and I have full permission (on that dir).
    After running the report, when I try to send mail then it gives
    the following error
    REP-4203: Error occurred while sending a mail message.
    REP-4221: Cannot access attachment file.
    So pls. suggest me.
    Thanks
    PSR
    null

    This is the wrong forum for reports issues - particularly for such an old version :-) However, you'll have to write a user exit to do that kind of stuff. And no don't ask me how, it was all too long ago, but there should be a section on that in your manual.

  • Problem in reports 6i  while using delimiter option.

    Hi,
    I am facing problem in report writer while using delimiter option.
    Report summary
    ==============
    In my report I am having two queries in data model and two different repeating frame for each in layout.
    These quires are called based on the user parameter. That means if user parameter is 1 then query 1 is called and the report is kick off and same for query 2 when user parameter is 2).
    Problem Encountered
    =================
    Both these reports are running fine while using pdf option to generate report .
    While using delimiter option only one of the query is able to generate report (based on which ever is created first and rest will give 0 byte file).
    I have also trapped it while using messages and it is logically flowing fine.
    I think report writer does not support such scenario.
    please expedite on this.
    thankx
    peyush

    Hi,
    There are no such limitations with Reports. If I understand properly, you run the Report twice, in each run, you are trying to execute different query, and you generate two dilimited Reports output files? This should work fine. Try out the latest Reports 6i patch-10 for this. You can even approach Oracle Support with your testcase. FYI, with Reports 6i patch-11, a new feature "dlimited data" is introduced which will give delimited output with a data dump i.e it would not be dependent upon the Reports layout. You can probably try out this new feature also.
    Thanks,
    Rohit Hi Rohit,
    Thanks for the information.
    well I am generating single output file on each run .
    the problem is somewhat funny.
    I have build query2 in data model after query1.
    query 1 is giving me correct output both in .PDF and delimiter version.
    But query2 is giving me 0 byte file for delimiter version although in .PDF it is running fine.
    When I took out query2 to another module it is running fine for both.
    I hope this make sense.
    Moreover if u still not clear about the problem and thinks that u can help me out please send me ur mail id so that I can send you the RDF copy.
    Thanks
    Mohit...

  • RAXINV - Strange problem in Report Builder

    I'm having a very wierd problem in Report builder 6.0.8.27.0. I'm simply trying to add two additional columns to the AR Invoice report (RAXINV) so that they get included in the XML output. This report has a main query called Q_INVOICE which is basically a dummy query to set the column aliases and at the end of the query it does a UNION with the user parameter &common_query.
    So, what I have done is gone into the common_query parameter and added the two extra dummy columns before the FROM statement (I've tried adding at different places but always the same result). Once that is done I've then gone into the Q_INVOICE query and added the same two columns. When I hit the OK button to update the query is when my problems start.
    There is a group in the report called G_ORDER_BY that has the field ORDER_BY in it. After clicking ok to update the query the G_ORDER_BY now has a field called BILL_CUST_NAME1, but the XML tag is still saying ORDER_BY. This happens to many fields in the report (the names are changed/corrupted) and as such the report is now useless as it won't compile.
    I have no idea why this would happen and I've never seen anything like this before.
    Can anyone provide any help on this ? I've logged an SR on this too but wanted to try here also incase someone had already crossed this problem.

    Dave,
    Not sure if its relevant or not, but I just fixed this issue, you need to change your query in three places, common_query parameter, build_query program unit and the main query itself in report editor.
    Cheers,
    Zeeshan

  • Sign problem in Report

    Hi Folks,
    I  have a problem in reporting.
    We are getting a data from flat file and loaded in to ICELIM cube and later that will pull into Managerial Consolidation Cube.
    P99T is account member and its ACCTYPE is EXP and its a parent member.
    We created a one report based on ICELIM cube its showing negative values for the member P99T. Created another report based on Managerial Consolidation Cube, Here the same member showing Positive values. 
    Can any one please let me know what is the problem is?
    I need Positive values in Both reports.
    Regards,
    G. Saida Reddy

    Hi vadim,
    Thank you for you response,
    Recently I take over this project, Previously one guy is handled all those things.
    But if "Descendants of P99T is Applicant count=EXP(ACCTYPE), FT=EXP(ACCTYPE), Applicant Rate= EXP(ACCTYPE)" then P99T is meaningless - how can you aggregate count, FT and rate????
    Can you please let me know the what is the exact point your are saying from above.
    we have positive signs for base members of  ICELIM and Managerial Consolidation.
    Now it is not possible to change moving data from ICELIM to Managerial Consolidation.
    can you please let me now the issue for sign in the report?
    Regards,
    G. Saida Reddy

  • Problem printing report

    I have a small problem printing reports which exist of 1 page.
    1st report is printed OK
    2nd one is bad
    3rd one is bad
    4rd one is bad
    5th is OK again... and so further.
    When I choose a different printer, all prints are OK. When I print from another PC on the same printer, all prints are OK.
    I assume some settings are disturbing the prints; can anyone suggest where I should take a look?

    are you using a dot matrix printer or a laser printer?

  • How to give the calculation in Finacial report templates asper indian local

    Dear experts
    help me, how to give calculation in Financail report Templates in SAP b1 for calculating  Gross profit and Netprofit seperately.  I am facing some error while giving formula in financial report templates.
    Thanks
    Regards

    Hi Mathiladath,
    Try this,
    ->> Financials. -> Financial Report Templates in that follow this steps.
    1.Report. -> Choose (Profit and Loss)
    2.Template.-> Define New -> Give the name for template.
    3.And click the Generate Chart of account button in bottom right.
    4.put the Tick mark in Subtotal Check box
    5.now u can see Formula button (Click and Open the Formula Definition window and put the Formula)
    using this button create appropriate formula for your requirement(ask help your A/C department)
    6.Chose this template in P/L.
    Regards,
    Madhan.

  • Mathematics calculation in Webi Report using "For Each"

    Hi All,
    I am using BOXI R3.0, I am stuck in webi calculation for one report report tab. I have 2 tab in one report, one is summary and other is Detail in same report. In Detail tab the data looks like as below:
    DataSet 1:
    DNo.-Date-Hours-Vol-Pri---Tot(Vol*Pri)
    10 -1/12- 01:00---10 ---10 ---100
    10 -1/12- 02:00---20 ---50 ---1000
    10 -1/12- 03:00---30 ---30 ---900
    Sum: 2000
    Now the above is my detail reprot which gave me data by hour, now in summary i removed the hour column then data looks like below:
    Dataset 2:
    DNo.-Date-Vol----Tot(Vol*Pri)
    10 -1/12- 60 -
    1800
    This is because "Vol" measure is sum in universe and Pri is Average.
    This gave me wrong data so How i calculate Tot for Sumarry tab such that it will give me below result.
    Dataset:
    DNo.-Date-Vol---Tot(Vol*Pri)
    10 -1/12- 60 ---2000
    Thanks for the help in advance.
    Thanks,
    Nimesh.

    Hi Nimesh,
    I think you need to wrap a sum around the function and use an input context.
    =(Sum([Pri] In ([DNo]; [Date]; [Year])))*[Vol]
    This will sum the average values down at the year level and multiply it by vol, even though year is not on the table.
    Let me know how you get on
    Regards
    Alan

  • Create calculation in webi report

    Hi
    I need calculate in a report like below.
    For example report as below.
    Region          revenue
    North             200
    South            390
    Total
    east               100
    west                 50
    Total
    Grand Total
    Reg above i have two questions
    1)How can i do the calculation for this report?
    2)I need to add any free hand cells for TOTAL rows in report?
    Please advide.
    Best Regards,
    Abhii

    Hi Abhi,
    Simple Way : Break the table by Region and apply Sum Aggregation on qty. you will have a display like this
    Region    revenue
    North      200
    Sum        200
    South     390
    Sum       390
    east    100
    Sum     100
    west     50
    Sum     50
    Sum   740 ( Grand Total)
    Other Way: Create a new report variable ,apply break on Region_num & use Sum Aggregation on Qty.
    Output will be like this
    Region_num    Region     Revenue
    Region 1         North        200
    ..............South       390
    Sum............... 590
    Region 2          East         100
    ..............West          50
    Sum...............150
    Sum................740 (Grand Total) 
    Regards
    Sunil
    Edited by: sunilkumar.k on Mar 5, 2012 4:21 AM

  • Problem running reports

    I finally configured and was able to start the reports server on my Solaris box. The listener is running. When I run a report, either by command line using rwrun60 or from a form using RUN_REPORT_PRODUCT, the report kicks off without error but will not finish. I have to kill the process, and no output results. I had no problems when running from NT, so I'd bet the problem is in the configuration not the report itself. Any ideas?

    I'm still working this problem.
    I have a printer configured, and have no problem generating report in character mode and send directly to printer.
    I did have to add localhost access to Xwindows with
    $ xhost +localhost
    Now I have valid display value.
    Unfortunately, still having the same problem. rwrun60 kicks off, but gets hung. I have no problems running forms on the this server. Any other ideas?

  • Which tables are used for Quality Efficiency calculation of OEE report ?

    Hello,
    We're confirming OEE report behavior.
    I'd like to know OEE report and ME table specification.
    Which tables are used for Quality Efficiency calculation of OEE report ?
    According to I know, the definition of Quality Efficiency is (complete qty) / (start qty).
    For this calculation, does OEE report just use qty_started and qty_completed of PRODUCTION_LOG table?
    If any other tables/columns/logic are implemented, your information is appreciated.
    Best Regards,
    Takahiro Uesugi

    hi
    Go to BSIS & BSAS
    BKPF
    SKA1
    SKAT
    SKB1
    Regards
    Roobal

Maybe you are looking for

  • Restoring files from Time Machine after installing Maverick

    I have an older MacBook Pro and while installing Maverick my aged hard drive gave out. I got a new hard drive installed by an authorized Mac dealer and now I'm trying to restore files from Time Machine. I haven't done anything at all yet with Maveric

  • ? specify position for target=_blank

    Greetings, I am working with DW3 and trying to remember after many years how to specify where a new window opens so it does not cover the original refering browser window. Any help would be appreciated! Thanks. Michael

  • I am creating a christmas card, want to put a photo credit on back anyone know how

    I am creating a Christmas card on iPhoto.  I want to replace the apple logo on back with a photo credit.  Does anyone know how or if that can be done

  • Get error every time I try to print a report.

    Keep trying to print a report and it tells me an error occurred. I have restarted the service and server with no luck.  This topic first appeared in the Spiceworks Community

  • Ruby and Mysql and Nmap

    I am trying to create a table name in a mysql database using ruby scripts. The name of the table should be the current date. this is how i tried to do it, but didnt work: in the ruby code: TOS = Time.now.localtime.strftime("%Y-%m-%d_#{Time.now.hour}: