How to get cumulative decreasing values by substracting from the previous row.... in a dynamic added

I have pdf table like this:-
Header 1
Header 2
Header 3
Header 4
Header 5
Header 6
Header 7
From
To
No. of Days
Balance
Date
1
2
<ADD Button> / <Del Button>
3
4
5
This
Row
is
730
to
be
hidden
DateFieldFrom
DateFieldTo
DateFieldTo-DateFieldFrom(Some No1.)
Remaining1=uppervalue(730)-Some No1.
Now when i click the <add  rows button>  rows are to be added and i have to get the valuesof Remaining2(Remaining1- Some No.2 )in the Added Balance Row
how will i do this?

Hi Luis,
According to your description, you have a report with different dynamic columns. Now what you want is show your user percentage growth in your matrix report after your user select two of those columns (I think you may use parameter to achieve your “checkbox”
function). Is my understanding correct?
In Reporting Service, we can’t calculate dynamic columns with our build-in arrogation functions. So we need to add custom code into our report, and call those functions which defined in custom code in our expression. We have tested your scenario in our local
environment. Here are steps and screenshots for your reference.
Go to your Report Properties, add the custom code below into your report:
Dim Shared Num1 As Double
Dim shared Num2 As Double
Public Function GetCalification(Calification as Double,Type as String,Type2 as String) 
If Type = Type2 Then
   Num1=Calification
Else
   Num2=Calification
End If 
Return Calification 
End Function
Public Function GetPec()
Return (Num2-Num1)/Num1
End function
Create a matrix. Put PilarName into Row field, put Period into Column field. In Data field, put the expression below into the textbox:
=Code.GetCalification(Fields!Calification.Value,Fields!Period.Value,Parameters!Period.Value(0))
In our sample report, we created a parameter (named Period) for selecting two columns. You can replace “Parameters!Period.Value(0)” with your own parameter.
Add an outside column at right (%Growth), put the expression below into the textbox:
=Code.GetPec()
Save and preview. The matrix and result looks like below:
Reference:
Custom Code and Assembly References in Expressions in Report Designer (SSRS)
If you have any question, please feel free to ask.
Best Regards,
Simon Hou

Similar Messages

  • I accidently closed my window with all my app tabs, now the only window that opens was a 2nd one I had open. How do I get back all my app tabs from the previous window, and why didn't it give me the usual warning you are closing more than one tab?

    I accidently closed the window with all my frequently used app tabs, now the only window that opens was an extra one I had opened. How do I get back all my app tabs from the previous window, and why didn't it give me the usual warning you are closing more than one tab? edit
    Details

    Then the (App) tabs from that window are lost unless you can restore an older copy of the sessionstore.js file (Time Machine?) that has that lost window.
    *http://kb.mozillazine.org/sessionstore.js

  • Java - Axis2: How to get an error code / error message from the Javascript via SOAP

    Hi
    In our Java applicsation we call a Javascript in a Indesign CS Server using the following code:
    --- SNIP BEGIN ---
    // calls the remote service on the indesign server
    try {
    // create service
    ServiceStub oIndsgnSrvStub = new
    ServiceStub(sIndesignServer);
    // create service parameter
    ServiceStub.RunScriptParameters
    oIndsgnSrvRSParams = new ServiceStub.RunScriptParameters();
    // create arguments with source- and target-file for parameter
    ServiceStub.IDSPScriptArg[] oIndsgnSrvSArgs = new ServiceStub.IDSPScriptArg[2];
    oIndsgnSrvSArgs[0] = new
    ServiceStub.IDSPScriptArg();
    oIndsgnSrvSArgs[0].setName("xml-input");
    oIndsgnSrvSArgs[0].setValue(sSourceFile);
    oIndsgnSrvSArgs[1] = new
    ServiceStub.IDSPScriptArg();
    oIndsgnSrvSArgs[1].setName("output-file");
    oIndsgnSrvSArgs[1].setValue(sTargetFile);
    // define service parameter
    oIndsgnSrvRSParams.setScriptArgs(oIndsgnSrvSArgs);
    oIndsgnSrvRSParams.setScriptFile(sScriptFile);
    oIndsgnSrvRSParams.setScriptLanguage("javascript");
    oIndsgnSrvRSParams.setScriptText("");
    // create runscript
    ServiceStub.RunScript oIndsgnSrvRS = new ServiceStub.RunScript();
    // set parameter
    oIndsgnSrvRS.setRunScriptParameters(oIndsgnSrvRSParams);
    //$$$ there should be an answer returned by the InddSrvr
    // execute SOAP call
    ServiceStub.RunScriptResult oIndsgnSrvRes = oIndsgnSrvStub.RunScript(oIndsgnSrvRS);
    if(oIndsgnSrvRes.getErrorNumber() == 0) {
    oServerProdJob.setProdState(CBP_Constant.REMOTEPRODUCTIONSTATE_SUCCESS);
    bOK = true;
    } else {
    oServerProdJob.setProdState(CBP_Constant.REMOTEPRODUCTIONSTATE_FAILURE);
    bOK = false;
    //$$$ should be set, if there is something returned by inddsrvr
    //oServerProdJob.setErrorMsg(sErrorMsg);
    } catch(Exception e) {
    sError += e.getMessage() + "\n";
    bOK = false;
    --- SNIP END -----
    The problem is that we don't get the error code and/or the error message from the Javascript in oIndsgnSrvRes. The error code is always 0 if I set an Integer value as return in the Javascript. If I set a String, there is an Exception in the Java application.
    Here is the Java script we use:
    --- SNIP BEGIN ---
    main();
    main()
    var sError = "";
    var sXMLInput = "";
    var sLayoutPath = "";
    // get the SDKCodeSnippetRunner object
    var cbpAdapter = app.cbpCbpadapterObject
    if (cbpAdapter) {
    sXMLInput=app.scriptArgs.get("xml-input");
    sLayoutOutputFile=app.scriptArgs.get("output-file");
    sError = cbpAdapter.doProcess(sXMLInput, sLayoutOutputFile);
    return sError; // This give an Exception; if I return an Integer the ScriptResult is always 0
    --- SNIP END -----
    If I try this with the test application from Adobe I get the error code correctly. But in the Java application, using SOAP, I can't get the error code.
    What could be wrong?
    Any ideas?
    Thanks a lot for the support.
    Kind regards
    Hans

    user11340104 wrote:
    Hello -
    i am calling sqlplus from a bash shell script. If the sql statement generates an error, how can I return that error code (unsuccessful) back to the bash shell?
    Well, let google be your friend,
    http://www.google.co.in/search?rlz=1C1GGLS_enIN327IN327&sourceid=chrome&ie=UTF-8&q=sqlplus+error+codes
    There are many threads I guess talking about the same issue.
    HTH
    Aman....

  • How to get status of a sub process from the parent process.

    Hi,
    I want to get the status of a subprocess from the parent process (i.e. success or failure).
    How can I get this.
    Thanks in advance.
    Bye

    have a look at the workflow built-in vars:
    WF_ACTION_ERROR and WF_ACTION_RESULT or WF_CASE_RESULT
    WilfredS

  • How to get a voice mail or recording (from the microphone) to repeat?

    I want tp know how to get a voice mail to repeat, once I have listened to it.  Same question for something I have recorded with the microphone.

    Tap the voice mail or recording you want to repeat.  It should start playing from the begining again.

  • How to get Table Field values during sync from Events like DbSyncProgressEventArgs.

    Hi,
    I am facing an issue related to Sync. During  Sync as some Tables fails to sync, entire Session gets rollback. 
    Through DbSyncProgressEventArgs or DbApplyingChangesEventArgs, DbChangesSelectedEventArgs or DbChangesAppliedEventArgs, events, i want to find the Field values from that table so that i can identify which raw failed.
    For example, for DbSyncProgressEventArgs, we can fetch table using  e.TableProgress.TableName. But how can i get fields or Primary key value of that table row which is inserted or updated or deleted.
    Please give suggestions on this. 
    Thanks,
    Sangeetha

    DbApplyingChangesEventArgs, DbChangesSelectedEventArgs  has Context property that has in turn
    has a Dataset property containing the change dataset being synched.

  • Grand total level of the percentage column giving value from the first row of column

    Hi Guys,
    I have a requirement like to show the percentage value which the calculation of two columns , in the grand total level .
    I think it can be achievaable by giving the aggregation rule for that column as Server complex Aggregate .
    eg.
    Fiscal Year  Department  subdepartment   Total cost     Sub Department cost     % cost
    2011           Edu             Books                 500              50                               10
    2011           Edu             Note Book           200            100                                50
    2011           Edu             Furniture             300             30                                 10
    2011            Edu                                      1000           180                              18
    Grand Total
    Ideally it should come like as above ..but the problem with me that ,it showing correct value for  all the rows ,but at the grand total level it's taking the value of % cost from the first row . like below..
    2011           Edu                                   1000                  180                         10
    Grand Total  
    I have calculated the % cost column in the answer itself  as (Sub Department cost /Total Cost )
    where the
    Aggregation rule for the columns given are
    Total Cost - Sum  ,Sub Dep Cost -  Sum, % Cost - Server Complex Aggregate
    So plz suggest me any Idea to achieve this ..Thanks in advance.

    Give the agg. as avg for % field.
    Best of Luck,
    Kashi

  • How to get a kerning value in JavaScript

    How to get a kerning value(distance between two characters) using javascript?

    @Raykor11:
    It would be best to move that question to scripting forum for InDesign.
    But one solution could be:
    1. Read out the property kerningValue from the insertion point between the two characters:
    //if two characters are selected:
    var _kerningValue = app.selection[0].insertionPoints[1].kerningValue;
    2. Measure the exact distance between the characters, so you can decide if you want to increase or decrease the distance
    //Two characters are selected:
    var _twoCharacters = app.selection[0];
    var _charLeft = _twoCharacters.characters[0];
    var _charRight = _twoCharacters.characters[1];
    var _temp1 = _charLeft.createOutlines(false) //false = does NOT delete original
    var _bounds1 = _temp1[0].visibleBounds;
    var _temp2 = _charRight.createOutlines(false) //false = does NOT delete original
    var _bounds2 = _temp2[0].visibleBounds;
    var _distance = _bounds2[1]-_bounds1[3];
    _temp1[0].remove();
    _temp2[0].remove();
    alert("Distance between: "+_distance);
    Be aware that there are a lot of other factors that will apply to character distance if you change the kerning value (like tracking, kerning method, composer, desiredGlyphScaling, desiredLetterSpacing, horizontalScale … just to mention a few), especially if the paragraph justification is set to JUSTIFIED or FULLY_JUSTIFIED.
    Uwe

  • How to get a value from the previous element (XSLT/XPATH gurus ahoy!)

    Hi All,
    I am building an RTF template for a "letter of reference"-report. Sometimes there are several rows in the data, that need to be printed as one. This is due to consecutive temporary contracts, which will be printed out as one period of service.
    Here's a simplified data example to illustrate the problem.
    <ROW>
    <START_DATE>01-01-1980</START_DATE>
    <END_DATE>01-01-1988</END_DATE>
    </ROW>
    <ROW>
    <START_DATE>01-01-1988</START_DATE>
    <END_DATE>01-01-1990</END_DATE>
    </ROW>
    <ROW>
    <START_DATE>01-01-2000</START_DATE>
    <END_DATE>01-01-2005</END_DATE>
    </ROW>
    With the data above, I should print two lines:
    01-01-1980 - 01-01-1990
    01-01-2000 - 01-01-2005
    I need to compare START_DATE of an element (except for the first one) with the END_DATE of the previous element, to find out whether to print the END_DATE for that element or not. How can I get that value from the previous element?
    Thanks & Regards, Matilda

    use this to get the following End_date
    <?following-sibling::../END_DATE?>
    Try this
    <?for-each:/ROOT/ROW?>
    ==================
    Current StartDate <?START_DATE?>
    Current End Date <?END_DATE?>
    Next Start Date <?following-sibling::ROW/END_DATE?>
    Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
    ================
    <?end for-each?>
    o/p
    ==================
    Current StartDate 01-01-1980
    Current End Date 01-01-1988
    Next Start Date 01-01-1990
    Previous End Date
    ================
    ==================
    Current StartDate 01-01-1988
    Current End Date 01-01-1990
    Next Start Date 01-01-2005
    Previous End Date 01-01-1988
    ================
    ==================
    Current StartDate 01-01-2000
    Current End Date 01-01-2005
    Next Start Date
    Previous End Date 01

  • How to get DocSet property values in a SharePoint library into a CSV file using Powershell

    Hi,
    How to get DocSet property values in a SharePoint library into a CSV file using Powershell?
    Any help would be greatly appreciated.
    Thank you.
    AA.

    Hi AOK,
    Would you please post your current script and the issue for more effcient support.
    In addition, to manage document set in sharepoint please refer to this script to start:
    ### Load SharePoint SnapIn
    2.if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null)
    3.{
    4. Add-PSSnapin Microsoft.SharePoint.PowerShell
    5.}
    6.### Load SharePoint Object Model
    7.[System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”)
    8.
    9.### Get web and list
    10.$web = Get-SPWeb http://myweb
    11.$list = $web.Lists["List with Document Sets"]
    12.
    13.### Get Document Set Content Type from list
    14.$cType = $list.ContentTypes["Document Set Content Type Name"]
    15.
    16.### Create Document Set Properties Hashtable
    17.[Hashtable]$docsetProperties = @{"DocumentSetDescription"="A Document Set"}
    18.$docsetProperties = @{"CustomColumn1"="Value 1"}
    19.$docsetProperties = @{"CustomColum2"="Value2"}
    20. ### Add all your Columns for your Document Set
    21.
    22.### Create new Document Set
    23.$newDocumentSet = [Microsoft.Office.DocumentManagement.DocumentSets.DocumentSet]::Create($list.RootFolder,"Document Set Title",$cType.Id,$docsetProperties)
    24.$web.Dispose()
    http://www.letssharepoint.com/2011/06/document-sets-und-powershell.html
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • How to get auto-increment value after insert on ACCESS db?

    When you insert a new record to a table with an auto-incrementing key, how do you find the value for the row you just inserted? This works differently with different databases. I know how it's done on ORACLE and mySql.
    How does it work with ACCESS through ODBC? How about MSSQL?

    I have discovered there's a LAST aggregate function which when I've tested it gets the just inserted auto-increment, but I'm not sure if it's reliable. You have to do:
    SELECT LAST(index-field) FROM table
    That ought to be faster than MAX, which I've noticed some people use. Persumable LAST will get the value from the last row in the table's natural order.
    In fact an auto-increment field has no business filling in missing slots since the main point is a a foreign key in other tables and a foreign key pointing to a deleted table row ought to be invalidated, not point to some unrelated successor record.
    I could use a separate table as a source of counters, of course, though that's one more call. In either case I'm worried about thread safety. In Oracle there are special sequence objects for this purpose which are incremented and read atomically. I'm not sure if the access driver transaction handling works adequately.
    Perhaps the safest approach might be to use a separate sequencer table and Java sychronisation to serialise access to each row in the sequencer table (assuming all the access is from the same app).

  • How to get Invoice status value in oracle payable

    Hi guys,
    I am new in oracle apps plz tell me how to get invoice status value of prepayment invoice type in payable.
    Navigation ->Payables->Oracle Payables ->Invoices->Inquiry->Invoices ->go to Invoice status block and open to Status LOV
    plz provide me sql query to find those status lov values and accounted values for any supplier & invoice num.
    it's urgent plz .......................
    Thanks guys.......

    The invoice approval status does not come from any table / lookup.
    Instead, Oracle builds it by calling the ap_invoices_pkg.get_approval_status function.
    You can also call it by passing invoice_id, payment_status_flag and invoice_type_lookup_code.
    All these 4 columns are present on the ap_invoices_all record.
    Hope this helps
    Sandeep Gandhi
    Independent Consultant

  • How to get lov display value dynamically for an item according to date pick

    Hi friends,
    I have a date picker item called on_date, and also one lov item course_name
    If i select one date from the date picker item means, automatically the course name corresponding to the date has to populate in the course_name item lov.
    suppose if i select the date (21-06-2011) from the date picker item means and if there are two courses available for the date in the table
    that is *) APEX *)OAF means, then the course_name item lov should show APEX and OAF in the select list.
    How to acheive it.
    I tried it in the way by creating a dynamic action for the date item
    True Action: set value
    Sql Expression:
    select course_name from xx_trg_course_detail where :P2_ON_DATE between effective_start_date and effective_end_datepage item to submit: P2_ON_DATE
    Affected element: P2_COURSE_NAME
    it is working if i kept the course_name item as a text field instead of LOV item.
    But i need to show the corresponding courses in the lov for the course_name item soon after selecting the particular date from the date picker.
    This is the LOV definition that i gave for the course_name item
    select course_name r, course_name d from xx_trg_course_detail where :P2_ON_DATE between effective_start_date and effective_end_datewhat is the problem over here.
    Thanks
    Regards,
    Mini
    Edited by: Mini on Jun 22, 2011 2:45 AM

    Hi friends,
    One of my batch mate corrected this problem, by setting
    cascading LOV parent item: P2_ON_DATE
    page items to submit       : P2_ON_DATE
    By specifying the date picker item name in the above fields for the item COURSE_NAME.
    Now if i select the date from the picker means, the lov item course_name is getting changed as it is showing only the courses of the respective dates.
    Thanks
    Regards,
    Mini

  • How to get text verable value

    how to get text verable value
    Scenaior
    IN a query designer ,I had create a formula, this formual use two selection ,and this formula description must use text variable ,
    this variable must get current system time and make a offset like+1 or +2,how can i do this I know SAP have stander text variable 0cmontht can get current system time ,but It is can not offset
    any one can help me
    regard
    wenlong

    Hi Wenlong,
    U can create a text variable of type 'user exit' and wirte code in backend to offset the value.
    Regards,
    Rathy

  • How to get STPOV structure values using BOM number and Plant number

    hello All,
    could you please help me out
    'How to get  STPOV structure values using BOM number and Plant number'
    is there any function module where can i give input as bom and plant number .
    waiting for your response.
    regards
    srinivas

    I did a quick where-used lookup in SE11 on the structure STPOV in function module interfaces and came up with the following:
    Function Module                             Short Description                                          
    CK_F_TOTALCOST_COMPUTE                                                                      
    CS_ALT_SELECT_COUPLED_PRODUCT                                                               
    CS_WHERE_USED_CLA                Bills of material; class use                               
    CS_WHERE_USED_CLA_ANY        Bills of material; direct class use or via other class     
    CS_WHERE_USED_CLA_VIA_CLA        Bills of material; class use via classes                   
    CS_WHERE_USED_COP                                                                           
    CS_WHERE_USED_DOC                Bills of material; document use                            
    CS_WHERE_USED_DOC_ANY:Bills of material; direct and (indirectly) document use via
    CS_WHERE_USED_DOC_VIA_CLA        Bills of material; document use via classes                
    CS_WHERE_USED_KNO                Bills of material; use object dependency                   
    CS_WHERE_USED_MAT                Bills of material; where-used list                         
    CS_WHERE_USED_MAT_ANY:Bills of material; where-used list as article or class item
    CS_WHERE_USED_MAT_VIA_CLA        Bills of material; where-used list via classes             
    EXIT_SAPMC29M_001                BOM; Article Where-Used List   
    It appears that this structure is primarily used for where-used look-ups for components within the BOM.  I don't know if any of these are what you're in need of.
    Hope this helps,
    Mark Schwendinger

Maybe you are looking for

  • When creating a fillable PDF form can I add a password to only selected fields?

    I am creating a fillable form which will require data entry from several different people before being returned to my office. There are certain fields on the form that need to be restricted to personnel in my office only. I have tried to accomplish t

  • Notes from My iPhone 4 (Running iOS 5.1.1) Sync as Blank Files in Mail on 10.6.8

    Hi. I have a perplexing problem that I have not seen discussed anywhere. With my iPhone 4, running iOS 5.1.1, syncing notes in Mail results in a stange blank Notes document appearing in the Notes sidebar in Mail. The Notes look like a yellow sheet of

  • Can't connect iPhone or iTouch to Windows 7 64-bit machine

    Has anybody had any luck installing all the iTunes software on a Windows 7 64-bit machine? iTunes and QuickTime install fine, but the AppleMobileDeviceSupport64.msi package will not install. I can paste the install log file if it will help, but I wan

  • 5800 won't connect to internet - help!

    My 5800XM has stopped connecting to the internet.  If I go to, say the Ovi Store, I get the frot page, but instead of going to the Store, it returns to the previous screen.  The same happens with other websites, too.  The phone usually asks how I wis

  • Custom datatypes in oracle

    hi, i need to know about custom datatypes in oracle? Where can i get that. Any good link which explains the topic??? Thanks, Noble