How to create a formula based condition in bex query designer

hi all,
i have scenario in query designer where i need to calculate Key performance indexes based on characters and key figures iam using.for example the condition is like:
"if call received is less than call projection then give call received else null"
how and where to define the condition and i need to name the condition to display it seperatly.please help me in this issue.
regards
Vamshi D Krishna

hi you have to break down your conditions and then code for them.
for e.ge.
if actual == 0
  vart = 0.
else if actual-target ==0
          vart = 0.001
       else
         vart = actual -target
       endif
endif
now we start with first condition use operators from boolean catagory
(Actual != 0)*(other amount)
this solves first if condition... if actual  = 0 value actual != 0 will be zero we got our desired value.
if other case then we have give else condition.
(Actual != 0)*(((actual - target) == 0 )*0.001+((actual-target)!=0)*(actual-target))
in the second half we have coded the else part.
in the same way you can proceed for your logic

Similar Messages

  • Usage of formulas in conditions in BEx Query Designer

    Hi guys,
    does anybody of you guys know, if it's possible to use the results of formulas in conditions? I tried it, but the result of the query was "No applicable data found", but there are data for the selection.
    When I'm defining the condition with the key figure (no restricted or calculated key figure), then the query can be executed.
    In my case, I like to define a condition based on a formula result. The value should only be displayed, when the result is greater than 30.
    Any ideas or are there any bugy in the BEx Query Designer?
    Thanks a lot + best regards,
    Clemens

    Hi Clemens,
    I have created a condition in my own system based on formula and it works perfectly fine. Please check following points in your condition change mode,
    1) Condition is marked as Active.
    2) In the block "Evaluate condition below for" you will have to select "All characteristics in drilldown Independently". If you have selected combination of characteristics then you will have to maintain proper sequence otherwise your condition will not work.
    3) In the next block when you set the condition, click on new, in the first block select your Formula from dropdown and set the proper operator in your case you will have to select "Greater than" in the next column set the value of key figure and just trasnfer it.
    Now you are ready to use the condition.
    Regards,
    Durgesh.

  • How to create user function in Data Functions in Query Designer?

    Could someone tell me how to create user function in Data Functions in Query Designer?
    I mean function like "NDIV0" in Data Functions.
    SAP BW 3.x.
    Query Designer (SAP BW 3.x)

    Hi check the following URL, it gives how to add in Formulas in formula Builder, not in DataFunctions.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f095592f-42f7-2a10-6ab1-c836a559b48f
    Thanks
    Reddy

  • Options in Assignment of Condition in BEX Query Designer

    Hi Experts,
      I am trying to define a condition in BEX Query Designer.
    I defined my condition and bit confused with Characterstic Assignment
    What Happens if is select 9What is the difference)
    1) All Characterstic in the Drilldown Independtly
    2)Most Detailed  Characterstic Along the Rows
    3)Most Detailed Characterstic Along Columns and
    4)Individual Chars and Chars.Combinations
    Thanks

    hi,
    chk the link
    Query creation
    http://help.sap.com/saphelp_nw70/helpdata/EN/f1/0a5625e09411d2acb90000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/EN/42/d21c1f46076bb2e10000000a1553f6/content.htm
    Ramesh

  • How to create a formula based on group level

    Hi,
    If there are three group level ins a report:
    How can I creat a formula to put on page header depended on current group level?
    Thanks!

    Thanks, Abhilash ans Sastry
    I really try to do is to show different text on page header depend on which group level is. the reason is that if there are multi pages group footer, only the first page has group name on tilte if I put group name on the footer.
    I would like to put group name on page header, but have to know which group level is.
    Thanks again

  • How to create an LOV based on a dynamic query

    Hi,
    Can someone tell me how to query a dynamic query for LOV. On my base page I have a dropdown-box (that will show the table names for searching) and is dynamically populated based on users access e.g. if user A logs in he may see 5 values (these values are basically table names) in a drop down if user B logs in he may see 10 values. I also have two input fields one field a user can enter value and the other field is read only and a torch icon for LOV so the user can search and select values that are populated in the input fields on the base page.
    How can I have my LOV that takes in a value selected in the dropdown and anyvalue entered in one of the input fields and search in the table selected in the dropdown box.
    Basically my LOV should do a search on the table and some search value passed when clicking on the torch icon. So a user can select any table-name in the drop down and my LOV should do a search only on the selected table. Once on the LOV Popup want to have a search field there but it only searched on the table selected in the dropdown on the based page. And the selected value on the LOV Popup page gets populated in fields on the base page.
    Any help is appreciated.
    Thanks

    Hi,
    I have created 4 SQL Based VO's with the following sqls
    SELECT header_id AS ID, to_char(order_number) AS NAME
      FROM oe_order_headers_all
    SELECT party_id AS ID, party_name AS NAME
      FROM hz_parties
    SELECT quote_header_id AS ID,
           (quote_number || CHR (45) || quote_version) AS NAME
      FROM aso_quote_headers
    SELECT sales_lead_id AS ID, to_char(lead_number) AS NAME
      FROM as_sales_leadsI created on LOVRegin and have the following 2 messagestyle items now what do I set in the ViewInstance and View Attribute fields
    srcid
    srcname
    Can you provide some sample code to set ViewUsage and whereclause that I need to put in the controller of LOVRegion.
    Thanks

  • How to write a condition in BEX Query Designer

    Hi
    How can i write a condition in Query Designer
    Scenario
    An employee can purchase any no of policies in a day or month.each policy will have start date and expiry date.
    My requirment
    Count all the policies(valid) by employee on a ranges basis exception reporting
    (0-10;10-20;20-30;30-40) and then able to drill down by policy start date and expiry date.
    As per the requirment is to show policies which are not yet expired (active) i need to write a condition that will count only policies whose Expiry date is > Current calender day
    As Policy Expiry Date is a char i am converting it to KF using fourmala variable so that i can write a condition on it using current cal day formula variable sap exit
    But i char assigment of a condition i find 4 option
    How can i achieve this
    Thanks

    Hi Aurun,
    Thanks for the help,Really appreciated
    As this is my first enhancement using ABAP & CMOD
    What type of key (either Access or developer ) do i require to perform the following  enhancement......so that i can raise request with basis team
    I shall be great ful if u can asnwer below question
    First, you need to create a variable for expiry date with processing type as customer exit, and then give the necessary info.
    In details tab, unchk ready for input as we wont be taking the value from the prompt.
    Now go to CMOD transaction.
    Open the correcsponding project which has the exit code
    (How can i identify the project which has exit code)
    and go to ZXRSRU001 module inside taht.
    Go to the module where u write the exit.
    (How to locate the required module)
    Then, under i step 1, write the code:
    IF I_STEP = 1.
    CASE V_NAME  (What is 'V_NAME',Is it my variable technical name)
    WHEN 'X' " X is the variable u created for the exit
    l_s_range-low = SY-DATUM.
    l_s_range-opt = 'I'.
    l_s_range-sign = 'GT'.
    APPEND l_s_range TO e_t_range.
    END CASE.

  • Conditions In BEX Query Designer

    Hi Users,
    I have a scenario to be implemented in my queries.
    Scenario 1 -
    I have a Characteristic field F1.
    I have to create a coloum C1 in report display result which populates the below condition:
    If F1 = '12345' then C1 = YES
    ELSE it should be blank.
    Scenario 2:
    I have two date fields D1 and D2 with their corresponding KPI fields DV1 and DV2.
    DV1 is for D1 and DV2 is for D2.
    First D1 is compared with D2 and whichever is latest date then its corresponding field should be populated and other should not.
    Example if D1 is 01.04.2014 and D2 is 22.04.2014 and If DV1 is 100 and DV2 is 200
    Then only DV2 should be populated and DV1 should be empty.
    Can anyone please suggest?
    Regards
    Syed

    Two things to note before we move to solutions.
    You need to convert all the dates(D1 and D2)and characteristic (F1) fields into Keyfigure with the help of formula variable with replacement path which are to be used in if else condition for comparison.
    You cannot populate string (YES) at Bex lsevel so instead of that you may use number if that suits your requirement.
    Now once you have converted the same then write the condition as below:
    Scenario 1 -
    I have a Characteristic field F1.
    I have to create a coloum C1 in report display result which populates the below condition:
    If F1 = '12345' then C1 = YES
    ELSE it should be blank.
    (FV1==12345)*1+(FV1<>12345)*0
    For Scenario 2:
    (D1>D2)*DV1+(D1<D2)*DV2
    For converting the char into kfs refer the below document:
    Convert a Characteristic into a Key Figure (BEx)
    Hope this helps.
    Regards,
    AL

  • Results based on From and To value in Bex query designer.

    Dear all,
    We are using BI7.00. In one of our report which pertains to PM user wants to get the details of number of breakdowns which falls in the value range 0 to 1 hours.
    I created a condition which has 2 variables, one is From value and the other is for the To value (since user wants to enter both the limits). I have written a condition that if the breakdown hour is greater than or equal to variable1 and less than or equal to variable2.
    Using the above condition if the query is run, i am not getting the desired output. The values avaialble in the report are 0.65,0.78,1.30,7.38,0 etc., when i give 0 to 1 i should get the values 0.65,0.78 and 0 but instead report displays "No valid results".
    I changed the condition and selected "Between" variable 1 and variable 2 - yet no change in the query.
    To my knowledge i foresee that system is not able to recognize the decimal and hence provides details only based on the whole numbers.
    How to get my requirement achieved in the Bex query designer.
    Experts suggestion with steps will be very useful to solve my problem.
    Regards,
    M.M
    Edited by: Magesh Magesh on Dec 26, 2008 11:28 AM

    Hi Magesh,
    I think you could try one more way.
    Create a formula inserting your two formula variables for limits .(FV -  are ready for input ) .
    The formula would return the result as 1 or 0 because it would have boolean condition in it.
    You could then place a condition in the query designer to only show all records where the value of the formula key fig is 1.
    You formula A would look like
    ( KF > FV1) AND (KF < FV2) * 1.
    And in the condition put A EQ 1.
    You could scale the key figures as well and multiply the limits mentioned by the users in FV1 and FV2 if decimals are still not recognized by SAP.(scaling)
    Regards,
    Sunmit.

  • Condition (Defintion) in BEX Query Designer

    Hi Experts,
      I am trying to define a condition in BEX Query Designer.
    I defined my condition and bit confused with Characterstic Assignment
    What Happens if is select 9What is the difference)
    1) All Characterstic in the Drilldown Independtly
    2)Most Detailed  Characterstic Along the Rows
    3)Most Detailed Characterstic Along Columns and
    4)Individual Chars and Chars.Combinations
    Thanks

    Hi,
    <b>● All Characteristics in the Drilldown Independently</b>
    This setting allows you to apply a condition in a general way. Depending on which characteristics you use in the drilldown, you obtain different results.
    Note that the characteristics that are already used in an active condition for characteristic combinations are not included.
    This option is optimized for ranked list conditions, but can also be used for threshold value conditions with relative values.
    <b>●Most Detailed Characteristic Along the Rows or Columns</b>
    This option is optimized for threshold value conditions. The condition is applied to the most detailed characteristic of the rows or columns.
    Note that this function is not supported when executing the query in the BEx Analyzer. For more information, see Restrictions in the BEx Analyzer.
    <b>● Single Characteristics and Characteristic Combinations</b>
    This setting allows you to evaluate the condition for characteristics or characteristic combinations defined for specific drilldowns only. You can select any characteristic (of the characteristics used in the query in rows, columns, or in the free characteristics) or a characteristic combination.
    ○       If you only want to evaluate the condition when a certain characteristic is present in the drilldown, select this characteristic.
    ○       If you want to evaluate the condition for characteristic combinations, select multiple characteristics.
    Source:
    help.sap.com
    For more information and examples please check the following link:
    http://help.sap.com/saphelp_nw70/helpdata/EN/73/702e39074dc93de10000000a114084/frameset.htm
    Hope it helps.

  • How to create dynamic context based on a structure defined in the program?

    Hi Experts,
             I need to create a dynamic context based on a structure wa_struc which i have define programatically.
    When I pass wa_struc to structure_name parameter of create_nodeinfo_from_struc, i get a runtime error:
    "Parameter STRUCTURE_NAME contains an invalid value wa_struc."
    How to create dynamic context based on a structure defined in the program?
    I have written the code like this:
    TYPES: BEGIN OF t_type,
                v_carrid TYPE sflight-carrid,
                v_connid TYPE sflight-connid,
             END OF t_type.
      Data:  i_struc type table of t_type,
             wa_struc type t_type.
      data: dyn_node   type ref to if_wd_context_node.
      data: rootnode_info   type ref to if_wd_context_node_info.
      rootnode_info = wd_context->get_node_info( ).
      clear i_struc. refresh i_struc.
      select carrid connid into corresponding fields of table i_struc from sflight where carrid = 'AA'.
    cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
      parent_info = rootnode_info
      node_name = 'dynflight'
      structure_name = 'wa_struc'
      is_multiple = abap_true ).
    dyn_node = wd_context->get_child_node( name = 'dynflight' ).
    dyn_node->bind_table( i_struc ).
    Thanks
    Gopal
    Message was edited by: gopalkrishna baliga

    Hi Michelle,
              First of all Special thanks for your informative answers to my other forum questions. I really appreciate your help.
    Coming back to this question I am still waiting for an answer. Please help. Note that my structure is not in a dictionary.
    I am trying to create a new node. That is
    CONTEXT
    - DYNFLIGHT
    CARRID
    CONNID
    As you see above I am trying to create 'DYNFLIGHT' along with the 2 attributes which are inside this node. The structure of the node that is, no.of attributes may vary based on some condition. Thats why I am trying to create a node dynamically.
    Also I cannot define the structure in the ABAP dictionary because it changes based on condition
    I have updated my code like the following and I am getting error:
    TYPES: BEGIN OF t_type,
    CARRID TYPE sflight-carrid,
    CONNID TYPE sflight-connid,
    END OF t_type.
    Data: i_struc type table of t_type,
    dyn_node type ref to if_wd_context_node,
    rootnode_info type ref to if_wd_context_node_info,
    i_node_att type wdr_context_attr_info_map,
    wa_node_att type line of wdr_context_attr_info_map.
    wa_node_att-name = 'CARRID'.
    wa_node_att-TYPE_NAME = 'SFLIGHT-CARRID'.
    insert wa_node_att into table i_node_att.
    wa_node_att-name = 'CONNID'.
    wa_node_att-TYPE_NAME = 'SFLIGHT-CONNID'.
    insert wa_node_att into table i_node_att.
    clear i_struc. refresh i_struc.
    select carrid connid into corresponding fields of table i_struc from sflight where carrid = 'AA'.
    rootnode_info = wd_context->get_node_info( ).
    rootnode_info->add_new_child_node( name = 'DYNFLIGHT'
    attributes = i_node_att
    is_multiple = abap_true ).
    dyn_node = wd_context->get_child_node( 'DYNFLIGHT' ).
    dyn_node->bind_table( i_struc ).
    l_ref_interfacecontroller->set_data( dyn_node ).
    But now I am getting the following error :
    The following error text was processed in the system PET : Line types of an internal table and a work area not compatible.
    The error occurred on the application server FMSAP995_PET_02 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: IF_WD_CONTEXT_NODE~GET_STATIC_ATTRIBUTES_TABLE of program CL_WDR_CONTEXT_NODE_VAL=======CP
    Method: GET_REF_TO_TABLE of program CL_SALV_WD_DATA_TABLE=========CP
    Method: EXECUTE of program CL_SALV_WD_SERVICE_MANAGER====CP
    Method: APPLY_SERVICES of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: REFRESH of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE_DATA of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~UPDATE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_VIEW~MODIFY of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMPONENT~VIEW_MODIFY of program CL_SALV_WD_A_COMPONENT========CP
    -Gopal
    Message was edited by: gopalkrishna baliga

  • How I tie the formula with conditions type?

    Hi,
    Than create the formula with tcode O3I7:
    1) how I tie the formula with conditions type?
    2) how I tie the conditions type with the formula with Calculation Schema?
    help me, please.
    thanks
    Edited by: celeste ziantoni on Feb 5, 2008 6:45 PM

    Hello,
    Pricing formula is created using transaction VOFM. It is tied to the condition types in Pricing Procedure definition in Alternate Calculation Type column. For Pricing procedure, the menu path is SPRO->Materials Management->Purchasing->Conditions->Define Price Determination Process->Define Calculation Schema.
    Thanks,
    Venu

  • How to create a report based on a DataSet programatically

    I'm working on a CR 2008 Add-in.
    Usage of this add-in is: Let the user choose from a list of predefined datasets, and create a totally empty report with this dataset attached to is. So the user can create a report based on this dataset.
    I have a dataset in memory, and want to create a new report in cr2008.
    The new report is a blank report (with no connection information).
    If I set the ReportDocument.SetDataSource(Dataset dataSet) property, I get the error:
    The report has no tables.
    So I must programmatically define the table definition in my blank report.
    I found the following article: https://boc.sdn.sap.com/node/869, and came up with something like this:
    internal class NewReportWorker : Worker
          public NewReportWorker(string reportFileName)
             : base(reportFileName)
    public override void Process()
             DatabaseController databaseController = ClientDoc.DatabaseController;
             Table table = new Table();
             string tabelName = "Table140";
             table.Name = tabelName;
             table.Alias = tabelName;
             table.QualifiedName = tabelName;
             table.Description = tabelName;
             var fields = new Fields();
             var dbField = new DBField();
             var fieldName = "ID";
             dbField.Description = fieldName;
             dbField.HeadingText = fieldName;
             dbField.Name = fieldName;
             dbField.Type = CrFieldValueTypeEnum.crFieldValueTypeInt64sField;
             fields.Add(dbField);
             dbField = new DBField();
             fieldName = "IDLEGITIMATIEBEWIJS";
             dbField.Description = fieldName;
             dbField.HeadingText = fieldName;
             dbField.Name = fieldName;
             dbField.Type = CrFieldValueTypeEnum.crFieldValueTypeInt64sField;
             fields.Add(dbField);
             // More code for more tables to add.
             table.DataFields = fields;
             //CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo info =
             //   new CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo();
             //info.Attributes.Add("Databse DLL", "xxx.dll");
             //table.ConnectionInfo = info;
             // Here an error occurs.
             databaseController.AddTable(table, null);
             ReportDoc.SetDataSource( [MyFilledDataSet] );
             //object path = @"d:\logfiles\";
             //ClientDoc.SaveAs("test.rpt", ref path, 0);
    The object ClientDoc referes to a ISCDReportClientDocument in a base class:
       internal abstract class Worker
          private ReportDocument _ReportDoc;
          private ISCDReportClientDocument _ClientDoc;
          private string _ReportFileName;
          public Worker(string reportFileName)
             _ReportFileName = reportFileName;
             _ReportDoc = new ReportDocument();
             // Load the report from file path passed by the designer.
             _ReportDoc.Load(reportFileName);
             // Create a RAS Document through In-Proc RAS through the RPTDoc.
             _ClientDoc = _ReportDoc.ReportClientDocument;
          public string ReportFileName
             get
                return _ReportFileName;
          public ReportDocument ReportDoc
             get
                return _ReportDoc;
          public ISCDReportClientDocument ClientDoc
             get
                return _ClientDoc;
    But I get an "Unspecified error" on the line databaseController.AddTable(table, null);
    What am i doing wrong? Or is there another way to create a new report based on a DataSet in C# code?

    Hi,
    Have a look at the snippet code below written for version 9 that you might accommodate to CR 2008, it demonstrates how to create a report based on a DataSet programmatically.
    //=========================================================================
    +           * the following two string values can be modified to reflect your system+
    +          ************************************************************************************************/+
    +          string mdb_path = "C:
    program files
    crystal decisions
    crystal reports 9
    samples
    en
    databases
    xtreme.mdb";    // path to xtreme.mdb file+
    +          string xsd_path = "C:
    Crystal
    rasnet
    ras9_csharp_win_datasetreport
    customer.xsd";  // path to customer schema file+
    +          // Dataset+
    +          OleDbConnection m_connection;                         // ado.net connection+
    +          OleDbDataAdapter m_adapter;                              // ado.net adapter+
    +          System.Data.DataSet m_dataset;                         // ado.net dataset+
    +          // CR variables+
    +          ReportClientDocument m_crReportDocument;          // report client document+
    +          Field m_crFieldCustomer;+
    +          Field m_crFieldCountry;+
    +          void CreateData()+
    +          {+
    +               // Create OLEDB connection+
    +               m_connection = new OleDbConnection();+
    +               m_connection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + mdb_path;+
    +               // Create Data Adapter+
    +               m_adapter = new OleDbDataAdapter("select * from Customer where Country='Canada'", m_connection);+
    +               // create dataset and fill+
    +               m_dataset = new System.Data.DataSet();+
    +               m_adapter.Fill(m_dataset, "Customer");+
    +               // create a schema file+
    +               m_dataset.WriteXmlSchema(xsd_path);+
    +          }+
    +          // Adds a DataSource using dataset. Since this does not require intermediate schema file, this method+
    +          // will work in a distributed environment where you have IIS box on server A and RAS Server on server B.+
    +          void AddDataSourceUsingDataSet(+
    +               ReportClientDocument rcDoc,          // report client document+
    +               System.Data.DataSet data)          // dataset+
    +          {+
    +               // add a datasource+
    +               DataSetConverter.AddDataSource(rcDoc, data);+
    +          }+
    +          // Adds a DataSource using a physical schema file. This method require you to have schema file in RAS Server+
    +          // box (NOT ON SDK BOX). In distributed environment where you have IIS on server A and RAS on server B,+
    +          // and you execute CreateData above, schema file is created in IIS box, and this method will fail, because+
    +          // RAS server cannot see that schema file on its local machine. In such environment, you must use method+
    +          // above.+
    +          void AddDataSourceUsingSchemaFile(+
    +               ReportClientDocument rcDoc,          // report client document+
    +               string schema_file_name,          // xml schema file location+
    +               string table_name,                    // table to be added+
    +               System.Data.DataSet data)          // dataset+
    +          {+
    +               PropertyBag crLogonInfo;               // logon info+
    +               PropertyBag crAttributes;               // logon attributes+
    +               ConnectionInfo crConnectionInfo;     // connection info+
    +               CrystalDecisions.ReportAppServer.DataDefModel.Table crTable;+
    +               // database table+
    +               // create logon property+
    +               crLogonInfo = new PropertyBag();+
    +               crLogonInfo["XML File Path"] = schema_file_name;+
    +               // create logon attributes+
    +               crAttributes = new PropertyBag();+
    +               crAttributes["Database DLL"] = "crdb_adoplus.dll";+
    +               crAttributes["QE_DatabaseType"] = "ADO.NET (XML)";+
    +               crAttributes["QE_ServerDescription"] = "NewDataSet";+
    +               crAttributes["QE_SQLDB"] = true;+
    +               crAttributes["QE_LogonProperties"] = crLogonInfo;+
    +               // create connection info+
    +               crConnectionInfo = new ConnectionInfo();+
    +               crConnectionInfo.Kind = CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;+
    +               crConnectionInfo.Attributes = crAttributes;+
    +               // create a table+
    +               crTable = new CrystalDecisions.ReportAppServer.DataDefModel.Table();+
    +               crTable.ConnectionInfo = crConnectionInfo;+
    +               crTable.Name = table_name;+
    +               crTable.Alias = table_name;+
    +               // add a table+
    +               rcDoc.DatabaseController.AddTable(crTable, null);+
    +               // pass dataset+
    +               rcDoc.DatabaseController.SetDataSource(DataSetConverter.Convert(data), table_name, table_name);+
    +          }+
    +          void CreateReport()+
    +          {+
    +               int iField;+
    +               // create ado.net dataset+
    +               CreateData();+
    +               // create report client document+
    +               m_crReportDocument = new ReportClientDocument();+
    +               m_crReportDocument.ReportAppServer = "127.0.0.1";+
    +               // new report document+
    +               m_crReportDocument.New();+
    +               // add a datasource using a schema file+
    +               // note that if you have distributed environment, you should use AddDataSourceUsingDataSet method instead.+
    +               // for more information, refer to comments on these methods.+
    +               AddDataSourceUsingSchemaFile(m_crReportDocument, xsd_path, "Customer", m_dataset);+
    +                              +
    +               // get Customer Name and Country fields+
    +               iField = m_crReportDocument.Database.Tables[0].DataFields.Find("Customer Name", CrFieldDisplayNameTypeEnum.crFieldDisplayNameName, CeLocale.ceLocaleUserDefault);+
    +               m_crFieldCustomer = (Field)m_crReportDocument.Database.Tables[0].DataFields[iField];+
    +               iField = m_crReportDocument.Database.Tables[0].DataFields.Find("Country", CrFieldDisplayNameTypeEnum.crFieldDisplayNameName, CeLocale.ceLocaleUserDefault);+
    +               m_crFieldCountry = (Field)m_crReportDocument.Database.Tables[0].DataFields[iField];+
    +               // add Customer Name and Country fields+
    +               m_crReportDocument.DataDefController.ResultFieldController.Add(-1, m_crFieldCustomer);+
    +               m_crReportDocument.DataDefController.ResultFieldController.Add(-1, m_crFieldCountry);+
    +               // view report+
    +               crystalReportViewer1.ReportSource = m_crReportDocument;+
    +          }+
    +          public Form1()+
    +          {+
    +               //+
    +               // Required for Windows Form Designer support+
    +               //+
    +               InitializeComponent();+
    +               // Create Report+
    +               CreateReport();+
    +               //+
    +               // TODO: Add any constructor code after InitializeComponent call+
    +               //+
    +          }+//=========================================================================

  • HOW TO CREATE A DFF BASED ON ORGANIZATION

    Hi,
    I want to create a DFF which would have 5 different context values, i want 2 of them to be available in one organization and other 3 in other organization, how i can achieve this.
    Regards,
    Usman.

    Hello,
    "HOW TO CREATE A DFF BASED ON ORGANIZATION"
    1- I will create a customized table having two columns one is for context name and other is for org_id,
    2- then i will create a value set on this table and will use this on 'Value Set' field on 'Descriptive Flexfield Segments' window.
    3- In the where clause of this value set i will pass org_id from profile $PROFILES$.ORG_ID,
    4- this will restrict the context based on org_id And user will only have context related to there org
    I have successfully achieved the above requirment.
    Find below the restriction you should follow so that Value set is available in LOVs on "Descriptive Flexfield Segments" window:
    Value sets used for context fields must obey certain restrictions or they will not be available to use in the Value Set field in the Context Field region of the Descriptive
    Flexfield Segments window:
    • Format Type must be Character (Char)
    • Numbers Only must not be checked (alphabetic characters are allowed)
    • Uppercase Only must not be checked (mixed case is allowed)
    • Right-justify and Zero-fill Numbers must not be checked
    • Validation Type must be Independent or Table
    If the validation type is Independent:
    • the value set maximum size must be less than or equal to 30
    If the validation type is Table:
    • the ID Column must be defined, it must be Char or Varchar2 type, and its size must
    be less than or equal to 30. The ID column corresponds to the context field value
    code (the internal, non-translated context field value).
    • the Value Column must be defined, it must be Char or Varchar2 type, and its size
    must be less than or equal to 80. The Value column corresponds to the context field
    value name (the displayed context field value).
    • the value set maximum size must be less than or equal to 80
    All context field values (the code values) you intend to use must exist in the value set. If
    you define context field values in the Context Field Values block of the Descriptive
    Flexfield Segments window that do not exist in the context field value set, they will be
    ignored, even if you have defined context-sensitive segments for them.
    Best Regards,
    Usman.

  • How to create a record based on the name of a file in the file-system?

    Hi,
    With a lot of pictures I want to have a database to gather some information about these pictures.
    First question is how to generate a record based on a file in the file system?
    e.g. the pictures are "c:\fotos\2009\01\disc_001.jpg" to "c:\foto\2009\01\dis_98.jpg" .
    now i want to create records with as one of the attributes the name of the picture (not the picture itself). how to create these records (based on the information of the file-ssytem). i.e. the number of records should be the same as the number of pictures.
    any suggestions?
    any reaction will be appreciated.
    Leo

    Link to Create directory
    http://www.adp-gmbh.ch/ora/sql/create_directory.html
    You can create a list of files in the directory and read the list files from that directory.
    [UTL_FILE Documentation |http://download.oracle.com/docs/cd/B14117_01/appdev.101/b10802/u_file.htm#996728]
    [Solution using Java|http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:439619916584]
    SS

Maybe you are looking for

  • IPhone 4 - Apps - PLEASE HELP!!!!

    A COUPLE OF DAYS AGO I HAD A LITTLE (1) ABOVE THE APP STORE ICON AND IT SAID THAT THERE WAS A TALKING TOM UPDATE. NOW, I SELECTED "UPDATE" AND IT SAID IT IS OVER 20MB SO I NEED TO HOOK UP TO iTUNES OR A WIRELESS NETWORK (I HAVE NEITHER) - THEREFORE,

  • SSIS Packages Pending Execution

    Hi, We are facing issue with running ssis packages from job. The package is going to "PendingExecutionstatus" and it is struck in the same status. We are using windows service account to run the job. The package is running successfully if we run thro

  • Update a mac osx 10.3.9 now running on firefox 2.0.0.1 to 4.0?

    How do I update a mac osx 10.3.9 now running on firefox 2.0.0.1 to firefox 4.0 or higher?

  • Graphical representation of standard SAP reports

    Hi, Can we get graphical representation of Standard SAP CO Reports? Is there any setting that has to be activated to get these? We are using FI, CO & MM. Regards, Sangeeta

  • Can't Un-install Quicktime

    I'm having trouble un-installing my quicktime. When I try to remove it, my installshield won't do it, and trying to update leads to an error 1714, and an error 1603. The first one say it can't find my .msi file for quciktime, and the other says i nee