Custom Search

Wednesday, June 18, 2008

upcoming blog topics

Real estate
World Tour
New Mobile Technologies
Provisions of current Financial Year for Income Tax saving

Tuesday, June 10, 2008

Cognos 8- Java script for removing query item name from value prompts

In Cognos 8, when value prompts are used, query item name comes at first, then a dotted line and then values start.

If user doesn't want to see the query item name and dotted line, it can be removed by using Java script.

To achieve this follow below steps-

1. Insert an HTML item just before the value prompt.

2. Write in HTML item. (Here "sample_span" is the id of the
span which can be changed.

3. Insert another HTML item just after the value prompt.

4. Write
in it. (It is actually the closing tag of the previous HTML tag.)

5. Now insert another HTML item in the footer of the prompt page.

6. Write following Java Script in it

var theSample = document.getElementById("sample_span");

// Replace "sample_span" by the id given in step 2.

var theSelectSample = theSample.getElementsByTagName("select");

theSelectSample[0].remove(0);

theSelectSample[0].remove(0);

//2 removes are used to remove query item name and dotted line from value
//prompt

Cognos 8- Java Script for Date Validation

If data range needs to be passed for any Report studio report, 2 date prompts are required.
If user should not be allowed to 'Run' the report if period begin date is greater than period end date, then follow below listed steps.

Steps-


1. Give name 'txt_o_b_dt' to the date prompt which belong to period begin date.
(Shown in italics in below java script)

2. Give name 'txt_o_e_dt' to the date prompt which belong to period end date.
(Shown in italics in below java script)

3. Drag an HTML item to the footer of the prompt page.

4. Paste below java script in to that.


var bgn_dt= new Date(document.formWarpRequest.txtDatetxt_o_b_dt.value);

var end_dt= new Date(document.formWarpRequest.txtDatetxt_o_e_dt.value);

if (bgn_dt>end_dt)

alert("End date should be greater than Begin date.");

else
{
promptButtonFinish();
}

Here values from the date prompts(those are of string type) are converted into date type and stored in 2 variables- bgn_dt and end_dt.

If bgn_dt>end_dt and user clicks on Finish or Next button, he will get a message box saying that selection is wrong.

Only after making right selection he will be allowed to run the report or move to the next page.

Sunday, March 23, 2008

Cognos 8 Installation with oracle 9.2 and IIS

Steps-

1. Install Cognos 8 -
Cognos 8 normally comes in 2 differenct forms-
Cognos 8 with Metrics Studio
Cognos 8 without Metrics Studio
Cognos 8 without Metrics studio has 2 CDs. First one contains CRN server setup and the second one cotains Framwork Model and content store setup.
2. Update the Java Environment
Cognos 8 cryptographic services use specific .jar (Java Archive) files in your Java RuntimeEnvironment (JRE) to determine the allowed strength of the JRE. Cognos 8 provides the necessary jurisdictional policy .jar files in case your JRE does not have the minimum require cryptographic strength.If you do not have a JAVA_HOME variable already set on Windows or if JAVA_HOME points toa Java version that is not valid for Cognos 8, the JRE files provided with the installation will beused, and you do not have to update any files in your environment.If you want to use your own JRE and have JAVA_HOME set to that location on Windows or ifyou are installing on UNIX, you may have to update the Java environment for the cryptographicservices.The need to update your Java environment depends on the relative strength of jurisdictional policy.jar files in your environment. For example, if you already have stronger files in your environment than are provided with Cognos 8, you do not have to update the environment. Doing so, in this case, may cause other applications to not work correctly.If you update your Java environment, it is recommended that you make a backup copy of the files you overwrite. If other applications fail, you may have to replace the original jurisdictional policy.jar files.On Windows, you can set JAVA_HOME as a system variable or a user variable. If you set it as asystem variable, it may be necessary to restart your computer for it to take effect. If you set it as a user variable, set it so that the environment in which Tomcat is running can access it.Java 1.3.1 is the minimum supported JRE for Cognos 8. Ensure that you installed the correct JRE for the hardware that you are using. The encryption .jar files provided with the installation are for Java 1.4.2. These file will not work with Java 1.3.1
Steps-
1. Ensure that the JAVA_HOME environment variable is set to the JRE location.
2. Copy the following files from the c8_location/bin/jre/version/lib/security directory to theJava_location/version/lib/security directory:
• local_policy.jar
• US_export_policy.jar
3. Copy the bcprov-jdk13-125.jar file from the c8_location/bin/jre/version/lib/ext directory tothe Java_location/version/lib/ext directory.
4. If you use Sun JRE 1.4.2 on UNIX, ensure that you are using the correct startup file for the/dev/random device.You must use /etc/init.d or /etc/rc3.d/f20random.For more information, see your UNIX documentation.
3. Create virtual directories in IIS
Create Below 2 virtual direcotories in IIS-cognos8 which points to the location 'c8_location/webcontent' and has 'Read' permissionIn the above virtual directory create one more virtual direcotry cgi-bin pointing to location 'c8_location/cgi-bin' with 'Execute' permission.
4. Create content store in Oracle
steps -
On the computer where Oracle is installed, go to the ORACLE_HOME/jdbc/lib directory
Copy the classes12.jar file to the c8_location/webapps/p2pd/WEB-INF/lib directory on the Cognos 8 computers where the software must be installed.
Create a user in Oracle who has DBA privilege (user 'system' can also be used as it has DBA privileges). For this first login to the system with user 'system' and then write below SQL- create user identified by ; grant dba privileges to ;
Open Cognos Configuration
Go to Content Manager and delete existing content store( which points to MS SQL Server by default.)
Right click on Content Manager and create new Content Store
Select Oracle as database
Specify service name, user name and password
Test the connection
Save the updated configuration
5 Start the service from cognos configuration
6 Open the URL from the local system by using URL- "
http://localhost/cognos8/cgi-bin"