Data Set Expressions

Hi
I am using Visual Studio 2008 BIDS and need help with a couple of expressions.
I have a data set as show in 1st image below
Image 2 shows a typical output from this Data Set
I need to produce the following information on the report.
TOTAL:     ="£" & Sum(Fields!ChargeAmount.Value,
"Charges")    - this works as required
I then need to show the RENT part on its own on separate line
RENT:        This should show in this case £220.18 from an expression
I then need to show the Total of all the remaining charges on another line
SERVICE:  In this case this should show the sum of all charges excluding RENT.
In this example there are 4 service charges but this may be any number of charges depending on Tenancy Number chosen. However every single Tenancy Number will always have a RENT amount and Charge Description of RENT.
I have bee trying loads of combinations to get this to work but with no success. Any help will be much appreciated.
Thanks
John

I accomplished this with a table control using a dataset that returns the data you show in your post.
Create a table and assign your dataset to it. Add a parent group to the default Detail group and group on TenancyNumber. The new group column should appear displaying that field. Now delete the Detail group but not the associated cells... group only. In
the 1st data cell display the total (I used =Sum(Fields!ChargeAmount.Value) for this). Next data cell will be Rent using this formula: =Sum(IIf(Fields!Charge.Value="Rent",CDbl(Fields!ChargeAmount.Value),0)). The last data cell will be Service
using this formula: =Sum(IIf(Fields!Charge.Value<>"Rent",CDbl(Fields!ChargeAmount.Value),0)).
"You will find a fortune, though it will not be the one you seek." -
Blind Seer, O Brother Where Art Thou
Please Mark posts as answers or helpful so that others may find the fortune they seek.

Similar Messages

  • Using report parameter in data set filter expression with an SSAS data source

    I have an SSRS report with an SSAS data source.
    Report parameters:
    Param1 - text, single select
    Param2 - text, multi-select
    Dataset:
    In Query Designer, I want to include Param1 as a filter expression so I can have "Dimension1 Begins with @Param2". I'm not sure the exact syntax to make param2 work in this.
    The point is to filter my data set on param1. If A is selected for param1, I want the data set to have the filter saying "Dimension1 begins with A"
    Anyone know how to use a report parameter in the dataset filter expression for an ssas data source?

    hi,
    try this maybe the dates you are comparing are not in the same format.
    I test data template in EBS but not with dates.
    to_date(date,'dd/mm/YY') between to_date(:p_from_date ,'dd/mm/YY') and to_date(:p_to_date ,'dd/mm/YY')
    if dont works try to put values insted of your parameter like :
    to_date(date,'dd/mm/YY') between to_date(:p_from_date ,'10/01/07') and to_date(:p_to_date ,'01/12/07') ... put dates where u can have some values in report...
    if dont work then try to print the values of the 2 parameters and the date of the select somwhere in ur report to see what you have in it..
    hope it helps..
    Regards Joe.

  • How to activate a different sub-report for each row in the data set as main report page breaks on each row of data in the main dataset

    I am going to try asking this same question a different way as I have yet to find a working solution to my problem.  I have a main report and then 8 sub reports.  My main report has one data set and returns one row of data per account number.  One
    of the fields in the main data set is called AccountProf.  My main report displays one page per Account number and then calls a different sub report based on that account's AccountProf value.  The sub reports take in the account number as a parameter
    and get multiple rows of data to display that accounts usage formatted differntly for each AccountProf (hence the 8 different sub report.  
    So far I can figure out how to do everything but setting the visibility property of each sub-reports when I have multiple accounts.  If I use the following expression for the visibility property on each sub report, it makes all the applicable sub report
    for all the accounts requested visible at once:
    =IIF(Fields!AccountProf.Value= "USE_PLUS_DMD",False,True)
    *The value in bold USE_PLUS_DMD  is different for each sub report.
    Here is a look at what the main report look like:
    Here is the main reports data set:

    Hi JasonDWilson77,
    According to your description, there is a main report and 8 sub reports in the report, you want to set visibility of sub reports, if no value is passed to the parameter of sub report, the sub report will not be displayed. If that is the case, please refer
    to the following steps:
      1. Create a new parameter named NewAccountNumber, set its data type the same as @AccountNumber, select Allow multiple values, set Visibility to be hidden, then set all available values to default values.
      2. Right-click the first sub report and open Subreport Properties dialog box, click Parameters in left pane, set name to AccountNumber, then click (fx) button, type the expression like below:
    =Parameters! NewAccountNumber(0)
      3. Click Visibility in left pane, select Show or hide based on an expression, then click (fx) button and type the expression like below:
    =IIF(InStr(Join(Parameters! AccountNumber.Value), Parameters!NewAccountNumber.Value(0))>0 , false,true)
      4. Modify parameter of other sub reports like step2.
      5. Set visibility of other sub reports like step3.
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    If you have any feedback on our support, please click
    here.
    Wendy Fu
    TechNet Community Support

  • Mulitple Data Sets

    I've worked for over a month to study and resolve this but have not recognized the answer.
    The web site intent is,
    1. A single XML master data base contains all photographs for display.  My XML data set does not have quotes.
    2. Spry tabbed panels are used to select galleries (Spry regions) (e.g. roses, Big Sur Coast, etc) from the master data base.  There are a dozen galleries.
    3. Thumbnails of a gallery are displayed in the content panel.
    4. Selecting a thumbnail displays a large view of the selected photo in a separate div (Spry detail region).
    My studies of XML, Spry and Javascript has brought me to a stumbling block.
    Solution 1. I tried to use a single name for the gallery filtered data sets.  Each filter would be applied to a separate page of the tabbed panels.  However, I was not successful in getting the thumbnails to change.  (I was not able to get variables within XPath expressions to work.)
    Solution 2. I tried to use unique names for the gallery filtered data sets.  Again, each filter (data set) was applied to a separate page of the tabbed panels.  However, I have not been successful in displaying the large view of a selected thumbnail because the Spry detail region specifies a single data base.  I tried defining a common named data set from the filtered data set but this did not work (see dsrose of the second content panel).
    My two questions are,
    A. How can I get the thumbnails to change (i.e. update the data base and utilize it) for Solution 1.
    B. Can I have a Spry detail region with multiple data sources?
    My current source code follows.
    I thank you for your consideration.
    Scott
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    <!--
    body {
    background-color: #FFF;
    text-align: center;
    margin: 0px;
    padding: 0px;
    #wrapper {
    width: 85%;
    margin-top: 10px;
    margin-right: auto;
    margin-bottom: 0px;
    margin-left: auto;
    border: 2px dashed #F0F;
    #leftColumn {
    float: left;
    height: 700px;
    width: 400px;
    #header {
    height: 90px;
    font-size: 24px;
    font-style: italic;
    vertical-align: middle;
    padding: 0px;
    text-align: center;
    float: right;
    width: 50%;
    border: 2px solid #F00;
    #selectedPhoto {
    height: 600px;
    font-size: 24px;
    font-style: italic;
    vertical-align: middle;
    padding: 0px;
    text-align: center;
    float: right;
    margin-top: 135px;
    width: 550px;
    border: 2px solid #0F0;
    -->
    </style>
    <script src="SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    var name;
    var width;
    var height;
    var thumbname;
    var thumbwidth;
    var thumbheight;
    var subject;
    var description;
    var thumbnail;
    var dsphoto;
    var dsphotodata;
    //-->
    </script>
    <script type="text/javascript">
    var dsdatanew = new Spry.Data.XMLDataSet("EM_photo_no_Quotes.xml", "/gallery");
    var dsnew = new Spry.Data.XMLDataSet("EM_photo_no_Quotes.xml", "gallery/photos/photo [subject = 'new']");
    var dsdatarose = new Spry.Data.XMLDataSet("EM_photo_no_Quotes.xml", "/gallery");
    var dsrose = new Spry.Data.XMLDataSet("EM_photo_no_Quotes.xml", "gallery/photos/photo [subject = 'rose']");
    var dsdatacallalily = new Spry.Data.XMLDataSet("EM_photo_no_Quotes.xml", "/gallery");
    var dscallalily = new Spry.Data.XMLDataSet("EM_photo_no_Quotes.xml", "gallery/photos/photo [subject = 'callalily']");
    var dsdatablossom = new Spry.Data.XMLDataSet("EM_photo_no_Quotes.xml", "/gallery");
    var dsblossom = new Spry.Data.XMLDataSet("EM_photo_no_Quotes.xml", "gallery/photos/photo [subject = 'blossom']");
    var dsdatapgbeach = new Spry.Data.XMLDataSet("EM_photo_no_Quotes.xml", "/gallery");
    var dspgbeach = new Spry.Data.XMLDataSet("EM_photo_no_Quotes.xml", "gallery/photos/photo [subject = 'pgbeach']");
    var dsdataMonterey = new Spry.Data.XMLDataSet("EM_photo_no_Quotes.xml", "/gallery");
    var dsMonterey = new Spry.Data.XMLDataSet("EM_photo_no_Quotes.xml", "gallery/photos/photo [subject = 'Monterey']");
    var dsdatabigsurcoast = new Spry.Data.XMLDataSet("EM_photo_no_Quotes.xml", "/gallery");
    var dsbigsurcoast = new Spry.Data.XMLDataSet("EM_photo_no_Quotes.xml", "gallery/photos/photo [subject = 'bigsurcoast']");
    var dsdataSalinas = new Spry.Data.XMLDataSet("EM_photo_no_Quotes.xml", "/gallery");
    var dsSalinas = new Spry.Data.XMLDataSet("EM_photo_no_Quotes.xml", "gallery/photos/photo [subject = 'Salinas']");
    var dsdataanimal = new Spry.Data.XMLDataSet("EM_photo_no_Quotes.xml", "/gallery");
    var dsanimal = new Spry.Data.XMLDataSet("EM_photo_no_Quotes.xml", "gallery/photos/photo [subject = 'animal']");
    var dsdatanight = new Spry.Data.XMLDataSet("EM_photo_no_Quotes.xml", "/gallery");
    var dsnight = new Spry.Data.XMLDataSet("EM_photo_no_Quotes.xml", "gallery/photos/photo [subject = 'night']");
    var dsdatachurch = new Spry.Data.XMLDataSet("EM_photo_no_Quotes.xml", "/gallery");
    var dschurch = new Spry.Data.XMLDataSet("EM_photo_no_Quotes.xml", "gallery/photos/photo [subject = 'church']");
    var dsdataother = new Spry.Data.XMLDataSet("EM_photo_no_Quotes.xml", "/gallery");
    var dsother = new Spry.Data.XMLDataSet("EM_photo_no_Quotes.xml", "gallery/photos/photo [subject = 'other']");
    function MM_callJS(jsStr) { //v2.0
      return eval(jsStr)
    </script>
    <script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div id="wrapper">
      <div id="leftColumn">
        <div id="TabbedPanels1" class="TabbedPanels">
          <ul class="TabbedPanelsTabGroup">
            <li class="TabbedPanelsTab" tabindex="0">Welcome</li>
            <li class="TabbedPanelsTab" tabindex="0">Mechanical Engineering</li>
            <li class="TabbedPanelsTab" tabindex="0">Photography</li>
          </ul>
          <div class="TabbedPanelsContentGroup">
            <div class="TabbedPanelsContent">Welcome - Content 1</div>
            <div class="TabbedPanelsContent">Mechanical Engineering - Content 2</div>
            <div class="TabbedPanelsContent"> <!-- Photography - Content 3 -->
              <div id="TabbedPanels2" class="TabbedPanels">
                <ul class="TabbedPanelsTabGroup">
                  <li class="TabbedPanelsTab" tabindex="0">New</li>
                  <li class="TabbedPanelsTab" tabindex="0">Roses</li>
                  <li class="TabbedPanelsTab" tabindex="0">Calla Lilies</li>
                  <li class="TabbedPanelsTab" tabindex="0">Other Blossoms and Leaves</li>
                  <li class="TabbedPanelsTab" tabindex="0">Pacific Grove Beach</li>
                  <li class="TabbedPanelsTab" tabindex="0">Monterey Harbor and Beach</li>
                  <li class="TabbedPanelsTab" tabindex="0">Big Sur Coast</li>
                  <li class="TabbedPanelsTab" tabindex="0">Salinas Valley</li>
                  <li class="TabbedPanelsTab" tabindex="0">Animals</li>
                  <li class="TabbedPanelsTab" tabindex="0">Night</li>
                  <li class="TabbedPanelsTab" tabindex="0">Church</li>
                  <li class="TabbedPanelsTab" tabindex="0">Other</li>
                </ul>
                <div class="TabbedPanelsContentGroup-2">
                  <div class="TabbedPanelsContent-2">
                    <div spry:region="dsnew dsdatanew"> <img src="{dsdatanew::thumbnail/@base}{thumbname}" width = {thumbwidth}px height = {thumbheight}px spry:repeat="dsnew" onclick="dsnew.setCurrentRow('{ds_RowID}');" /></div>
                  </div>
                  <div class="TabbedPanelsContent-2">
                    <div spry:region="dsrose dsdatarose"> <img src="{dsdatarose::thumbnail/@base}{thumbname}" width = {thumbwidth}px height = {thumbheight}px spry:repeat="dsrose" onclick="window.dsphoto=dsrose; window.dsphotodata=dsdatarose;window.dsphoto.setCurrentRow('{ds_RowID}');" /></div>
                  </div>
                  <div class="TabbedPanelsContent-2">
                    <div spry:region="dscallalily dsdatacallalily"> <img src="{dsdatacallalily::thumbnail/@base}{thumbname}" width = {thumbwidth}px height = {thumbheight}px spry:repeat="dscallalily" onclick="dscallalily.setCurrentRow('{ds_RowID}');" /></div>
                  </div>
                  <div class="TabbedPanelsContent-2">
                    <div spry:region="dsblossom dsdatablossom"> <img src="{dsdatablossom::thumbnail/@base}{thumbname}" width = {thumbwidth}px height = {thumbheight}px spry:repeat="dsblossom" onclick="dsblossom.setCurrentRow('{ds_RowID}');" /></div>
                  </div>
                  <div class="TabbedPanelsContent-2">
                    <div spry:region="dspgbeach dsdatapgbeach"> <img src="{dsdatapgbeach::thumbnail/@base}{thumbname}" width = {thumbwidth}px height = {thumbheight}px spry:repeat="dspgbeach" onclick="dspgbeach.setCurrentRow('{ds_RowID}');" /></div>
                  </div>
                  <div class="TabbedPanelsContent-2">
                    <div spry:region="dsMonterey dsdataMonterey"> <img src="{dsdataMonterey::thumbnail/@base}{thumbname}" width = {thumbwidth}px height = {thumbheight}px spry:repeat="dsMonterey" onclick="dsMonterey.setCurrentRow('{ds_RowID}');" /></div>
                  </div>
                  <div class="TabbedPanelsContent-2">
                    <div spry:region="dsbigsurcoast dsdatabigsurcoast"> <img src="{dsdatabigsurcoast::thumbnail/@base}{thumbname}" width = {thumbwidth}px height = {thumbheight}px spry:repeat="dsbigsurcoast" onclick="dsbigsurcoast.setCurrentRow('{ds_RowID}');" /></div>
                  </div>
                  <div class="TabbedPanelsContent-2">
                    <div spry:region="dsSalinas dsdataSalinas"> <img src="{dsdataSalinas::thumbnail/@base}{thumbname}" width = {thumbwidth}px height = {thumbheight}px spry:repeat="dsSalinas" onclick="dsSalinas.setCurrentRow('{ds_RowID}');" /></div>
                  </div>
                  <div class="TabbedPanelsContent-2">
                    <div spry:region="dsanimal dsdataanimal"> <img src="{dsdataanimal::thumbnail/@base}{thumbname}" width = {thumbwidth}px height = {thumbheight}px spry:repeat="dsanimal" onclick="dsanimal.setCurrentRow('{ds_RowID}');" /></div>
                  </div>
                  <div class="TabbedPanelsContent-2">
                    <div spry:region="dsnight dsdatanight"> <img src="{dsdatanight::thumbnail/@base}{thumbname}" width = {thumbwidth}px height = {thumbheight}px spry:repeat="dsnight" onclick="dsnight.setCurrentRow('{ds_RowID}');" /></div>
                  </div>
                  <div class="TabbedPanelsContent-2">
                    <div spry:region="dschurch dsdatachurch"> <img src="{dsdatachurch::thumbnail/@base}{thumbname}" width = {thumbwidth}px height = {thumbheight}px spry:repeat="dschurch" onclick="dschurch.setCurrentRow('{ds_RowID}');" /></div>
                  </div>
                  <div class="TabbedPanelsContent-2">
                    <div spry:region="dsother dsdataother"> <img src="{dsdataother::thumbnail/@base}{thumbname}" width = {thumbwidth}px height = {thumbheight}px spry:repeat="dsother" onclick="dsother.setCurrentRow('{ds_RowID}');" /></div>
                  </div>
                </div>
              </div>
            </div>
            <!-- End "Photography Content 3" Tabbed Panels Content. -->
          </div>
        </div>
      </div><!-- End div "leftColumn" -->
      <div id="header">
        <p>Envision Moore<br />
          Mechanical Engineering and Photography<br />
          Scott W. Moore </p>
      </div><!-- End div "header". -->
      <div id="selectedPhoto">
      <div id="Selection" spry:detailregion = "dsphoto dsphotodata"  >
    <!-- Selected photographs are 400px tall. -->
    <img src="Photo-Email/{name}" width = {width}px height = {height}px align="center" />
      <br />
    Description<br /><br />
    <p> {dsphotodata::email/base}{description} </p>
    </div>
    </div> <!-- End div "selectedPhoto". -->
    </div> <!-- End div "wrapper" -->
    <script type="text/javascript">
    <!--
    var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
    var TabbedPanels2 = new Spry.Widget.TabbedPanels("TabbedPanels2");
    //-->
    </script>
    </body>
    </html>

    You do not need multiple data sets. Just the one dataset with all of your photos is sufficient. Then in each tab content you filter the data that you want shown using spry:test="'{subject'}=='roses'" or similar. You will have one spry:region and one spry:detailregion. All very simple
    For master/detail see http://livedocs.adobe.com/en_US/Spry/1.4/help.html?content=WS9F9E1959-1FDF-4fa3-A9AC-20E92 8E07ED1.html
    For spry:test see http://labs.adobe.com/technologies/spry/articles/data_api/apis/attributes.html
    I hope this helps.
    Ben

  • MDX - function expects a string or numeric expression for the 1 argument. A tuple set expression was used.

    why this query
    select [Measures].[F Events Count] on 0,
    Filter([D Actor Player].[Actor].children,
    ([Measures].[F Events Count],
    {([D Date].[Hierarchy].[Season].[2012 - 2013]),([D Date].[Hierarchy].[Season].[2013 - 2014])},
    [D Result].[Result].&[Goal])
    >=5) on 1
    from [FBA Cube]
    gives this error:
    Query (3, 3) The >= function expects a string or numeric expression for the 1 argument. A tuple set expression was used.
    while the following query works fine
    select [Measures].[F Events Count] on 0,
    Filter([D Actor Player].[Actor].children,
    ([Measures].[F Events Count],
    [D Date].[Hierarchy].[Season].[2012 - 2013],
    [D Result].[Result].&[Goal])
    >=5) on 1
    from [FBA Cube]
    why having set inside Filter's boolean expression generates that error? how can we
    keep the set inside the Filter's boolean expression but
    solve the problem? please explain the reason and solution

    Hi Butmah ,
    I think you should use an aggregation function with the set and the tuple ... adding an AdventureWorks snippet :
    select [Measures].[Order Count] on 0,
    Filter([Product].[Category].children,
    SUM({[Date].[Fiscal].[Fiscal Year].&[2011],[Date].[Fiscal].[Fiscal Year].&[2009]}
    ,([Measures].[Order Count],[Geography].[Geography].[Country].&[United States])
    >=5) on 1 
    from [Adventure Works]
    Regards, David .

  • Loop through files locating specific data sets

    Hi there,
    I have been given the wonderful task of developing a setup which needs to do the following using JCAPS:
    - open and read through various flat files in a folder. These flat files have random data sets in them, where a line starting with 01, marks the start of a data set and 99, marks the end of a data set. 03, marks the line where the account number can be found.
    - retrieve the account number from the data sets and verify that against an external Oracle database table.
    - if account number is found, then read the data set from the flat file and write the data set to an output file.
    - if the account number is not found in the Oracle database table, just discard the dataset and continue with the next data set.
    If you have any ideas on how to set this up, that would be much appreciated. No need to spell things out, but if anyone has worked on a scenario like this or similar using JCAPS to do the trick please let me know.
    A scenario variant is that, instead of looking up the account number against the oracle database, we can use an if-statement like "if the currency is GBP, EUR, SEK, then take the data set from the input file and write the data set to the output file.
    I can create an input OTD to read in the data sets, and an output OTD which creates the output file. There is a blank line between data sets. The structure of a data set looks like this:
    01,CITIDIRECT,2978169,080922,0401,04010900,999,,2/
    02,2978169,400515,1,080919,0000,USD,2/
    03,57787314,USD,010,2191397371,,,015,2191397371,,,030,2191397371,,,040,2191397371,,,045,2191397371,,,060,2191397371,,,072,000,,,074,000,,,100,000,0,,400,000,0,,470,000,0,/
    49,13148384226,2/
    03,57787322,USD,010,1494730626,,,015,1494730626,,,030,1494730626,,,040,1494730626,,,045,1494730626,,,060,1494730626,,,072,000,,,074,000,,,100,000,0,,400,000,0,,470,000,0,/
    49,8968383756,2/
    03,57787349,USD,010,423382915,,,015,423382915,,,030,423382915,,,040,423382915,,,045,423382915,,,060,423382915,,,072,000,,,074,000,,,100,000,0,,400,000,0,,470,000,0,/
    49,2540297490,2/
    98,24657065472,3,8/
    99,24657065472,1,10/
    Thanks & Kind Regards,
    Richard

    Yes
    1. Have a variable inside SSIS to get folder path. Set path based on your rule using an expression
    like
    (@[User::ProductName] == "Product" ? "\\....\Src\Product" : (@[User::ProductName] == "Product_NCP" ? \\....\Src\Product_NCP:..))
    similary archive
    (@[User::ProductName] == "Product" ? "\\....\Src\Product\Archive" : (@[User::ProductName] == "Product_NCP" ? "\\....\Src\Product_NCP\Archive" :..))
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Open data set and close data set

    hi all,
    i have some doubt in open/read/close data set
    how to transfer data from internal table to sequential file, how we find sequential file.
    thanks and regards
    chaitanya

    Hi Chaitanya,
    Refer Sample Code:
    constants:   c_split         TYPE c
                               VALUE cl_abap_char_utilities=>horizontal_tab,
               c_path          TYPE char100
                               VALUE '/local/data/interface/A28/DM/OUT'.
    Selection Screen
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS : rb_pc    RADIOBUTTON GROUP r1 DEFAULT 'X'
                                    USER-COMMAND ucomm,    "For Presentation
                 p_f1     LIKE rlgrap-filename
                                          MODIF ID rb1,    "Input File
                 rb_srv   RADIOBUTTON GROUP r1,             "For Application
                 p_f2     LIKE rlgrap-filename
                                         MODIF ID rb2,     "Input File
                 p_direct TYPE char128 MODIF ID abc DEFAULT c_path.
                                                           "File directory
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_f1.
    *-- Browse Presentation Server
      PERFORM f1000_browse_presentation_file.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_f2.
    *-- Browse Application Server
      PERFORM f1001_browse_appl_file.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF rb_pc = 'X' AND screen-group1 = 'RB2'.
          screen-input = '0'.
          MODIFY SCREEN.
        ELSEIF rb_srv = 'X' AND screen-group1 = 'RB1'.
          screen-input = '0'.
          MODIFY SCREEN.
        ENDIF.
        IF screen-group1 = 'ABC'.
          screen-input = '0'.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    *&      Form  f1000_browse_presentation_file
          Pick up the filepath for the file in the presentation server
    FORM f1000_browse_presentation_file .
      CONSTANTS: lcl_path TYPE char20 VALUE 'C:'.
      CALL FUNCTION 'WS_FILENAME_GET'
        EXPORTING
          def_path         = lcl_path
          mask             = c_mask  "',.,..'
          mode             = c_mode
          title            = text-006
        IMPORTING
          filename         = p_f1
        EXCEPTIONS
          inv_winsys       = 1
          no_batch         = 2
          selection_cancel = 3
          selection_error  = 4
          OTHERS           = 5.
      IF sy-subrc <> 0.
       MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        flg_pre = c_x.
      ENDIF.
    ENDFORM.                    " f1000_browse_presentation_file
    *&      Form  f1001_browse_appl_file
       Pick up the file path for the file in the application server
    FORM f1001_browse_appl_file .
      DATA:  lcl_directory  TYPE char128.
      lcl_directory  = p_direct.
      CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
        EXPORTING
          directory        = lcl_directory
          filemask         = c_mask
        IMPORTING
          serverfile       = p_f2
        EXCEPTIONS
          canceled_by_user = 1
          OTHERS           = 2.
      IF sy-subrc <> 0.
       MESSAGE e000(zmm) WITH text-039.
       flg_app = 'X'.
      ENDIF.
    ENDFORM.                    " f1001_browse_appl_file
    *&      Form  f1003_pre_file
        Upload the file from the presentation server
    FORM f1003_pre_file .
      DATA: lcl_filename TYPE string.
      lcl_filename = p_f1.
      IF p_f1 IS NOT INITIAL.
        CALL FUNCTION 'GUI_UPLOAD'
          EXPORTING
            filename                = lcl_filename
            filetype                = 'ASC'
            has_field_separator     = 'X'
          TABLES
            data_tab                = i_input
          EXCEPTIONS
            file_open_error         = 1
            file_read_error         = 2
            no_batch                = 3
            gui_refuse_filetransfer = 4
            invalid_type            = 5
            no_authority            = 6
            unknown_error           = 7
            bad_data_format         = 8
            header_not_allowed      = 9
            separator_not_allowed   = 10
            header_too_long         = 11
            unknown_dp_error        = 12
            access_denied           = 13
            dp_out_of_memory        = 14
            disk_full               = 15
            dp_timeout              = 16
            OTHERS                  = 17.
        IF sy-subrc <> 0.
          MESSAGE s000 WITH text-031.
          EXIT.
        ENDIF.
      ELSE.
       PERFORM populate_error_log USING space
                                        text-023.
      ENDIF.
    ENDFORM.                    " f1003_pre_file
    *&      Form  f1004_app_file
         upload the file from the application server
    FORM f1004_app_file .
      REFRESH: i_input.
      OPEN DATASET p_f2 IN TEXT MODE ENCODING DEFAULT FOR INPUT.
      IF sy-subrc EQ 0.
        DO.
          READ DATASET p_f2 INTO  wa_input_rec.
          IF sy-subrc EQ 0.
    *-- Split The CSV record into Work Area
            PERFORM f0025_record_split.
    *-- Populate internal table.
            APPEND wa_input TO i_input.
            CLEAR wa_input.
            IF sy-subrc <> 0.
              MESSAGE s000 WITH text-030.
              EXIT.
            ENDIF.
          ELSE.
            EXIT.
          ENDIF.
        ENDDO.
      ENDIF.
    ENDFORM. " f1004_app_file
    Move the assembly layer file into the work area
    FORM f0025_record_split .
      CLEAR wa_input.
      SPLIT wa_input_rec AT c_split INTO
        wa_input-legacykey
        wa_input-bu_partner
        wa_input-anlage.
    ENDFORM.                    " f0025_record_split
    Reward points if this helps.
    Manish

  • Report Builder Wizard and Parameter Creation with values from other data source e.g. data set or views for non-IT users or Business Analysts

    Hi,
    "Report Builder is a report authoring environment for business users who prefer to work in the Microsoft Office environment.
    You work with one report at a time. You can modify a published report directly from a report server. You can quickly build a report by adding items from the Report Part Gallery provided by report designers from your organization." - As mentioned
    on TechNet. 
    I wonder how a non-technical business analyst can use Report Builder 3 to create ad-hoc reports/analysis with list of parameters based on other data sets.
    Do they need to learn TSQL or how to add and link parameter in Report Builder? then How they can add parameter into a report. Not sure what i am missing from whole idea behind Report builder then?
    I have SQL Server 2012 STD and Report Builder 3.0  and want to train non-technical users to create reports as per their need without asking to IT department.
    Everything seems simple and working except parameters with list of values e.g. Sales year List, Sales Month List, Gender etc. etc.
    So how they can configure parameters based on Other data sets?
    Workaround in my mind is to create a report with most of columns and add most frequent parameters based on other data sets and then non-technical user modify that report according to their needs but that way its still restricting users to
    a set of defined reports?
    I want functionality like "Excel Power view parameters" into report builder which is driven from source data and which is only available Excel 2013 onward which most of people don't have yet.
    So how to use Report Builder. Any other thoughts or workaround or guide me the purpose of Report Builder, please let me know. 
    Many thanks and Kind Regards,
    For quick review of new features, try virtual labs: http://msdn.microsoft.com/en-us/aa570323

    Hi Asam,
    If we want to create a parameter depend on another dataset, we can additional create or add the dataset, embedded or shared, that has a query that contains query variables. Then use the option that “Get values from a
    query” to get available values. For more details, please see:http://msdn.microsoft.com/en-us/library/dd283107.aspx
    http://msdn.microsoft.com/en-us/library/dd220464.aspx
    As to the Report Builder features, we can refer to the following articles:http://technet.microsoft.com/en-us/library/hh213578.aspx
    http://technet.microsoft.com/en-us/library/hh965699.aspx
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • OIM 9.1 User data set

    Hi,
    In release note of 9.1 it is mentioned that :
    Display of all OIM User attributes on the Step 3: Modify Connector Configuration page
    On the Step 3: Modify Connector Configuration page, the OIM - User data set now shows all the OIM User attributes. In the earlier release, the display of fields was restricted to the ones that were most commonly used.
    and
    Attributes of the ID field are editable
    On the Step 3: Modify Connector Configuration page, you can modify some of the attributes of the ID field. The ID field stores the value that uniquely identifies a user in Oracle Identity Manager and in the target system.
    Can anyone please guide me how to get both things as I am getting only few fields of user profile in OIM-USer data set and also not able to modify ID field.
    I am using OIM 9.1 on Websphere application server 6.1
    Thanks

    Unfortunately i do not have experience using the SPML generic connector. Have you read through all the documentation pertaining to the GTC?
    -Kevin

  • Multiple data sets: a common global dataset and per/report data sets

    Is there a way to have a common dataset included in an actual report data set?
    Case:
    For one project I have about 70 different letters, each letter being a report in Bi Publisher, each one of them having its own dataset(s).
    However all of these letters share a common standardized reference block (e.g. the user, his email address, his phone number, etc), this common reference block comes from a common dataset.
    The layout of the reference block is done by including a sub-llayout (rtf-file).
    The SQL query for getting the dataset of the reference block is always the same, and, for now, is included in each of the 70 reports.
    Ths makes maintenance of this reference block very hard, because each of the 70 reports must be adapted when changes to the reference block/dataset are made.
    Is there a better way to handle this? Can I include a shared dataset that I would define and maintain only once, in each single report definition?

    Hi,
    The use of the subtemplate for the centrally managed layout, is ok.
    However I would like to be able to do the same thing for the datasets in the reports:
    one centrally managed data set (definition) for the common dataset, which is dynamic!, and in our case, a rather complex query
    and
    datasets defined on a per report basis
    It would be nice if we could do a kind of 'include dataset from another report' when defining the datasets for a report.
    Of course, this included dataset is executed within each individual report.
    This possibility would make the maintenance of this one central query easier than when we have to maintain this query in each of the 70 reports over and over again.

  • SQL Update a Single Row Multiple Times Using 2 Data Sets

    I'm working in tsql and have an issue where I need to do multiple updates to a single row based on multiple conditions. 
    By Rank_
    If the column is NULL I need it to update no matter what the Rank is.
    If the Ranks are the same I need it to update in order of T2_ID.
    And I need it to use the last updated output.
    I've tried using the update statement below but it only does the first update and the rest are ignored. Here is an example of the data sets i'm working w/ and the Desired results. Thanks in advance!
    update a
    set Middle = case when a.Rank_> b.Rank_ OR a.Middle IS NULL then ISNULL(b.Middle,a.Middle) end,
    LName = case when a.Rank_> b.Rank_ OR a.Lname IS NULL then ISNULL(b.LName,a.LName) end,
    Rank_ = case when a.Rank_> b.Rank_ then b.Rank_ end
    from #temp1 a
    inner join #temp2 b on a.fname = b.fname
    where b.T2_ID in (select top 100% T2_ID from #temp2 order by T2_ID asc)

    The Merge clause actually errors because it attempt to update the same record.  I think this CTE statement is the closest I've come but I'm still working through it as I'm not too familiar w/ them.  It returns multiple rows which I will have to
    insert into a temp table to update since the resulting row I need is the last in the table.
    ;WITH cteRowNumber
    AS(
    Select DISTINCT
    Row_Number() OVER(PARTITION BY a.LName ORDER BY a.LName ASC, a.Rank_ DESC,b.T2ID ASC) AS RowNumber
    ,a.FName
    ,a.LName
    ,b.LName as xLname
    ,a.MName
    ,b.MName AS xMName
    ,a.Rank_
    ,b.Rank_ AS xRank
    ,b.T2ID
    FROM #temp1 a
    inner join #temp2 b
    ON a.fname = b.fname
    ), cteCursor
    AS(
    Select a.RowNumber,
    a.Fname
    ,a.LName
    ,a.xLname
    ,a.MName
    ,a.xMName
    ,a.xRank
    ,a.T2ID
    ,CASE WHEN a.Rank_ >= a.xRank THEN ISNULL(a.xRank,a.Rank_) else ISNULL(a.Rank_,a.xRank) end AS Alt_Rank_
    ,CASE WHEN a.Rank_ >= a.xRank THEN ISNULL(a.xMName,a.MName) else ISNULL(a.MName,a.xMName) end AS Alt_MName
    ,CASE WHEN a.Rank_ >= a.xRank THEN ISNULL(a.xLName,a.lname) else ISNULL(a.LName,a.xlname) end as Alt_Lname
    FROM cteRowNumber a
    where a.RowNumber = 1
    UNION ALL
    Select crt.RowNumber
    ,crt.FName
    ,crt.LName
    ,crt.xLname
    ,crt.MName
    ,crt.xMName
    ,crt.xRank
    ,crt.T2ID
    ,CASE WHEN Prev.Alt_Rank_ >= crt.xRank THEN ISNULL(crt.xRank,Prev.Alt_Rank_) else ISNULL(Prev.Alt_Rank_,crt.xRank) end AS Alt_Rank
    ,CASE WHEN Prev.Alt_Rank_ >= crt.xRank THEN ISNULL(crt.xMName,Prev.Alt_MName) else ISNULL(Prev.Alt_MName,crt.xMName) end AS Alt_MName
    ,CASE WHEN Prev.Alt_Rank_ >= crt.xRank THEN ISNULL(crt.xLName,Prev.Alt_Lname) else ISNULL(Prev.Alt_Lname,crt.xLName) end as Alt_Lname
    FROM cteCursor prev
    inner join cteRowNumber crt
    on prev.fname = crt.fname and prev.RowNumber + 1 = crt.RowNumber
    SELECT cte.*
    FROM cteCursor cte

  • OBIEE 11g BI Publisher; New Data Set Creation Error "Failed to load SQL"

    Hi,
    I'm trying to create a new SQL data set (from a client machine). I use "query builder" to build the data set. But when I click "OK", it fires the error "Failed to load SQL".
    But strangely, if connect to the OBIEE server's desktop and create the data set it works without any issues. I wonder this would be a firewall issue. If so what are the ports I should open.
    It's a enterprise installation. And we have already open 9703, 9704, and 9706.
    Has anyone came across such a situation?

    Talles,
    First of all you might have more chance of getting a response over in the BIP forum. Other than that all I can think of is: is your MS SQL Server running with mixed mode auth?

  • Exception Handling for OPEN DATA SET and CLOSE DATA SET

    Hi ppl,
    Can you please let me know what are the exceptions that can be handled for open, read, transfer and close data set ?
    Many Thanks.

    HI,
    try this way....
      DO.
        TRY.
        READ DATASET filename INTO datatab.
          CATCH cx_sy_conversion_codepage cx_sy_codepage_converter_init
                cx_sy_file_authority cx_sy_file_io cx_sy_file_open .
        ENDTRY.
    READ DATASET filename INTO datatab.
    End of changes CHRK941728
        IF sy-subrc NE 0.
          EXIT.
        ELSE.
          APPEND datatab.
        ENDIF.
      ENDDO.

  • Download using open data set and close data set

    can any body please send some sample pgm using open data set and close data set .the data should get downloaded in application server
    very simple pgm needed

    Hi Arun,
    See the Sample code for BDC using OPEN DATASET.
    report ZSDBDCP_PRICING no standard page heading
    line-size 255.
    include zbdcrecx1.
    *--Internal Table To hold condition records data from flat file.
    Data: begin of it_pricing occurs 0,
    key(4),
    f1(4),
    f2(4),
    f3(2),
    f4(18),
    f5(16),
    end of it_pricing.
    *--Internal Table To hold condition records header .
    data : begin of it_header occurs 0,
    key(4),
    f1(4),
    f2(4),
    f3(2),
    end of it_header.
    *--Internal Table To hold condition records details .
    data : begin of it_details occurs 0,
    key(4),
    f4(18),
    f5(16),
    end of it_details.
    data : v_sno(2),
    v_rows type i,
    v_fname(40).
    start-of-selection.
    refresh : it_pricing,it_header,it_details.
    clear : it_pricing,it_header,it_details.
    CALL FUNCTION 'UPLOAD'
    EXPORTING
    FILENAME = 'C:\WINDOWS\Desktop\pricing.txt'
    FILETYPE = 'DAT'
    TABLES
    DATA_TAB = it_pricing
    EXCEPTIONS
    CONVERSION_ERROR = 1
    INVALID_TABLE_WIDTH = 2
    INVALID_TYPE = 3
    NO_BATCH = 4
    UNKNOWN_ERROR = 5
    GUI_REFUSE_FILETRANSFER = 6
    OTHERS = 7.
    WRITE : / 'Condition Records ', P_FNAME, ' on ', SY-DATUM.
    OPEN DATASET P_FNAME FOR INPUT IN TEXT MODE.
    if sy-subrc ne 0.
    write : / 'File could not be uploaded.. Check file name.'.
    stop.
    endif.
    CLEAR : it_pricing[], it_pricing.
    DO.
    READ DATASET P_FNAME INTO V_STR.
    IF SY-SUBRC NE 0.
    EXIT.
    ENDIF.
    write v_str.
    translate v_str using '#/'.
    SPLIT V_STR AT ',' INTO it_pricing-key
    it_pricing-F1 it_pricing-F2 it_pricing-F3
    it_pricing-F4 it_pricing-F5 .
    APPEND it_pricing.
    CLEAR it_pricing.
    ENDDO.
    IF it_pricing[] IS INITIAL.
    WRITE : / 'No data found to upload'.
    STOP.
    ENDIF.
    loop at it_pricing.
    At new key.
    read table it_pricing index sy-tabix.
    move-corresponding it_pricing to it_header.
    append it_header.
    clear it_header.
    endat.
    move-corresponding it_pricing to it_details.
    append it_details.
    clear it_details.
    endloop.
    perform open_group.
    v_rows = sy-srows - 8.
    loop at it_header.
    perform bdc_dynpro using 'SAPMV13A' '0100'.
    perform bdc_field using 'BDC_CURSOR'
    'RV13A-KSCHL'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'RV13A-KSCHL'
    it_header-f1.
    perform bdc_dynpro using 'SAPMV13A' '1004'.
    perform bdc_field using 'BDC_CURSOR'
    'KONP-KBETR(01)'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'KOMG-VKORG'
    it_header-f2.
    perform bdc_field using 'KOMG-VTWEG'
    it_header-f3.
    **Table Control
    v_sno = 0.
    loop at it_details where key eq it_header-key.
    v_sno = v_sno + 1.
    clear v_fname.
    CONCATENATE 'KOMG-MATNR(' V_SNO ')' INTO V_FNAME.
    perform bdc_field using v_fname
    it_details-f4.
    clear v_fname.
    CONCATENATE 'KONP-KBETR(' V_SNO ')' INTO V_FNAME.
    perform bdc_field using v_fname
    it_details-f5.
    if v_sno eq v_rows.
    v_sno = 0.
    perform bdc_dynpro using 'SAPMV13A' '1004'.
    perform bdc_field using 'BDC_OKCODE'
    '=P+'.
    perform bdc_dynpro using 'SAPMV13A' '1004'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    endif.
    endloop.
    *--Save
    perform bdc_dynpro using 'SAPMV13A' '1004'.
    perform bdc_field using 'BDC_OKCODE'
    '=SICH'.
    perform bdc_transaction using 'VK11'.
    endloop.
    perform close_group.
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

  • What is open data set and close data set

    what is open data set and close data set,
    how to use the files in sap directories ?

    hi,
    Open Dataset is used to read or write on to application server ... other than that i am not sure that there exists any way to do the same ... here is a short description for that
    FILE HANDLING IN SAP
    Introduction
    • Files on application server are sequential files.
    • Files on presentation server / workstation are local files.
    • A sequential file is also called a dataset.
    Handling of Sequential file
    Three steps are involved in sequential file handling
    • OPEN
    • PROCESS
    • CLOSE
    Here processing of file can be READING a file or WRITING on to a file.
    OPEN FILE
    Before data can be processed, a file needs to be opened.
    After processing file is closed.
    Syntax:
    OPEN DATASET <file name> FOR {OUTPUT/INPUT/APPENDING}
    IN {TEXT/BINARY} MODE
    This statement returns SY_SUBRC as 0 for successful opening of file or 8, if unsuccessful.
    OUTPUT: Opens the file for writing. If the dataset already exists, this will place the cursor at the start of the dataset, the old contents get deleted at the end of the program or when the CLOSE DATASET is encountered.
    INPUT: Opens a file for READ and places the cursor at the beginning of the file.
    FOR APPENDING: Opens the file for writing and places the cursor at the end of file. If the file does not exist, it is generated.
    BINARY MODE: The READ or TRANSFER will be character wise. Each time ‘n’’ characters are READ or transferred. The next READ or TRANSFER will start from the next character position and not on the next line.
    IN TEXT MODE: The READ or TRANSFER will start at the beginning of a new line each time. If for READ, the destination is shorter than the source, it gets truncated. If destination is longer, then it is padded with spaces.
    Defaults: If nothing is mentioned, then defaults are FOR INPUT and in BINARY MODE.
    PROCESS FILE:
    Processing a file involves READing the file or Writing on to file TRANSFER.
    TRANSFER Statement
    Syntax:
    TRANSFER <field> TO <file name>.
    <Field> can also be a field string / work area / DDIC structure.
    Each transfer statement writes a statement to the dataset. In binary mode, it writes the length of the field to the dataset. In text mode, it writes one line to the dataset.
    If the file is not already open, TRANSFER tries to OPEN file FOR OUTPUT (IN BINARY MODE) or using the last OPEN DATASET statement for this file.
    IF FILE HANDLING, TRANSFER IS THE ONLY STATEMENT WHICH DOES NOT RETURN SY-SUBRC
    READ Statement
    Syntax:
    READ DATASET <file name> INTO <field>.
    <Field> can also be a field string / work area / DDIC structure.
    Each READ will get one record from the dataset. In binary mode it reads the length of the field and in text mode it reads each line.
    CLOSE FILE:
    The program will close all sequential files, which are open at the end of the program. However, it is a good programming practice to explicitly close all the datasets that were opened.
    Syntax:
    CLOSE DATASET <file name>.
    SY-SUBRC will be set to 0 or 8 depending on whether the CLOSE is successful or not.
    DELETE FILE:
    A dataset can be deleted.
    Syntax:
    DELETE DATASET <file name>.
    SY-SUBRC will be set to 0 or 8 depending on whether the DELETE is successful or not.
    Pseudo logic for processing the sequential files:
    For reading:
    Open dataset for input in a particular mode.
    Start DO loop.
    Read dataset into a field.
    If READ is not successful.
    Exit the loop.
    Endif.
    Do relevant processing for that record.
    End the do loop.
    Close the dataset.
    For writing:
    Open dataset for output / Appending in a particular mode.
    Populate the field that is to be transferred.
    TRANSFER the filed to a dataset.
    Close the dataset.
    Regards
    Anver
    if hlped pls mark points

Maybe you are looking for

  • The payment terms are not getting reflected in PO

    Hi, We are in SRM5.0 Extended Classic scenario. We have created new payment term in ECC and transferred to SRM using BBP_UPLOAD_PAYMENT_TERMS and after tranferring it to SRM I am able to see the new payment term in table BBP_PAYTERM and BBP_PAYTERM_T

  • I can't get free apps without a credit card?

    I'm trying to open up the app store on itunes, I just created an account and I went through the steps until I got to the page called "Review Payment Information, I don't have a credit card and it won't let me proceed without entering info, please hel

  • Can't install air application from website

    I am trying to install an Adobe Air application from a local web page using badge but get the "Something went wrong trying to install this application" When I click on the .air file directly all works ok One thing I've noticed is that if I try to lau

  • Keyboard settings are lost with new keyboard

    My apple wireless broke and I wanted a bigger keyboard so I replaced the wireless with a standard keyboard that you plug in. HOWEVER: All my shortcuts are mismatched. Its as if the computer is thinking I am still using a wireless keyboard. How do I r

  • My MacBook Pro has gone off and now won't turn on or charge

    Lastnight my MacBook Pro had full battery and then suddenly went off, I tried to turn it back on and it wouldn't. Then I plugged in the charger and usually the little green light on the charger comes on and it didn't. It still won't turn on. Help ple