Wednesday, June 08, 2011

Replacing Null as 0 in obiee

 criteria tab and edit the ‘column properties’ associated with your fact measure. Choose the ‘Data Format’ tab, tick to override the default format and choose ‘Custom’.
It seems that the syntax for this custom format is positive-value-mask (semi colon) negative-value-mask (semi colon) null-mask. So this means we have a few options.
E.g. if you want zeros (0) instead of null then enter:
#,##0;-#,##0;0
2) in that formula columns we have put it below case condition also ,
CASE WHEN Nom_amt IS NULL THEN 0 ELSE Nom_amt END
3) we have uncheked IS NULL check box in the admin tool also
IFNULL(columname,0)


IN OBIEE 11g above mothods won't work because it's a bug in obiee11.1.1.5.0 version please refer the BUG reference :

Bug 13054445 - REPLACING NULL VALUES WITH "0" IN AN OBIEE 11G PIVOT TABLE IS NOT WORKING

Thanks

Deva

Write Back in OBIEE11g

HI,
  

19.8.2 Configuring for Write Back

Complete the following steps to configure for users to write back values to the data source.
To configure for write back:
1.     Create a physical table in the database that has a column for each write-back field needed. In the table create statement, make the write-back fields non-null-able.
Note:
For optimum security, store write-back database tables in a unique database instance.
2.     Use the Oracle BI Administration Tool to configure the new table, as described in Oracle Fusion Middleware Metadata Repository Builder's Guide for Oracle Business Intelligence Enterprise Edition.
3.     Create a write-back template that specifies the SQL statements that are necessary to both insert and update values into the table that you created. For more information, see Section 19.8.3, "About the Write-Back Template."
4.     Add the LightWriteback element in the instanceconfig.xml file, as described in Section 19.8.2.1, "Setting the LightWriteback Element."
5.     In Oracle BI Presentation Services, grant the following write-back privileges to the appropriate users: Manage Write Back and Write Back to Database.
6.     Configure a write-back analysis, as described in Oracle Fusion Middleware User's Guide for Oracle Business Intelligence Enterprise Edition.

19.8.2.1 Setting the LightWriteback Element

In order for users to write back values, you must manually add the LightWriteback element in the instanceconfig.xml file. Before you begin this procedure, ensure that you are familiar with the information in Section 3.4, "Using a Text Editor to Update Oracle Business Intelligence Configuration Settings".
To manually set the element for write back:
1.     Open the instanceconfig.xml file for editing, as described in Section 3.6, "Where are Configuration Files Located?"
2.     Locate the ServerInstance section in which you must add the LightWriteback element.
3.     Include the element and its ancestor elements as appropriate, as shown in the following example.
4.         <WebConfig>
5.             <ServerInstance>
6.                 <LightWriteback>true</LightWriteback>
7.             </ServerInstance>
8.         <WebConfig>
Note that this example does not include parameters that might exist in the file, but that are centrally managed by Fusion Middleware Control and cannot be changed manually.
9.     Save your changes and close the file.
10. Restart Oracle Business Intelligence.

19.8.3 About the Write-Back Template

The write-back template is an XML-formatted file that contains SQL statements that are needed to insert and update records in the write-back table and columns that you have created. You can create multiple write-back templates, customizing each one for the fields that are used in each specific analysis. In the table view properties, you specify the name of the write-back template to use.

19.8.3.1 How Write Back Works

If a user has the Write Back to Database privilege, then the write-back fields in their analyses can display as editable fields if properly configured. If the user does not have this privilege, then the write-back fields display as normal fields. If the user types a value in an editable field and clicks the appropriate write-back button, then the application reads the write-back template to get the appropriate insert or update SQL command. It then issues the insert or update command. If the command succeeds, then it reads the record and updates the analysis. If there is an error in either reading the template or in executing the SQL command, then an error message is displayed.
The insert command runs when a record does not yet exist and the user enters new data into the table. In this case, a user has typed in a table record whose value was originally null.
The update command runs when a user modifies existing data. To display a record that does not yet exist in the physical table to which a user is writing back, you can create another similar table. Use this similar table to display placeholder records that a user can modify in dashboards.

19.8.3.2 Requirements for the Write-Back Template

The write-back template must meet the following requirements:
·         To meet security requirements, you must specify the connection pool along with the SQL commands to insert and update records. These SQL commands reference the values that are passed in the write-back schema to generate the SQL statements to modify the database table. Values can be referenced either by column position (such as @1, @3) or by column ID (such as @{c1234abc}, @{c687dfg}). Column positions start numbering with 1. The use of column ID is preferred. Each column ID is alphanumeric, randomly generated, and found in the XML definition of the analysis in the Advanced tab of the Analysis editor.
·         You must include both an <insert> and an <update> element in the template. If you do not want to include SQL commands within the elements, then you must insert a blank space between the opening and closing tags. For example, you must enter the element as
·                <insert> </insert>
rather than
<insert></insert>
If you omit the blank space, then you see a write-back error message such as "The system cannot read the Write Back Template 'my_template'".
·         If a parameter's data type is not an integer or real number, then add single quotes around it. If the database does not do Commits automatically, then add the optional postUpdate node after the insert and update nodes to force the commit. The postUpdate node typically follows this example:
·                <postUpdate>COMMIT</postUpdate>
·         Store the write-back template files in the analyticsRes directory that the administrator has configured for static files and customer messages:
ORACLE_INSTANCE/bifoundation/OracleBIPresentationServicesComponent/coreapplication_obipsn/analyticsRes/customMessages
While XML message files that affect a language-specific user interface must be localized, the XML file that is used for configuring a write-back template is usually not translated, because it is language-independent.
In the rare cases where write-back template files must be language-dependent (for example, if a user logging in using the l_es (Spanish) locale would use a different SQL command then a user logging in using l_fr (French) locale), then the write-back template messages should exist in appropriate language directories. For information, see Section 22.5, "Customizing the User Interface Using XML Message Files."
·         The write-back template files can have any name of your choosing, because the system reads all XML files in the CustomMessages folder. To ensure that write back works correctly, include in the WebMessage element of the file the name of the SQL template that you specified when you created the write-back table. You can have multiple WebMessage elements in one file, with each element specifying one SQL template.
The following example shows the specification of the SQL template that is called "SetQuotaUseID."
<WebMessage name="SetQuotaUseID">

19.8.3.3 Example: Write Back Template

A write-back template might resemble this example:
<?xml version="1.0" encoding="utf-8" ?>
<WebMessageTables xmlns:sawm="com.siebel.analytics.web/message/v1">
<WebMessageTable lang="en-us" system="WriteBack" table="Messages">
   <WebMessage name="SetQuotaUseID">
      <XML>
         <writeBack connectionPool="Supplier">
            <insert>INSERT INTO regiontypequota VALUES(@{c0},@{c1},'@{c2}','@{c3}',@{c4})</insert>
            <update>UPDATE regiontypequota SET Dollars=@{c4} WHERE YR=@{c0} AND Quarter=@{c1} AND Region='@{c2}' AND ItemType='@{c3}'</update>
         </writeBack>
      </XML>
   </WebMessage>
   <WebMessage name="SetQuota">
      <XML>
         <writeBack connectionPool="Supplier">
            <insert>INSERT INTO regiontypequota VALUES(@1,@2,'@3','@4',@5)</insert>
            <update>UPDATE regiontypequota SET Dollars=@5 WHERE YR=@1 AND Quarter=@2 AND Region='@3' AND ItemType='@4'</update>
         </writeBack>
      </XML>
   </WebMessage>
</WebMessageTable>
</WebMessageTables>

file path:

writeback.xml under
C:\BI_HOME\instances\instance3\bifoundation\OracleBIPresentationServicesComponent\coreapplication_obips1\analyticsRes\WEB-INF\customMessages
and it should be kept under
C:\BI_HOME\instances\instance3\bifoundation\OracleBIPresentationServicesComponent\coreapplication_obips1\analyticsRes\customMessages



Migrating application role from DEV to Prod server in obiee11g

Hi,
  
http://download.oracle.com/docs/cd/E14571_01/core.1111/e10043/cfgauthr.htm#JISEC2929

Migrating Policies with the Command migrateSecurityStore
Application-specific policies or system policies can be migrated manually from a source repository to a target repository using the WLST command migrateSecurityStore.
This command is offline, that is, it does not require a connection to a running server to operate; therefore, the configuration file passed to the argument configFile need not be an actual domain configuration file, but it can be assembled just to specify the source and destination repositories of the migration.
Note:
Since the command migrateSecurityStore recreates GUIDs and takes a long time to migrate large volume of data, you may want to consider migrating stores with an alternate procedure that uses Oracle Internet Directory bulk operations. For details, see Section 6.5.2.3, "Migrating Large Volume Policy and Credential Stores.".
For further details about WLST commands and their syntax, see section Overview of WLST Command Categories, in Oracle Fusion Middleware WebLogic Scripting Tool Command Reference.
To migrate all policies (system and application-specific, for all applications) use the script (first) or interactive (second) syntaxes (arguments are written in separate lines for clarity):
migrateSecurityStore.py -type policyStore
-configFile jpsConfigFileLocation
-src srcJpsContext
-dst dstJpsContext
migrateSecurityStore(type="policyStore", configFile="jpsConfigFileLocation", src="srcJpsContext", dst="dstJpsContext")

The meanings of the arguments (all required) are as follows:
  • configFile specifies the location of a configuration file jps-config.xml relative to the directory where the command is run. Typically, this configuration file is created just to be used with the command and serves no other purpose. This files contains two jps-contexts that specify the source and destination stores.
    In addition, if the migration involves one or two LDAP-based stores, then this file must contain a bootstrap jps-context that refers to the location of a cwallet.sso file where the credentials to access the LDAP based involved in the migration are kept. See second example below.
  • src specifies the name of a jps-context in the configuration file passed to the argument configFile.
  • dst specifies the name of another jps-context in the configuration file passed to the argument configFile.
The contexts passed to src and dst must be defined in the passed configuration file and must have distinct names. From these two contexts, the command determines the locations of the source and the target repositories involved in the migration.
To migrate just system policies, use the script (first) or interactive (second) syntaxes (arguments are written in separate lines for clarity):
migrateSecurityStore.py -type globalPolicies
-configFile jpsConfigFileLocation
-src srcJpsContext
-dst dstJpsContext
migrateSecurityStore(type="globalPolicies", configFile="jpsConfigFileLocation", src="srcJpsContext", dst="dstJpsContext")
The meanings of the arguments (all required) are identical to the previous case.
To migrate just application-specific policies, for one application, use the script (first) or interactive (second) syntaxes (arguments are written in separate lines for clarity):
migrateSecurityStore.py -type appPolicies
-configFile jpsConfigFileLocation
-src srcJpsContext
-dst dstJpsContext
-srcApp srcAppName
[-dstApp dstAppName]
[-overWrite trueOrfalse]
[migrateIdStoreMapping trueOrfalse]
[mode laxOrstrict]
migrateSecurityStore(type="appPolicies", configFile="jpsConfigFileLocation", src="srcJpsContext", dst="dstJpsContext", srcApp="srcAppName", [dstApp="dstAppName"], [overWrite="trueOrfalse"], [migrateIdStoreMapping="trueOrfalse"], [mode="strict"])
The meanings of the arguments configFile, src, and dst are identical to the previous cases. The meaning of other five arguments is as follows:
  • srcApp specifies the name of the source application, that is, the application whose policies are being migrated.
  • dstApp specifies the name of the target application, that is, the application whose policies are being written. If unspecified, it defaults to the name of the source application.
  • migrateIdStoreMapping specifies whether enterprise policies should be migrated. The default value is True. To filter out enterprise policies from the migration, that is, to migrate just application policies, set it to False.
  • overWrite specifies whether a target policy matching a source policy should be overwritten by or merged with the source policy. Set to true to overwrite the target policy; set to false to merge matching policies. Optional. If unspecified, defaults to false.
  • mode specifies whether the migration should stop and signal an error upon encountering a duplicate principal or a duplicate permission in an application policy. Either do not specify or set to lax to allow the migration to continue upon encountering duplicate items, to migrate just one of the duplicated items, and to log a warning to this effect.
If the input does not follow the syntax requirements above, the command execution fails and returns an error. In particular, the input must satisfy the following requisites: (a) the file jps-config.xml is found in the passed location; (b) the file jps-config.xml includes the passed jps-contexts; and (c) the source and the destination context names are distinct.

Auto Update Dashboard Content in obiee

Hi,
Kindly add the below code to the Dashboard text object and enable the html option,

<META HTTP-EQUIV="REFRESH" CONTENT="500">
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE" >

then it ill work based upon time..setted

Regards,

Deva