Clearing in previous year

Hi there
I have an issue in resetting (using FBRA) clearing GL document which belongs to 2007. This clearing doc has few line items, which were generated while clearing other GL docs .
While I thought it might be due to a closed period, I tested in my Quality system and I could reset clearing documents(which has no line items)  for last year(opened posting periods). In the same Quality system I am NOT able to reset few clearing documents, and the error is "System lock error: Inform system administrator" Message no. F5288.
Can any body through advice on this issue.
Many thanks in advance
MSJ
Edited by: MSJ on Sep 24, 2008 4:45 PM

Go through the OSS note 13907 and ask your basis team to look into the issue:
Reason and Prerequisites
The lock table has overflowed.
Cause 1: Dimensions of the lock table are too small
Cause 2: The update lags far behind or has shut down completely, so that the lock entries of the update requests that are not yet updated cause the lock table to overflow.
Cause 3: Poor design of the application programs. A lock is issued for each object in an application program, for example a collective run with many objects.
Solution
Determine the cause:
SM12 -> Goto -> Diagnosis (old)
SM12 -> Extras -> Diagnosis (new)
    checks the effectiveness of the lock management
SM12 -> Goto -> Diagnosis in update (old)
SM12 -> Extras -> Diagnosis in update (new)
    checks the effectiveness of the lock management in conjunction with updates
SM12 -> OkCode TEST -> Error handling -> Statistics (old, only in the enqueue server)
SM12 -> Extras -> Statistics (new)
    shows the statistics of the lock management, including the previous maximum fill levels (peak usage) of the partial tables in the lock table
If the owner table overflows, cause 2 generally applies.
In the alert monitor (RZ20), an overrunning of the (customizable) high-water marks is detected and displayed as an alert reason.
The size of the lock table can be set with the profile parameter "enque/table_size =<size>". <size> specifies the size of the lock table in kilobytes. The setting must be made in the profile of the enqueue server ( ..._DVEBM.. ). The change only takes effect after the restart of the enqueue server.
The default size is 500 KB in the Rel 3.1x implementation of the enqueue table. The resulting sizes for the individual tables are:
Owner table: approx 560.
Name table:  approx 560.
Entry table: approx 2240.
As of Rel 4.xx the new implementation of the lock table takes effect.
It can also be activated as described in note 75144 for the 3.1I kernel. The default size is 2000 KB. The resulting sizes for the individual tables are:
Owner table: approx 5400
Name table:  approx 5400
Entry table: approx 5400
Example: with the
"enque/table_size =32000" profile parameter, the size of the enqueue table is set to 32000 KB. The tables can then have approx 40,000 entries.
Note that the above sizes and numbers depend on various factors such as the kernel release, patch number, platform, address length (32/64-bit), and character width (Ascii/Unicode). Use the statistics display in SM12 to check the actual capacity of the lock table.
If cause 2 applies, an enlargement of the lock table only delays the overflow of the lock table, but it cannot generally be avoided.
In this case you need to eliminate the update shutdown or accelerate the throughput of the update program using more update processes. Using CCMS (operation modes, see training BC120) the category of work processes can be switched at runtime, for example an interactive work process can be converted temporarily into an update process, to temporarily increase the throughput of the update.
For cause 3, you should consider a tuning of the task function. Instead of issuing a large number of individual locks, it may be better to use generic locks (wildcard) to block a complete subarea. This will also allow you to considerably improve the performance.

Similar Messages

  • Reset previous year cleared item

    Dear experts,
    i am trying to reset previous year vendor cleared document in transaction FBRA.
    while doing system is giving message "Archiving has not finished"
    message no:F5682.
    is there any transaction code is there to reset previous year cleared item?
    we are using ECC 5.0 version.
    Regards
    babu..

    Dear Babu,
               The error message F5 682 is raised due to the check described                   
    in note 210134. Due to program design this check is also done for a                        
    'planned' archiving job, not only for actual 'running' archiving job,                      
    as a 'planned' archiving job could be running the next month, and then                     
    cause inconsistencies if for a document that is selected in this archive                   
    run, the clearing is reversed on the same time.                                                                               
    As assuring data consistency in archiving has a very high priority this                    
    check on 'planed' archiving jobs is done and is not planed to be                           
    changed in future.                                                                               
    Solution:                                                                               
    Follow recommendations of note 210134, and check your live Customizing                     
    in table T070 and T071 via Transaction OBR7/OBR8.                                          
    Only with regard to the life do potentially archivable documents                           
    cause problems for the resetting of cleared items.                                                                               
    Also, as you may known, please check that there are no invalid /                           
    incomplete archiving sessions within your system via SARA -> Management.                                                                               
    Within transaction SARA (archiving object FI_DOCUMNT) you have to press                    
    the 'Managment' button to see the status of the different archiving runs                   
    . Making a click on the incomplete archiving session you get a popup,                      
    where you can mark the flag 'Invalid session'.                                                                               
    By marking this field you are declaring the contents of this archive                       
    file as invalid. Therefore the archive can no longer be interpreted. The                   
    archiving session can no longer be chosen for subsequent processes such                    
    as Read, Delete etc.                                                                               
    OR                                                                               
    Delete the archive jobs that are scheduled to run.                                         
    I hope this helps.
    Mauri

  • How to use previous year keyfigure data in current year for other keyfig

    Hi Expert,
    I have 1 requirement wherein I need to use previous year data for some keyfigure calculation.
    Details are as follows:
    I have designed query with CKFs Turnover & UVG (in rows) & Fiscal year period in columns.
    Suppose Keyfigure Turnover data is displayed from Apr2009 to Mar 2011. In UVG: for Apr 2010, i need Turover data of month Apr 2009, for May 2010 turnover data of May 2009 similarly for other months.
    As per my understanding, I need to use customer exit which will store kf turnover data in internal table & in turn it will be used for UVG.
    But I'm not able to put it into syntax.
    Kindly suggest your inputs in this scenario.
    Thanks,
    Shamkant

    Hi
    Note that the variable ZCALCCALMTH is exit type and variable ZCALMTHREF is ready for input.
    WHEN 'ZCALCCALMTH'.
    IF i_step = 2. "après le popup
    READ TABLE i_t_var_range INTO loc_var_range WITH KEY vnam = 'ZCALMTHREF'.
    IF sy-subrc = 0.
    CLEAR l_s_range.
    year1(4) = loc_var_range-low(4).
    year1(4) = zyear1(4) - 1.
    zmonth1(2) = loc_var_range-low+4(2).
    CONCATENATE zyear1(4) zmonth1(2) INTO loc_var_range-low(6).
    zyear2(4) = loc_var_range-high(4).
    zyear2(4) = zyear2(4) - 1.
    zmonth2(2) = loc_var_range-high+4(2).
    CONCATENATE zyear2(4) zmonth2(2) INTO loc_var_range-high(6).
    l_s_range-low = loc_var_range-low(6).
    l_s_range-high = loc_var_range-high(6).
    l_s_range-sign = 'I'.
    l_s_range-opt = 'BT'.
    APPEND l_s_range TO e_t_range.
    ENDIF.
    ENDIF.
    bye
    Boujema

  • How to populate the data or details of only the present year and the previous year with respect to the given RATNG?

    Hi All,
    I have created a form with 5 blocks (namely ENQACMHDR, ENQACMDTL, ENQACEHDR, ENQACEDTL, ENQACSPEC), where i have 8 push buttons (namely ENTER_QUERY, EXEC_QUERY, CLEAR, FIRST, NEXT, PREVIOUS, LAST & EXIT).
    This form is created just for viewing purpose only. So after I execute, all the blocks have been blocked against insert & update.
    I query on 2 fields that is 'ENQNO' and 'RATNG' (Both the fields belong to the block ENQACMDTL).
    When I click on 'EXEC_QUERY' directly, all the data of all the years populates.
    But the user wanted the data to be populated from only the present year and the previous year.
    So , on 'WHERE Clause' of the property_palette of 'ENQACMDTL' block , I put in the following condition:
    SUBSTR(ENQACMDTL.ENQNO, 1,4)=TO_CHAR( ADD_MONTHS(SYSDATE,-12) , 'YYYY') OR SUBSTR(ENQACMDTL.ENQNO, 1,4)=TO_CHAR(SYSDATE, 'YYYY')
    PROPERTY PALETTE (ENQACMDTL block)
    WHERE Clause
    SUBSTR(ENQACMDTL.ENQNO, 1,4)=TO_CHAR( ADD_MONTHS(SYSDATE,-12) , 'YYYY') OR SUBSTR(ENQACMDTL.ENQNO, 1,4)=TO_CHAR(SYSDATE, 'YYYY')
    Now the data of only the present year and the previous year is being populated. Its ok with the field of 'ENQNO'.
    The problem is when i query on field 'RATNG' . 'RATNG' is a Text_item with Number of Items displayed=5. (5 rows)
    The following are 2 columns of a Table (Name=ENQACMDTL) in Database.
    ENQNO
    RATNG
    2013900054
    500KC2
    2013900047
    800KC4
    2013520018
    750KC6
    2012900037
    1000KC2
    2012520109
    500KC2
    2012140019
    750KC6
    2011540036
    500KC2
    2011100030
    1000KC2
    2006100007
    90KD8
    2006750014
    750KC6
    2006900072
    500KC2
    The first 4 numbers of 'ENQNO' denotes the year. There are more than a lakhs of records.
    So when i query on the field 'RATNG',
    Example:For RATNG=500KC2;
    I click on ENTER_QUERY, On the field of 'RATNG' , i put in the value 500KC2 and click on  EXEC_QUERY; Details with respect to 500KC2 is displayed as well as all the other unwanted RATNG like 750KC6, 1000KC2 (which belongs to the ENQNO of the present year and the previous year) also gets displayed.
    I want details of only RATNG (500KC2) to be displayed, but only of the present year and the previous year, that is 2013900054, 2012520109 (ENQNO).
    Other than 500KC2 RATNG, no other RATNG must be displayed.
    The RATNG=500KC2 is also present for ENQNO=2011540036 , 2006900072. But I dont want these to be displayed.
    I want only the data or details of the present year and the previous year to be displayed or populated with respect to the given RATNG.
    Can You Help me or tell me what do i do for this?
    Hope I'm clear with my question!!
    If my question is not clear, let me know plz.
    Thank You.
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    Oracle forms 6i.

    On key-exeqry you have to program.  Delete all other trigger codings for checking your condition.
    It dint work on key-exeqry.
    I tried key-exeqry on form trigger, block (enqacmdtl) and also on field(:enqacmdtl.enqno) , but none of them worked.
    It did not display the message.
    I have a 'PUSH-BUTTON:EXEC_QUERY.
    For EXEC_QUERY, Trigger : WHEN_BUTTON_PRESSED;
    I added the following code:
    if to_number(substr(:enqacmdtl.enqno,1,4))<to_number(to_char(add_months(sysdate,-12),'YYYY')) then
         message('The Rating is not present for the present year and the previous year');message(' ',no_acknowledge);
         raise form_trigger_failure;
    else
         execute_query;
    end if;
    It is working fine and the message is being displayed.
    But again I have a new problem and that is;
    On the field :enqacmdtl.enqno, when i enter the '2013%' and press 'EXEC_QUERY', it works fine.
    but when i enter '2006%' and press 'EXEC_QUERY', it shows the following error
    FRM-50016: Legal characters are 0-9 - +E. It does not display the message also.
    but when i enter the complete number, '2006580002', then it works fine , that is it displays the message (The Rating is not present for the present year and the previous year).
    The problem is because of '%', only when i put in the restricted data (which does not satisfy where condition).
    How do i solve this?
    Thank You Priyasagi.

  • Custom Exit for determining previous-year time range

    Dear all:
    I have a problem about custom exit:
    We have created a new object for combining Fiscal Year/Month and Period. So the format will be shown as " yyyymmp"
    now we have one requirement which is determining the same period but previous year based on user input. For Example, if user input start and end period as
    "2006041" and "2006111". There are should be 2 custom exit which are able to convert the user input to be "2005041" and "2005111". We created 2 custom exit for telling the previous-year period.
    Then based on this converted time range, we should be able to extract applicable data. But after testing, we cant get supposing result. The code is following:
    We will be very grateful for any input. thank you all so much
    Calculate (Start)previous year/month/period by current
    *year/month/period
    *user-entry calendar year/month/period
    WHEN 'ZFACLV19'.
          LOOP AT i_t_var_range INTO loc_var_range
          WHERE vnam = 'ZFACYMP1'.
            CLEAR l_s_range.
            LOC_YEAR = LOC_VAR_RANGE-LOW(4).
            LOC_MONTH = LOC_VAR_RANGE-LOW+4(2).
              LOC_YEAR = LOC_YEAR - 1.
            L_S_RANGE-LOW(4) = LOC_YEAR.
            L_S_RANGE-LOW+4(2) = LOC_MONTH.
            L_S_RANGE-LOW6(1) = LOC_VAR_RANGE-LOW6(1).
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            APPEND l_s_range TO e_t_range.
            EXIT.
          ENDLOOP.
    Calculate (End)previous year/month/period by current
    *year/month/period
    *user-entry calendar year/month/period
    WHEN 'ZFACLV20'.
    break ab_william.
          LOOP AT i_t_var_range INTO loc_var_range
          WHERE vnam = 'ZFACYMP2'.
            CLEAR l_s_range.
            LOC_YEAR = LOC_VAR_RANGE-LOW(4).
            LOC_MONTH = LOC_VAR_RANGE-LOW+4(2).
              LOC_YEAR = LOC_YEAR - 1.
            L_S_RANGE-LOW(4) = LOC_YEAR.
            L_S_RANGE-LOW+4(2) = LOC_MONTH.
            L_S_RANGE-LOW6(1) = LOC_VAR_RANGE-LOW6(1).
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            APPEND l_s_range TO e_t_range.
            EXIT.
          ENDLOOP.
    SzuFen

    Hi,
    Try with following modifications:
    ZYEAR1(4) = LOC_VAR_RANGE-LOW(4).
    ZYEAR1(4) = ZYEAR1(4)- 1.
    ZMONTH1(2) = LOC_VAR_RANGE-LOW+4(2).
    CONCATENATE ZYEAR1(4) ZMONTH1(2) INTO LOC_VAR_RANGE-LOW(6).
    With rgds,
    Anil Kumar Sharma .P

  • Reporting with Time Variance (previous year vs current year)

    Good day all.
    I would like to ask for advice and help in terms of best way to make this report work:
    Let's say I need to show the % variance between the Total Operating Costs per Gross sqft over different times periods (Previous year to Current Year). The trick is that data must be compared to the same data in the previous year, i.e. if we are in June of current fiscal year, the comparison must be between Oct-June of current fiscal year to Oct-June of previous fiscal year, not the full previous year. The report formula itself would be:
    ([TCO Exp/GSF PY] - [TCO Exp/GSF CY]) / [TCO Exp/GSF PY] * 100
    My guess, I could define a static variable Current Year which developers would have to be changed every year. And then create logical columns: TCO Exp PY (where year=Current Year-1)...while writing this, I realized I'm wrong and there must be a more efficient way to do this. UPD: I've also thought about time-series function AGO, but I'm currently testing it, and I'm not happy with its performance...
    Thank you in advance...
    Message was edited by:
    wildmight

    Hi Wildmight,
    The current value will be the value you will select from the table like you normally would do. These would be values per month if I am correct. Next to the column with the current value, you create an additional column with the AGO function in it.
    Now you will have the current value and next to it the value of the required period ago. You won't need any static variables.
    Let me give you an example for the last three months.
    Period CY PY
    jan-08 50 30
    dec-07 40 20
    nov-07 45 25
    In this case the value 20 corresponds to the period dec-06.
    I hope I made myself clear.
    Good Luck,
    Daan Bakboord

  • Depreciation run for previous years

    Hi Experts,
    I am in Development system where the depreciation run has not been carried out since 2007 as per OAAQ. Now when I try posting depreciation for year 2008 period 1, it throws this error "You can only post in new year after closing previous year". However, 2007 is already closed.
    Again when I try to close the FY in AJAB, it throws this error "No year end close is necessary for co. code XXXX".
    Also, I don't find any table entries for TABA and as per table T093b 2007 is the closed FY.
    So, my question is how can I carry out the depreciation run for all these years to bring the system to current FY.
    Additional information you might require is OB52 is having period open from 1/2014 to 12/2016. and Planned ordinary depreciation has been carried out for some of assets till 2009 as I can see in table ANLC.
    Thanks in advance
    Regards
    Sukham

    Hi Sukham,
    ok, the problem is that you have values for the last posted in T093D, which may come from a legacy data takeover.
    You have 2 options right now:
    1) Implement and run the correction program from note 144441          
    2) Either clear or set the last posted depreciation period in the IMG for FI-AA legacy transfer to 12 (or use the correction program from note 26073)
    Regards,
    Markus

  • Convert the 0CALQUARTER into previous year same quarter

    Hi All,
    How to conver the 0CALQURTER to Previous year same quarter in User exit (CMOD).
    Please give a sample code.
    Thanks

    Hi Chakri,
    The Sample code is:
    DATA: L_S_RANGE TYPE RSR_S_RANGESID.
    DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.
    Data: v_loc_year(4) TYPE n.
    Data: v_pre_year(4) TYPE n.
    Data: v_month(2) TYPE c.
    CASE I_VNAM.
    to calculate "Year to Last month" from fiscal year/period with user entry
      WHEN 'ZCAL_QUAR'.
        IF I_STEP = 2. "after the popup
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
        WHERE VNAM = 'ZCAL_QUAR1'.
            CLEAR L_S_RANGE.
            v_month = LOC_VAR_RANGE-LOW+4(2).
            v_loc_year = LOC_VAR_RANGE-LOW+0(4).
            v_pre_year = v_loc_year - 1.
           CONCATENATE v_pre_year v_month INTO result.
          ENDLOOP.
        ENDIF.
    ENDCASE.
    **ZCAL_QUAR is your User Exit Variable, ZCAL_QUAR1 is your normal selection variable where user enter the value.
    Hope this helps.
    Let me know if it doesnt work.
    Regards,
    Ravi Kanth
    Edited by: Ravi kanth on Apr 27, 2009 10:08 AM

  • Previous to previous year figures

    I am developing balance sheet report in BI.
                                                      December 2008                            December 2007            
    As at the commencement of the year              Mar 2008 (016.2007)                    Mar 2007 (016.2006) 
                                                    VARIABLES:
                                                    0P_FPER
                                                    0I_BA107
    Where December 2008 is taken as an example. It is the selection criteria based on 0FISCPER.
    I am getting values for December 2008 using variables 0P_FPER and  0I_BA107.
    But I am not getting the variable to get Mar 2007. This variable should give me the value of the last period for previous to previous year with reference to period selected in selection criteria. Most probably I need to write user exit variable. Can anybody send me the link/document for the same.

    Hi Shailesh,
      Regarding the I_STEP, few details are as follows:
    If you execute a query that contains variables with the customer exit replacement path (and these variables are filled depending on input-ready variables), sometimes, the variable exit is not run or incorrect data is selected. To avoid this, you can control the dependencies using the I_STEP parameter.
    The I_STEP parameter specifies when the enhancement is called.The values corresponds to:
       I_STEP = 1
    Call is made directly before variable entry.
      I_STEP = 2
    Call is made directly after variable entry. This step is only executed if the same variable is not input-ready and could not be filled for I_STEP = 1.
    I_STEP = 3
    In this call, you can check the values of the variables. When an exception (RAISE) is triggered, the variable screen appears again. I_STEP = 2 is then also called again.
    I_STEP = 0
    The enhancement is not called from the variable screen. The call can originate from the authorization check or from the monitor.
    Example:
    In the following example, the current month is taken from an input-ready variable MONTH; this is then used to generate an interval that cumulates all months from January ('01') up to the current month. The customer exit variable CUMMONTH contains the interval as the value.
    DATA: L_S_RANGE TYPE RSR_S_RANGESID.
    DATA: L_S_VAR_RANGE TYPE RRRANGEEXIT.
    CASE I_VNAM.
    WHEN 'CUMMONTH'.
    IF I_STEP = 2. "after the popup
    READ TABLE I_T_VAR_RANGE INTO L_S_VAR_RANGE WITH KEY VNAM = 'MONTH'.
    IF SY-SUBRC = 0.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(4)."low value, for example, 200601
    L_S_RANGE-LOW+4(2) = '01'.
    L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW. "high value = input
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'BT'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDIF.
    ENDIF.
    ENDCASE.
    Hope this is informative!
    Best Regards,
    Akshata

  • Previous year exit

    I have an exit variable which will be defined as follows:
    READ TABLE I_T_VAR_RANGE INTO I_RANGE2
    WITH KEY VNAM = 'ZDEF'.
    IF SY-SUBRC = 0.
    "join first 4 char of the user entered fiscal period with '001' and store in l_fiscper
    CONCATENATE I_RANGE2-LOW(4) '001' INTO l_fiscper.
    "set l_fiscper as the lower limit of the range
    L_RANGE-LOW = l_fiscper.
    L_RANGE-HIGH = ''.
    L_RANGE-SIGN = 'I'.
    L_RANGE-OPT = 'EQ'.
    APPEND L_RANGE TO E_T_RANGE.
    ENDIF.
    ENDIF.
    It will take a user input for a Fiscal Period for example: 2009004 and give me a value for 2009001.  I want to also get the value for the previous year i.e. 2008001.  Do I need to define a new exit and if so what is the change that I need to make or can I offset the variable and if offset how do I offset.  Thanks
    Edited by: Niten Shah on Apr 15, 2009 7:45 AM

    hi Nitin,
    create 2 varaibles with processing type Customer exit on OCalday....then create 2 RKF's by restrcting RKF1 and RKF2
    and also VAR1 and VAR2 respectively. and write CMOD code..
    and use below code...
    READ TABLE I_T_VAR_RANGE INTO I_RANGE2
    WITH KEY VNAM = 'ZDEF'.
    if vnam  = 'VAR1'.
    CONCATENATE I_RANGE2-LOW(4) '001' INTO l_fiscper.
    L_RANGE-LOW = l_fiscper.
    L_RANGE-SIGN = 'I'.
    L_RANGE-OPT = 'EQ'.
    APPEND L_RANGE TO E_T_RANGE.
    ENDIF.
    clear L_S_range.
    IF VNAM = 'VAR2'.
    Temp = I_RANGE2-LOW(4) - 1.
    CONCATENATE temp '001' INTO l_fiscper.
    L_RANGE-LOW = l_fiscper.
    L_RANGE-SIGN = 'I'.
    L_RANGE-OPT = 'EQ'.
    APPEND L_RANGE TO E_T_RANGE.
    ENDIF.
    Edited by: shanthi bhaskar on Apr 15, 2009 12:32 PM

  • Asset You can only post in new  year after closing the previous year

    Hi Experts,
    I am getting below error while running the depriciation:
    You can only post in new  year after closing the previous year.
    Message no. AA687
    Diagnosis
    You want to post in a new fiscal year. However, a posting must have been made in the last period in the previous fiscal year before you can do this.
    Procedure
    Post to the last period in the previous year first.
    Note : I closed FY09, even though there were no assets in it at the time.  The first  asset was capitalized on 12/29/09 (clearly in FY10).  I tried closing FY09 again and got the messege  No year-end close is necessary for company code XXXX .
    Could you please any one help me on this.
    Thanks In Adwance
    Regards,
    Saritha.

    Hi Saritha,
    Please check the following settings:                                                                               
    o Is there one ore more years since the last depr. run?                                                                               
    Solution: in this case an entry must be made into the table TABA. 
                      Note 144441  gives a solution to make a "Dummy-entry".                                                                               
    o If there was never a depreciation run, the there must be 000/0000 in
      TABA and T093D.                                                                               
    Solution: please take the report from the note  Note 144441           
                      and put the values  000/0000 in this fields.                                                                               
    o Do you  have a non-calendar fiscal year (e.g. 2009/10)? In this case
        you should have in the field T093D-AFBLG the year 2010.             
        Solution: Correction with note 26073                              
    regards Bernhard

  • Getting the same day of the week from a previous year in a Power Query calc column

    Hi Power Query users,
    Would like to get your suggestions on this problem. I have a customer that wants to see the previous year's sales for the same day of the week. So today is Friday July 25, 2014. Customer would like to see sales for the closest Friday on the previous year,
    which was Friday July 26, 2013. Next year on Friday July 26, 2015, customer would see the sales for Friday July 25, 2014 and so on. Customer operates 7 days a week, all days of the year including holidays.
    What is the most elegant way to do this? I am assuming the best thing to do is to add this date as a calculated column in the date table, but I am not quite sure the best way to write the formula (including handling of edge cases - leap years, providing
    null when the previous year is not part of the date table, etc).
    I am starting with the
    date dimension as presented by Matt Masson.
    Please help if you have any formula suggestions for this.
    Thanks

    Okay, I'm making a couple of assumptions, so please let me know if these assumptions are incorrect:
    1) Instead of all sales data being in a single column, current year and last year sales are provided in different columns,
    2) The previous year sales column shows the sales occurring on the same
    date as the current year sales (so in your example, 43214 is the sales figure for 6/1/2013.
    If the above assumptions are true, we need to modify how the lookup is done. Let's assume that you created a custom column named SameDayOfWeekLastYear. Create another column called Previous Year Date, using the following function (Date_PreviousYear)
    (date) =>
    let   
        PreviousYearDate = Date.AddYears(date,-1),
        PreviousYearDateAdjusted = if (Date.Day(date)=29 and Date.Month(date) = 2) then
                                       #date(9999,1,1)
                                   else PreviousYearDate
    in
        PreviousYearDateAdjusted
    Incidentally, I created this function the week before your query, for a different purpose. In that case, it was to get the previous year sales occurring on the same
    date as the current year sales. It actually gets to your starting point, but with all the sales data in a single column to start with. However, when the current year is a leap year and you apply the Date.AddYears function, February 29th is calculated
    as February 28th of the previous year. If you then do a lookup for previous year sales, you get February 28th sales looked-up twice (the real Feb 28th and the bogus one resulting from taking February 29th back one year). The PreviousYearDateAdjusted identifier
    puts a truly bogus date instead of a duplicated Feb 28th - one that will always return null when looking up the sales value.
    This new date column will then be used to lookup the row of the previous year sales column that corresponds to the dates in the SameDayOfWeekLastYear column.
    Assuming that the last step in your query is InsertedCustom1, create another custom column (Previous Year Net_Same Day?), which returns the sales on the same day as the current year (the result that you're after). The formula would be:
    LookupValue(InsertedCustom1[Previous Year Net], InsertedCustom1[Previous Year Date], [SameDayOfWeekLastYear])
    where LookupValue is the custom function mentioned previously. After creating this new custom column, you can then remove all of the columns you don't need.
    Hope that the preceding is somewhat clear.

  • Expression to find value for previous year SSRS

    Hi
    I need some help with expressions.I need a report that shows calcul of a field for current year as well as previous year respecting this rule expression(Last-Last Previous)/Last Previous*100 (I work with MDX Query and i work with SSRS 2008).
    Also the report runs on a Year Parameter. Below is an example for the result
    for example i selected the years 2010 2011 2012 i can select another years because i have the report runs on  a Year Parameter
    year
    Data 2010 2011 2012
    hp 14 25 30
    Dell 17 18 20
    and the result i want
    year
    Data 2010 2011 2012 2011/2012
    hp 14 25 30 0.002 (Last -Last Previous)/(last Previous*100) =(30-25)/(25*100)
    Dell 17 18 20 0.0040
    Thanks a lot

    Hi Yassir,
    Please find the RDL code, save the code into .RDL and run it
    <?xml version="1.0" encoding="utf-8"?>
    <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
    <Body>
    <ReportItems>
    <Tablix Name="matrix1">
    <TablixCorner>
    <TablixCornerRows>
    <TablixCornerRow>
    <TablixCornerCell>
    <CellContents>
    <Textbox Name="textbox3">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value />
    <Style>
    <FontFamily>Tahoma</FontFamily>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>textbox3</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCornerCell>
    </TablixCornerRow>
    </TablixCornerRows>
    </TablixCorner>
    <TablixBody>
    <TablixColumns>
    <TablixColumn>
    <Width>1in</Width>
    </TablixColumn>
    <TablixColumn>
    <Width>1in</Width>
    </TablixColumn>
    </TablixColumns>
    <TablixRows>
    <TablixRow>
    <Height>0.21in</Height>
    <TablixCells>
    <TablixCell>
    <CellContents>
    <Textbox Name="textbox2">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Sum(Fields!value.Value)</Value>
    <Style>
    <FontFamily>Tahoma</FontFamily>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>textbox2</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    <DataElementOutput>Output</DataElementOutput>
    </TablixCell>
    <TablixCell>
    <CellContents>
    <Textbox Name="Textbox16">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=((last(Fields!value.Value) -Code.GetValueByKeyValue(Fields!keyvalue.Value)) /Code.GetValueByKeyValue(Fields!keyvalue.Value))*100</Value>
    <Style>
    <FontFamily>Tahoma</FontFamily>
    <Format>f2</Format>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Textbox16</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    <DataElementOutput>Output</DataElementOutput>
    </TablixCell>
    </TablixCells>
    </TablixRow>
    </TablixRows>
    </TablixBody>
    <TablixColumnHierarchy>
    <TablixMembers>
    <TablixMember>
    <Group Name="matrix1_year">
    <GroupExpressions>
    <GroupExpression>=Fields!year.Value</GroupExpression>
    </GroupExpressions>
    </Group>
    <SortExpressions>
    <SortExpression>
    <Value>=Fields!year.Value</Value>
    </SortExpression>
    </SortExpressions>
    <TablixHeader>
    <Size>0.21in</Size>
    <CellContents>
    <Textbox Name="year">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!year.Value</Value>
    <Style>
    <FontFamily>Tahoma</FontFamily>
    <FontWeight>Bold</FontWeight>
    <Color>White</Color>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>year</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <BackgroundColor>#6e9eca</BackgroundColor>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixHeader>
    <DataElementOutput>Output</DataElementOutput>
    <KeepTogether>true</KeepTogether>
    </TablixMember>
    <TablixMember>
    <TablixHeader>
    <Size>0.21in</Size>
    <CellContents>
    <Textbox Name="Textbox4">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value />
    <Style>
    <FontFamily>Tahoma</FontFamily>
    <FontWeight>Bold</FontWeight>
    <Color>White</Color>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Textbox4</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <BackgroundColor>#6e9eca</BackgroundColor>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixHeader>
    </TablixMember>
    </TablixMembers>
    </TablixColumnHierarchy>
    <TablixRowHierarchy>
    <TablixMembers>
    <TablixMember>
    <Group Name="matrix1_data">
    <GroupExpressions>
    <GroupExpression>=Fields!data.Value</GroupExpression>
    </GroupExpressions>
    </Group>
    <SortExpressions>
    <SortExpression>
    <Value>=Fields!data.Value</Value>
    <Direction>Descending</Direction>
    </SortExpression>
    </SortExpressions>
    <TablixHeader>
    <Size>1in</Size>
    <CellContents>
    <Textbox Name="data">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!data.Value</Value>
    <Style>
    <FontFamily>Tahoma</FontFamily>
    <FontWeight>Bold</FontWeight>
    <Color>White</Color>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>data</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <BackgroundColor>#6e9eca</BackgroundColor>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixHeader>
    <TablixMembers>
    <TablixMember />
    </TablixMembers>
    <DataElementOutput>Output</DataElementOutput>
    <KeepTogether>true</KeepTogether>
    </TablixMember>
    </TablixMembers>
    </TablixRowHierarchy>
    <RepeatColumnHeaders>true</RepeatColumnHeaders>
    <RepeatRowHeaders>true</RepeatRowHeaders>
    <DataSetName>DataSet1</DataSetName>
    <Top>1.20333in</Top>
    <Left>0.10833in</Left>
    <Height>0.42in</Height>
    <Width>3in</Width>
    <Style />
    </Tablix>
    <Textbox Name="textbox1">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>Get the last previous value</Value>
    <Style>
    <FontFamily>Tahoma</FontFamily>
    <FontSize>12pt</FontSize>
    <FontWeight>Bold</FontWeight>
    <Color>SteelBlue</Color>
    </Style>
    </TextRun>
    </TextRuns>
    <Style>
    <TextAlign>Center</TextAlign>
    </Style>
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>textbox1</rd:DefaultName>
    <Height>0.37in</Height>
    <Width>5in</Width>
    <ZIndex>1</ZIndex>
    <Style>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    <Tablix Name="Tablix1">
    <TablixCorner>
    <TablixCornerRows>
    <TablixCornerRow>
    <TablixCornerCell>
    <CellContents>
    <Textbox Name="Textbox7">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>data</Value>
    <Style>
    <Color>White</Color>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Textbox7</rd:DefaultName>
    <Style>
    <Border>
    <Color>White</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCornerCell>
    </TablixCornerRow>
    </TablixCornerRows>
    </TablixCorner>
    <TablixBody>
    <TablixColumns>
    <TablixColumn>
    <Width>1in</Width>
    </TablixColumn>
    <TablixColumn>
    <Width>1in</Width>
    </TablixColumn>
    </TablixColumns>
    <TablixRows>
    <TablixRow>
    <Height>0.25in</Height>
    <TablixCells>
    <TablixCell>
    <CellContents>
    <Textbox Name="previous">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Sum(Fields!previous.Value)</Value>
    <Style>
    <Color>White</Color>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>previous</rd:DefaultName>
    <Style>
    <Border>
    <Color>White</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    <TablixCell>
    <CellContents>
    <Textbox Name="Textbox21">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Code.AddKeyValue(Fields!keyvalue.Value, last(Fields!previous.Value))</Value>
    <Style>
    <Color>White</Color>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Textbox21</rd:DefaultName>
    <Style>
    <Border>
    <Color>White</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    </TablixCells>
    </TablixRow>
    </TablixRows>
    </TablixBody>
    <TablixColumnHierarchy>
    <TablixMembers>
    <TablixMember>
    <Group Name="year">
    <GroupExpressions>
    <GroupExpression>=Fields!year.Value</GroupExpression>
    </GroupExpressions>
    </Group>
    <SortExpressions>
    <SortExpression>
    <Value>=Fields!year.Value</Value>
    </SortExpression>
    </SortExpressions>
    <TablixHeader>
    <Size>0.25in</Size>
    <CellContents>
    <Textbox Name="year1">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!year.Value</Value>
    <Style>
    <Color>White</Color>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>year1</rd:DefaultName>
    <Style>
    <Border>
    <Color>White</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixHeader>
    <TablixMembers>
    <TablixMember />
    </TablixMembers>
    </TablixMember>
    <TablixMember>
    <TablixHeader>
    <Size>0.25in</Size>
    <CellContents>
    <Textbox Name="Textbox20">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value />
    <Style>
    <Color>White</Color>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Textbox20</rd:DefaultName>
    <Style>
    <Border>
    <Color>White</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixHeader>
    </TablixMember>
    </TablixMembers>
    </TablixColumnHierarchy>
    <TablixRowHierarchy>
    <TablixMembers>
    <TablixMember>
    <Group Name="data">
    <GroupExpressions>
    <GroupExpression>=Fields!data.Value</GroupExpression>
    </GroupExpressions>
    </Group>
    <SortExpressions>
    <SortExpression>
    <Value>=Fields!data.Value</Value>
    </SortExpression>
    </SortExpressions>
    <TablixHeader>
    <Size>1in</Size>
    <CellContents>
    <Textbox Name="data1">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!data.Value</Value>
    <Style>
    <Color>White</Color>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>data1</rd:DefaultName>
    <Style>
    <Border>
    <Color>White</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixHeader>
    </TablixMember>
    </TablixMembers>
    </TablixRowHierarchy>
    <DataSetName>DataSet2</DataSetName>
    <Top>0.43944in</Top>
    <Left>0.29667in</Left>
    <Height>0.5in</Height>
    <Width>3in</Width>
    <ZIndex>2</ZIndex>
    <Style>
    <Border>
    <Color>White</Color>
    <Style>None</Style>
    </Border>
    </Style>
    </Tablix>
    </ReportItems>
    <Height>1.76333in</Height>
    <Style />
    </Body>
    <Width>5.10833in</Width>
    <Page>
    <LeftMargin>1in</LeftMargin>
    <RightMargin>1in</RightMargin>
    <TopMargin>1in</TopMargin>
    <BottomMargin>1in</BottomMargin>
    <Style />
    </Page>
    <AutoRefresh>0</AutoRefresh>
    <DataSources>
    <DataSource Name="DataSource1">
    <DataSourceReference>DataSource1</DataSourceReference>
    <rd:SecurityType>None</rd:SecurityType>
    <rd:DataSourceID>87cd8154-60ce-43ca-a678-39a5c1bfeb15</rd:DataSourceID>
    </DataSource>
    </DataSources>
    <DataSets>
    <DataSet Name="DataSet2">
    <Query>
    <DataSourceName>DataSource1</DataSourceName>
    <QueryParameters>
    <QueryParameter Name="@Year">
    <Value>=Parameters!Year.Value</Value>
    </QueryParameter>
    </QueryParameters>
    <CommandText>select * from
    SELECT data, year , value AS previous,cast(year as varchar)+ data as keyvalue,row_number() over(partition by data order by year desc) yeardesc
    FROM (SELECT 'HP' DATA, 2010 year, 14 value
    UNION
    SELECT 'HP' DATA, 2011 year, 25 value
    UNION
    SELECT 'HP' DATA, 2012 year, 30 value
    UNION
    SELECT 'Dell' DATA, 2010 year, 17 value
    UNION
    SELECT 'Dell' DATA, 2011 year, 18 value
    UNION
    SELECT 'Dell' DATA, 2012 year, 20 value
    ) AS t
    WHERE year IN (@Year)
    )t1
    where yeardesc &lt;&gt; 1
    order by year asc</CommandText>
    </Query>
    <Fields>
    <Field Name="data">
    <DataField>data</DataField>
    <rd:TypeName>System.String</rd:TypeName>
    </Field>
    <Field Name="year">
    <DataField>year</DataField>
    <rd:TypeName>System.Int32</rd:TypeName>
    </Field>
    <Field Name="previous">
    <DataField>previous</DataField>
    <rd:TypeName>System.Int32</rd:TypeName>
    </Field>
    <Field Name="keyvalue">
    <DataField>keyvalue</DataField>
    <rd:TypeName>System.String</rd:TypeName>
    </Field>
    <Field Name="yeardesc">
    <DataField>yeardesc</DataField>
    <rd:TypeName>System.Int64</rd:TypeName>
    </Field>
    </Fields>
    </DataSet>
    <DataSet Name="DataSet1">
    <Query>
    <DataSourceName>DataSource1</DataSourceName>
    <QueryParameters>
    <QueryParameter Name="@Year">
    <Value>=Parameters!Year.Value</Value>
    </QueryParameter>
    </QueryParameters>
    <CommandText>SELECT data, year, value,cast(year as varchar)+data keyvalue
    FROM (SELECT 'HP' DATA, 2010 year, 14 value
    UNION
    SELECT 'HP' DATA, 2011 year, 25 value
    UNION
    SELECT 'HP' DATA, 2012 year, 30 value
    UNION
    SELECT 'Dell' DATA, 2010 year, 17 value
    UNION
    SELECT 'Dell' DATA, 2011 year, 18 value
    UNION
    SELECT 'Dell' DATA, 2012 year, 20 value) AS t
    WHERE year IN (@Year)</CommandText>
    </Query>
    <Fields>
    <Field Name="data">
    <DataField>data</DataField>
    <rd:TypeName>System.String</rd:TypeName>
    </Field>
    <Field Name="year">
    <DataField>year</DataField>
    <rd:TypeName>System.Int32</rd:TypeName>
    </Field>
    <Field Name="value">
    <DataField>value</DataField>
    <rd:TypeName>System.Int32</rd:TypeName>
    </Field>
    <Field Name="keyvalue">
    <DataField>keyvalue</DataField>
    <rd:TypeName>System.String</rd:TypeName>
    </Field>
    </Fields>
    </DataSet>
    </DataSets>
    <ReportParameters>
    <ReportParameter Name="Year">
    <DataType>String</DataType>
    <DefaultValue>
    <Values>
    <Value>=2010</Value>
    <Value>=2011</Value>
    <Value>=2012</Value>
    </Values>
    </DefaultValue>
    <Prompt>Year</Prompt>
    <ValidValues>
    <ParameterValues>
    <ParameterValue>
    <Value>2010</Value>
    <Label>2010</Label>
    </ParameterValue>
    <ParameterValue>
    <Value>2011</Value>
    <Label>2011</Label>
    </ParameterValue>
    <ParameterValue>
    <Value>2012</Value>
    <Label>2012</Label>
    </ParameterValue>
    </ParameterValues>
    </ValidValues>
    <MultiValue>true</MultiValue>
    </ReportParameter>
    </ReportParameters>
    <Code>Public PersSal as New System.Collections.HashTable()
    Function ClearList(SomeValue as String) as String
    PersSal.Clear
    Return SomeValue
    End Function
    Function AddKeyValue(KeyValue as String, Value as Decimal) as Decimal
    Try
    PersSal.Add(KeyValue, Value)
    Return Value
    Catch ex as Exception
    End Try
    End Function
    Function GetValueByKeyValue (ByVal Key As String) As Decimal
    For Each clsPair As System.Collections.DictionaryEntry In PersSal
    If clsPair.Key.ToString() = Key Then Return clsPair.Value
    Next
    End Function</Code>
    <Language>en-US</Language>
    <ConsumeContainerWhitespace>true</ConsumeContainerWhitespace>
    <rd:ReportUnitType>Inch</rd:ReportUnitType>
    <rd:ReportID>53660ed8-b969-46cf-960b-2ccb14abf7e7</rd:ReportID>
    </Report>
    Thanks
    Prasad
    Mark this as Answer if it helps you to proceed on further.

  • How to generate a new calendar without previous year data

    In iCal I previously could, at the end of the year or early in the new year, create a new complete calendar and delete the old data of the previous year leaving only the current year entries. Ever since there was an iCal, I was able to do that.
    I think I created an archive for the previous year and then was able to delete the old daily data in a single step to create the new year. There doesn't seem to be any capability to do this.
    I have created an archive of my 2012 events but don't want to manually delete hundreds and hundreds (probablty over a  thousand) of 2012 entries one by one just to make a calendar with only the few days of 2013 presently in my calendar.
    I do NOT use the cloud to store my calendar or any of my information. If that might be the only way to purge old data, then there is a big flaw in Calendar.

    I found information on how I created a clean Calendar in January of 2012 when using an older version of OS (probably Lion) and Calendar.
    Selected backup option (now only have export or archive as available options)
    set prefs to clear older than x days (no options now possible to do this)
    create copy
    close Calendar
    repopen and unchecked the prefs
    I have now created a new calendar by the extremely tedious process of deleting over 1000 entries in the 2012 calendar one at a time.
    This is a really big flaw in the current Calendar not allowing the easy creation of a new Calendar as was possible just a year ago!!!!! This was possibe every year since we got iCal until now.

  • Capturing previous year invoice document in current fiscal year

    Dear All,
    One of my client requirement is that have posted invoice in previous year and they are making payment in current fiscal year, this scenario they want to capture in payment advice. When am checking all the table with the input as payment document number and fcleared fiscal year system not showing the invoice reference against which it is cleard. For current year cleared documents we can extract the invoice reference where as for previous year system not picking that invoice number.
    Have checked in all the table entries, kindly suggest me is there any other alternative way to do this...
    Regards,
    Balaji.c

    Dear All,
    The problem is resolved since by giving the input as previous fiscal year and then system able to show the invoice number even if its cleared in current year. Invoice belongs to preious year and cleared documen in current year in that case we have to give the input parameter as previous fiscal year against that document number.
    Thanks for all the inputs.
    Regards,
    Balaji.c

Maybe you are looking for