Sunday, August 21, 2016

Cognos dynamic cube with stand alone / New table, no relationship with fact table

Cognos dynamic cube  with stand alone / New table, no relationship with fact table

Separete new table / dimension need to publish in cognos dynamic cube package without joining fact table - wihtout relationship with fact or dimension table, New table means just stand alone table.

Steps:
  1. Get Table ready in Database
  2. Create new dimension with new table
  3. Drag new dimension under existing cube
  4. Drag new dimension out of existing fact table (trick is here : Don't put inside measure folder new dimension move to outside of measure folder )
  5. Need to define relationship to existing fact table because its (new stand alone table) has no relation with existing fact table.
  6. Validate it and publish the cognos dynamic cube package

Cognos dynamic cube with stand alone / New table, no relationship with fact table

Cognos dynamic cube  with stand alone / New table, no relationship with fact table

Separete new table / dimension need to publish in cognos dynamic cube package without joining fact table - wihtout relationship with fact or dimension table, New table means just stand alone table.

Steps:
  1. Get Table ready in Database
  2. Create new dimension with new table
  3. Drag new dimension under existing cube
  4. Drag new dimension out of existing fact table (trick is here : Don't put inside measure folder new dimension move to outside of measure folder )
  5. Need to define relationship to existing fact table because its (new stand alone table) has no relation with existing fact table.
  6. Validate it and publish the cognos dynamic cube package

Wednesday, August 17, 2016

Dynamic cube error attached.

If you are facing issue dynamic cube error.


..\data\relmd_HRMTGT_HRMTGT_dbo.xml (Access is denied.)

Solution 1. Make sure you should have access to cognos installed location , admin shold be good.
Solution 2.  Just open cognos dynamic cube as administrator.

your problem solved
 
One cognos filter and multiple behaviour

If I select query1 for 2016 automatically I can get query2  data minus1 year and querey3 data minus2 years
Automatically my below three query will filter..
[Contract_YYMM]=?yrm?
querey -2
[Contract_YYMM]=
cast(substring(Cast(?yrm? as char(6)),1,4)-1 as char(4))
+
cast(substring(Cast(?yrm? as char(6)),5,6) as char(2))

querey -3
[Contract_YYMM]=
cast(substring(Cast(?yrm? as char(6)),1,4)-2 as char(4))
+
cast(substring(Cast(?yrm? as char(6)),5,6) as char(2))

Tuesday, April 26, 2016

Cognos picklist reports - javascript code

If user want to load file with multiple values to value prompt from desktop (local) and then select values after all values loaded into value prompt.

Browse value prompt input file in prompt page : java script - drop html item before value prompt in prompt page.

Copy and paste this script before value prompt.
Note : don't remove 123 points its within the script, entire code.
=====================================
<script>
function load()
{
var form = getFormWarpRequest();
var list1 = form._oLstChoicesABC;
var name= form.cmuds.value;
upload(list1, name);
function upload(listPrompt, fileName) {
            var objFSO, objTextFile;
            var sReadLine, exception;
            var ForReading = 1, ForWriting = 2, ForAppending = 8;
            while (listPrompt.options.length != 0) {
listPrompt.options.remove(0);}
            try{               objFSO = new ActiveXObject("Scripting.FileSystemObject");
                        objTextFile = objFSO.OpenTextFile(fileName, ForReading);
                        while (!objTextFile.AtEndOfStream) {
                                    sReadLine = objTextFile.ReadLine();
                                    listPrompt.options[listPrompt.options.length] = new Option(sReadLine, sReadLine);
}
objTextFile.close();                              
            } catch (exception) {
                        alert("Invalid file name" + fileName);
            }
}}
</script>
1- Click "Browse" to select text file required:<br>
<input type=file name="cmuds"><br><br>
2- Click "Open File" to load data:
<input type=button onClick="load()" value="Open File">
<br><br>
3- Select required Data Item(s) and click "Finish":<br>
=====================================

Cognos PDF report columns page breaking

PDF reports all columns not showing in 1st page its going to second page: please do pagesetup paper size : custom, define height and width more as per need.

Cognos Cross tab row header

Add cross tab header on row columns : add 1 table with two columns > create two crss tab pointing to your 1 query > in second cross tab select rows data items, cross tab corner then boxtype: none >> in 1st cross tab select columns, measures,cross tab corner then boxtype: none > 1st cross tab align to right top and second cross tab align to left top > run report its done.