tag:blogger.com,1999:blog-47461746384637379732024-03-14T13:06:48.764+05:30CognosSathishhttp://www.blogger.com/profile/00841490364940423414noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-4746174638463737973.post-13772976695734915232011-07-25T09:31:00.001+05:302011-07-25T09:35:26.964+05:30Creating a Tab Report in Report Studio<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoNormal" style="margin: 0in 0in 10pt;">
<b style="mso-bidi-font-weight: normal;"><span closure_uid_mgv9j3="125" style="font-family: Calibri;">Steps for creating a Tab report in Report Studio:</span></b></div>
<ol style="margin-top: 0in;" type="1">
<li class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-list: l2 level1 lfo1;"><span style="font-family: Calibri;">Create a new report using Go Sales (Query) Package.</span></li>
<li class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-list: l2 level1 lfo1;"><span style="font-family: Calibri;">Insert a table with 3 Columns and 2 Rows.</span></li>
<li class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-list: l2 level1 lfo1;"><span style="font-family: Calibri;">Merge the cells in the second row.</span></li>
<li class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-list: l2 level1 lfo1;"><span style="font-family: Calibri;">Create 3 text items (List, Crosstab and Chart) in the first row.</span></li>
<li class="MsoNormal" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; line-height: normal; margin: 0in 0in 0pt; mso-list: l2 level1 lfo1;"><span style="font-family: Calibri;">Insert a Value Prompt before the table and change the name to Prompt.</span></li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-O6kLBORfxBM/Tizp1tikrjI/AAAAAAAAABg/2871I7FSUHQ/s1600/1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200px" src="http://2.bp.blogspot.com/-O6kLBORfxBM/Tizp1tikrjI/AAAAAAAAABg/2871I7FSUHQ/s200/1.JPG" t$="true" width="186px" /></a></div>
<div class="MsoNormal" closure_uid_mgv9j3="127" closure_uid_oc52ph="323" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; line-height: normal; margin: 0in 0in 0pt;">
</div>
<ol start="6" style="margin-top: 0in;" type="1">
<li class="MsoNormal" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; line-height: normal; margin: 0in 0in 0pt; mso-list: l2 level1 lfo1;"><span style="font-family: Calibri;">Create three static choice values for the value prompt.</span></li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-pcYbgspDP2Q/Tizp2--Qz-I/AAAAAAAAABk/3jkhgXdoqfk/s1600/2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200px" src="http://1.bp.blogspot.com/-pcYbgspDP2Q/Tizp2--Qz-I/AAAAAAAAABk/3jkhgXdoqfk/s200/2.JPG" t$="true" width="186px" /></a></div>
<div class="MsoNormal" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; line-height: normal; margin: 0in 0in 0pt;">
</div>
<ol start="7" style="margin-top: 0in;" type="1">
<li class="MsoNormal" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; line-height: normal; margin: 0in 0in 0pt; mso-list: l2 level1 lfo1;"><span style="font-family: Calibri;">Change the following properties of value prompt.</span></li>
</ol>
<div class="MsoNormal" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; line-height: normal; margin: 0in 0in 0pt 1in; mso-list: l0 level1 lfo2; text-indent: -0.25in;">
<span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: 'Times New Roman';"> </span></span></span><span style="font-family: Calibri;">Required – No</span></div>
<div class="MsoNormal" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; line-height: normal; margin: 0in 0in 0pt 1in; mso-list: l0 level1 lfo2; text-indent: -0.25in;">
<span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: 'Times New Roman';"> </span></span></span><span style="font-family: Calibri;">Hide Adornments – Yes</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in; mso-list: l0 level1 lfo2; text-indent: -0.25in;">
<span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: 'Times New Roman';"> </span></span></span><span style="font-family: Calibri;">Auto Submit – Yes</span></div>
<ol start="8" style="margin-top: 0in;" type="1">
<li class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-list: l2 level1 lfo1;"><span style="font-family: Calibri;">Place a HTML Item next to the value Prompt and copy the following code.</span></li>
</ol>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in;">
<span style="font-family: Calibri;"><script language="javascript"></span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in;">
<span style="font-family: Calibri;">function func(a)</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in;">
<span style="font-family: Calibri;">{</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in;">
<span style="font-family: Calibri;">var f = getFormWarpRequest();</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in;">
<span style="font-family: Calibri;">var prompt = f._oLstChoicesPrompt;</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in;">
<span style="font-family: Calibri;">if(a==1)</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in;">
<span style="font-family: Calibri;">{</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in;">
<span style="font-family: Calibri;">prompt.options.selectedIndex = 2;</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in;">
<span style="font-family: Calibri;">}</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in;">
<span style="font-family: Calibri;">else if(a==2)</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in;">
<span style="font-family: Calibri;">{</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in;">
<span style="font-family: Calibri;">prompt.options.selectedIndex = 3;</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in;">
<span style="font-family: Calibri;">}</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in;">
<span style="font-family: Calibri;">else if(a==3)</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in;">
<span style="font-family: Calibri;">{</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in;">
<span style="font-family: Calibri;">prompt.options.selectedIndex = 4;</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in;">
<span style="font-family: Calibri;">}</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in;">
<span style="font-family: Calibri;">promptAction('finish'); </span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in;">
<span style="font-family: Calibri;">}</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in;">
<span style="font-family: Calibri;"></script></span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in;">
<br /></div>
<ol start="9" style="margin-top: 0in;" type="1">
<li class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-list: l2 level1 lfo1;"><span style="font-family: Calibri;">Place HTML Items before and after the text Items.</span></li>
</ol>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in; mso-list: l3 level1 lfo3; text-indent: -0.25in;">
<span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: 'Times New Roman';"> </span></span></span><span style="font-family: Calibri;">Before the Text Items</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1.5in; mso-list: l1 level1 lfo4; text-indent: -0.25in;">
<span style="font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span style="mso-list: Ignore;">ü<span style="font-family: 'Times New Roman';"> </span></span></span><span style="font-family: Calibri;">List</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 2in;">
<span style="font-family: Calibri;"><div id="hi" onclick="func(1)"></span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1.5in; mso-list: l1 level1 lfo4; text-indent: -0.25in;">
<span style="font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span style="mso-list: Ignore;">ü<span style="font-family: 'Times New Roman';"> </span></span></span><span style="font-family: Calibri;">Crosstab</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 2in;">
<span style="font-family: Calibri;"><div id="hi" onclick="func(2)"></span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1.5in; mso-list: l1 level1 lfo4; text-indent: -0.25in;">
<span style="font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"><span style="mso-list: Ignore;">ü<span style="font-family: 'Times New Roman';"> </span></span></span><span style="font-family: Calibri;">Chart</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 2in;">
<span style="font-family: Calibri;"><div id="hi" onclick="func(3)"></span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in; mso-list: l3 level1 lfo3; text-indent: -0.25in;">
<span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: 'Times New Roman';"> </span></span></span><span style="font-family: Calibri;">After the Text Items</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1.5in;">
<span style="font-family: Calibri;"></div></span></div>
<ol start="10" style="margin-top: 0in;" type="1">
<li class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-list: l2 level1 lfo1;"><span style="font-family: Calibri;">Create a String variable with the following expression.</span></li>
</ol>
<div class="MsoNormal" closure_uid_oc52ph="299" style="line-height: normal; margin: 0in 0in 0pt 1in;">
<span style="font-family: Calibri;">case (ParamDisplayValue('Parameter1'))</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in;">
<span style="font-family: Calibri;">when 'List' then 'List'</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in;">
<span style="font-family: Calibri;">when 'Crosstab' then 'Crosstab'</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in;">
<span style="font-family: Calibri;">when 'Chart' then 'Chart'</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in;">
<span style="font-family: Calibri;">end</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in;">
<br /></div>
<ol start="11" style="margin-top: 0in;" type="1">
<li class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-list: l2 level1 lfo1;"><span style="font-family: Calibri;">Create three values for the string variable (List, Crosstab and Chart).</span></li>
<li class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-list: l2 level1 lfo1;"><span style="font-family: Calibri;">Goto Page 1 and insert a conditional block in the second row.</span></li>
<li class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-list: l2 level1 lfo1;"><span style="font-family: Calibri;">Select the conditional block and change the block variable to String 1.</span></li>
<li class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-list: l2 level1 lfo1;"><span style="font-family: Calibri;">Select the current block as List and insert a List in the conditional Block.</span></li>
<li class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-list: l2 level1 lfo1;"><span style="font-family: Calibri;">Insert dataitems in the list.</span></li>
<li class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-list: l2 level1 lfo1;"><span style="font-family: Calibri;">Select the current block as Crosstab and insert a Crosstab in the conditional Block.</span></li>
<li class="MsoNormal" closure_uid_mgv9j3="377" style="line-height: normal; margin: 0in 0in 0pt; mso-list: l2 level1 lfo1;"><span style="font-family: Calibri;">Insert dataitems in the Crosstab.</span></li>
<li class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-list: l2 level1 lfo1;"><span style="font-family: Calibri;">Select the current block as Chart and insert a Chart in the conditional Block.</span></li>
<li class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-list: l2 level1 lfo1;"><span style="font-family: Calibri;">Insert dataitems in the Chart.</span></li>
<li class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-list: l2 level1 lfo1;"><span style="font-family: Calibri;">Change the background of the first row.</span></li>
<li class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-list: l2 level1 lfo1;"><span style="font-family: Calibri;">In the condition explorer, select List and change the background color of List text item’s table cell.</span></li>
<li class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-list: l2 level1 lfo1;"><span style="font-family: Calibri;">Similarly make the changes for other table cells.</span></li>
<li class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-list: l2 level1 lfo1;"><span style="font-family: Calibri;">Select the value prompt and change the following properties.</span></li>
</ol>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in; mso-list: l3 level1 lfo3; text-indent: -0.25in;">
<span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: 'Times New Roman';"> </span></span></span><span style="font-family: Calibri;">Default Selections – List</span></div>
<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt 1in; mso-list: l3 level1 lfo3; text-indent: -0.25in;">
<span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: 'Times New Roman';"> </span></span></span><span style="font-family: Calibri;">Visible – No</span></div>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-LhFnHhI8Ep0/Tizp331FZkI/AAAAAAAAABo/eUWL3J0oEpU/s1600/3.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://1.bp.blogspot.com/-LhFnHhI8Ep0/Tizp331FZkI/AAAAAAAAABo/eUWL3J0oEpU/s1600/3.JPG" t$="true" /></a></td></tr>
<tr><td class="tr-caption" closure_uid_oc52ph="261" style="text-align: center;">Report Page<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-eXfWXJpE78A/Tizp4_X3sKI/AAAAAAAAABs/XlGjWxLAf5s/s1600/4.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-eXfWXJpE78A/Tizp4_X3sKI/AAAAAAAAABs/XlGjWxLAf5s/s1600/4.JPG" t$="true" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-pTjpWKg6G3A/Tizp55lTcWI/AAAAAAAAABw/iu6jIppwr_4/s1600/5.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-pTjpWKg6G3A/Tizp55lTcWI/AAAAAAAAABw/iu6jIppwr_4/s1600/5.JPG" t$="true" /></a></div>
<div closure_uid_oc52ph="262">
<br /></div>
</td></tr>
</tbody></table>
<div closure_uid_oc52ph="282">
<br /></div>
<div closure_uid_mgv9j3="258" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;">
<br /></div>
<div class="separator" closure_uid_mgv9j3="451" closure_uid_oc52ph="260" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; clear: both; text-align: center;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-y3MZmqg_mZc/Tizp61LHsaI/AAAAAAAAAB0/-Qa7vS2ngKU/s1600/6.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://4.bp.blogspot.com/-y3MZmqg_mZc/Tizp61LHsaI/AAAAAAAAAB0/-Qa7vS2ngKU/s1600/6.JPG" t$="true" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Report Output</td></tr>
</tbody></table>
</div>
</div>Sathishhttp://www.blogger.com/profile/00841490364940423414noreply@blogger.com1tag:blogger.com,1999:blog-4746174638463737973.post-38024273138225223402011-07-14T11:24:00.001+05:302011-07-14T11:27:09.923+05:30VBScript for downloading attachments from OutlookVBScript for downloading attachments from Outlook and for saving in your local machine. Just save this file with .vbs extension and run it.<br />
<br />
dim item1 <br />
dim objsubject<br />
dim pa <br />
dim savename<br />
dim savefolder<br />
savefolder = "D:/temp/"<br />
Set olApp=CreateObject("Outlook.Application")<br />
Set olns=olApp.GetNameSpace("MAPI")<br />
Set objFolder=olns.GetDefaultFolder(6)<br />
msgbox objfolder<br />
For each item1 in objFolder.Items <br />
if item1.Unread=true then<br />
objsubject = item1.subject<br />
if objsubject = "*****Give the mail subject here*****" then <br />
pa = item1.Attachments(1).filename<br />
savename = savefolder & pa<br />
msgbox savename<br />
item1.Attachments(1).SaveAsFile savename<br />
end if<br />
end if<br />
NextSathishhttp://www.blogger.com/profile/00841490364940423414noreply@blogger.com2tag:blogger.com,1999:blog-4746174638463737973.post-80729253300378303152011-06-28T15:25:00.004+05:302011-06-28T15:49:25.813+05:30Cognos - Google Map Report with Distance Calculation and Direction Tracking<div dir="ltr" style="text-align: left;" trbidi="on">
In this example, we are going to create a Cognos report with Google maps which shows the distance between the two markers and also the route and direction between the two markers.<br />
<br />
<br />
Steps:<br />
<div>
</div>
<div>
</div>
<ol style="text-align: left;">
<li>Take the example which we previously did.</li>
<li>Declare the below variables:</li>
<br /><b>var isCreateHeadPoint = true;<br />var headMarker, tailMarker;</b>
<li>Add the below line in the LoadMapGadget() function.</li>
<br /><b>gdirection = new GDirections(map, document.getElementById("directions"));</b>
<li>Add the below lines to the GEvent.addListener of ShowAddress()</li>
<br />if (isCreateHeadPoint) {<br /> //add the head marker<br /> headMarker = marker;<br /> isCreateHeadPoint = false;<br />}<br />else{<br /> //add the tail marker<br /> tailMarker = marker;<br /> isCreateHeadPoint = true;<br /> // create a path from head to tail<br /> gdirection.load("from:" + headMarker.getPoint().lat()+ ", " +headMarker.getPoint().lng() +" to:" + tailMarker.getPoint().lat() + "," + tailMarker.getPoint().lng(), {preserveViewport:true});<br />}
<li>Add a row in the table.</li>
<li>Add a html item in the last row.</li>
<ul>
<li>Source Type : Text</li>
<li>Set the text to the following.</li>
<br /><div id="directions" style="width: 275px"></div><br /></body><br /></html></ul>
<li>Save and run the report.</li>
<li>To find the route and directions, click on any two markers.</li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-Xh9phYDGzUc/TgmkpThJN1I/AAAAAAAAABU/q26mWp_MSLk/s1600/Report+Layout.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="148px" i$="true" src="http://4.bp.blogspot.com/-Xh9phYDGzUc/TgmkpThJN1I/AAAAAAAAABU/q26mWp_MSLk/s320/Report+Layout.JPG" width="320px" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<strong>Report Page</strong></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-ImMsK3lRDPI/Tgmkrrj2fzI/AAAAAAAAABY/KHHnSeuNHEk/s1600/Report+Output.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="197px" i$="true" src="http://3.bp.blogspot.com/-ImMsK3lRDPI/Tgmkrrj2fzI/AAAAAAAAABY/KHHnSeuNHEk/s320/Report+Output.JPG" width="320px" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-vZjWgdVOj8c/TgmksZZIFuI/AAAAAAAAABc/lTxc30Bf8d8/s1600/Report+Output+-+1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="188px" i$="true" src="http://4.bp.blogspot.com/-vZjWgdVOj8c/TgmksZZIFuI/AAAAAAAAABc/lTxc30Bf8d8/s320/Report+Output+-+1.JPG" width="320px" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<strong>Report Output</strong></div>
<br /></div>Sathishhttp://www.blogger.com/profile/00841490364940423414noreply@blogger.com2tag:blogger.com,1999:blog-4746174638463737973.post-91583309200057020142011-06-23T14:00:00.028+05:302011-06-28T14:25:35.744+05:30Integrating Google Maps with Cognos - Sample<div dir="ltr" style="text-align: left;" trbidi="on">
Steps: <br />
<ol style="text-align: left;">
<li> Login with your google account into the below url.</li>
<a href="https://www.google.com/accounts/ServiceLogin?hl=en&continue=http://www.google.co.in/">https://www.google.com/accounts/ServiceLogin?hl=en&continue=http://www.google.co.in/</a>
<li>Sign up for the Google Maps API using the following URL:</li>
<a href="http://code.google.com/apis/maps/signup.html">http://code.Google.com/apis/maps/signup.html</a>
<li>Enter the IP address of the Cognos server where the reports will be running.</li>
<li>Click on the Generate API Key button to generate a unique key. The unique key that is generated is only valid for the server that you entered earlier to generate the key, and it will be used in the script for working with the Google Maps API. Please remember that the key is only valid for a single Cognos server IP.</li>
<li>Create a new Blank report using Go Sales(Query) Package.</li>
<li>From the insertable objects toolbox, add a Repeater object to the body of the report.</li>
<li>Right-click on the new repeater object and select Go To Query.</li>
<li>Add to the query the Data Items you want to display. This data will be used to assemble a JavaScript array (in a subsequent step).</li>
<center><a href="http://2.bp.blogspot.com/-GiRgMfaYT5E/TgLiXHOfOGI/AAAAAAAAAAg/_8DrOpqXpk0/s1600/1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="173px" i$="true" src="http://2.bp.blogspot.com/-GiRgMfaYT5E/TgLiXHOfOGI/AAAAAAAAAAg/_8DrOpqXpk0/s320/1.JPG" width="320px" /></a></center>
<li>If you plan to have more than one row in the query (i.e. more than one marker on the map) you will need a column that contains a comma for all but the first row. This comma will be used as a separator for the elements in the JavaScript array. To Do this:</li>
<ul>
<li>Add a Data Item to the query named RowCount. Set the expression to:</li>
rank([Address 1])
<li>Add another Data Item named ElementSeparator. Set the expression to:</li>
If ( [RowCount] = 1 ) THEN<br />( ” )<br />ELSE<br />( ‘, ‘ ) </ul>
<li>Return to the page (Page1). </li>
<li>Click on the repeater and edit the Data->Properties. Click check-boxes by each data item that you will want to use. This will allow you to use them in a report expression. </li>
<li>Change the repeater’s Data->Rows Per Page to 99999(otherwise, Report Studio will try to create a new page for every 20 rows in your repeater)</li>
<li>Create a table with 1 row and 2 columns.</li>
<li>Place the repeater in the second column.</li>
<li>Add an HTML Item to the left of the table. This will contain the start of the JavaScript.</li>
<ul>
<li>Source Type : Text</li>
<li>Set the HTML text to the following</li>
<html><br /><script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAx7vAbzXFBJGQEupKGA51dBQTTvU48baM3A06e5jSe_wpl0bp3RShVke5jiOCbv1e64rD40-_wur7QA" type="text/javascript"><br /></script> </ul>
<li>Add a second HTML Item immediately to the left of repeater.</li>
<ul>
<li>Source Type : Text</li>
<li>HTML text to following:</li>
<div id="map" style="width: 700px; height: 400px"></div><br /><script type="text/javascript"><br />var map = new GMap2(document.getElementById("map"));<br />var geocoder = new GClientGeocoder();<br />var locations=[ </ul>
<li>Add a third HTML Item inside the repeater. This will be the assembly of the array containing your data.</li>
<ul>
<li>Source Type : Report Expression</li>
<li>Set the report expression to the following, modifying it to fit your data:</li>
[Query1].[ElementSeparator] + '{Address:"' + [Query1].[Address 1] + '",City:"' + [Query1].[City] + '",Country:"' + [Query1].[Country] + '"}' </ul>
<li>Immediately to the right of the repeater, add a fourth HTML Item</li>
<ul>
<li>Source Type : Text </li>
<li>Set the HTML text to the following:</li>
];<br />function showAddress(i, j) {<br /> if (!geocoder)<br /> {<br /> return;<br /> } <br /> var address = locations[i].Address.concat(",".concat(locations[i].City));<br /> var html="<B>";<br /> html=html.concat(locations[i].Address);<br /> html=html.concat(", ");<br /> html=html.concat(locations[i].City);<br /> html=html.concat("</br></br>");<br /> html=html.concat(locations[i].Country);<br /> html=html.concat("</B></br>");<br /> html=html.concat("<a href=/"http://172.25.119.224:8080/ibmcognos/cgi-bin/cognos.cgi?b_action=cognosViewer&ui.action=run&ui.object=CAMID(%22%3a%3aAnonymous%22)%2ffolder%5b%40name%3d%27My%20Folders%27%5d%2ffolder%5b%40name%3d%27My%27%5d%2freport%5b%40name%3d%27Prompt_B%27%5d&ui.name=Prompt_B&run.outputFormat=&run.prompt=false&p_City="><br /> html=html.concat(locations[i].City);<br /> html=html.concat("\" target=\"_blank \"> Click here to view Sales Report </a>");<br /> var customIcon = new GIcon(G_DEFAULT_ICON);<br /> customIcon.image = "http://maps.google.com/mapfiles/marker_yellow.png";<br /> geocoder.getLatLng(address, function(point) {<br /> if (!point) {<br /> return;<br /> }<br /> map.setCenter(point, 1);<br /> var marker = new GMarker(point, {icon: customIcon});<br /> GEvent.addListener(marker, "click", function() {<br /> map.openInfoWindowHtml(point,html); <br /> });<br /> if(j == 1)<br /> {<br /> map.openInfoWindowHtml(point,html); <br /> }<br /> map.setZoom(3);<br /> map.addOverlay(marker);<br /> map.addControl(new GSmallMapControl());<br /> map.addControl(new GMapTypeControl());<br /> map.checkResize();<br /> });<br /> }<br /> function loadMapGadget()<br /> {<br /> for (var i = 0; i < locations.length; i++)<br /> {<br /> showAddress(i, 0);<br /> }<br /> }<br /> </script><br /> <body onload="loadMapGadget();"><br /> </body><br /> </html> </ul>
<li>Add a list to the first column of the table. Add a HTML item to the list.</li>
<ul>
<li>Source Type : Report Expression</li>
<li>Set Report Expression to the following:</li>
'<a href="#" onClick="showAddress('''+ number2string ([Query1].[RowCount]-1) + ''', 1)" >' + [Query1].[Address 1] + ", " + [Query1].[City] + ' </a>' </ul>
<li>Goto Page properties. Under Data, Select the Query and in properties add all the DataItems.</li>
<div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;">
</div>
<div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;">
</div>
<li style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;">Save and run the report.</li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-5RaYwGgAWm4/TgL5UNOtgDI/AAAAAAAAAAk/d1biS0rKHQw/s1600/2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="165px" i$="true" src="http://2.bp.blogspot.com/-5RaYwGgAWm4/TgL5UNOtgDI/AAAAAAAAAAk/d1biS0rKHQw/s320/2.JPG" width="320px" /></a></div>
<div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; text-align: center;">
<strong>Report Page</strong></div>
<div class="separator" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-RvjpS3St3kI/TgL5a_rVMxI/AAAAAAAAAAo/Q643nBqGiPc/s1600/2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="184px" i$="true" src="http://2.bp.blogspot.com/-RvjpS3St3kI/TgL5a_rVMxI/AAAAAAAAAAo/Q643nBqGiPc/s320/2.JPG" width="320px" /></a></div>
<div class="separator" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-ygklaWLYypo/TgL5fUqzRzI/AAAAAAAAAAs/2bt8Y8sgulk/s1600/2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="157px" i$="true" src="http://2.bp.blogspot.com/-ygklaWLYypo/TgL5fUqzRzI/AAAAAAAAAAs/2bt8Y8sgulk/s320/2.JPG" width="320px" /></a></div>
<div class="separator" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; clear: both; text-align: center;">
<strong>Report Output</strong></div>
</div>Sathishhttp://www.blogger.com/profile/00841490364940423414noreply@blogger.com1tag:blogger.com,1999:blog-4746174638463737973.post-6790178305032497732011-06-20T22:40:00.023+05:302011-06-23T11:27:01.578+05:30Integrating Google Maps with Cognos<div dir="ltr" style="text-align: left;" trbidi="on"><div style="text-align: left;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="color: black; font-size: 12px; line-height: 16px;">Even though IBM Cognos has its own maps as a powerful feature, some users like to see their data integrated or represented using some commonly used tools as Google Maps. With Google Maps, we can obtain a view for any geography, choose the desired location, and open reports related to that particular location.</span></span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 16px;"><br />
<span style="color: black;"></span></span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; line-height: 16px;"><span style="color: black;"><b>Architecture :</b><span class="Apple-style-span" style="font-size: 12px;"> </span></span></span></div><div style="text-align: left;"><span class="Apple-style-span" style="color: #505050; font-family: Arial, Helvetica, sans-serif; line-height: 16px;"><span class="Apple-style-span" style="font-size: 12px;"><br />
</span></span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/--bj-k11zuJQ/TgLUO5vLFwI/AAAAAAAAAAc/vT2QCCKKBKs/s1600/Architecture.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="244px" i$="true" src="http://3.bp.blogspot.com/--bj-k11zuJQ/TgLUO5vLFwI/AAAAAAAAAAc/vT2QCCKKBKs/s400/Architecture.JPG" width="400px" /></a></div><span class="Apple-style-span" style="color: #505050; font-family: Arial, Helvetica, sans-serif; line-height: 16px;"><span class="Apple-style-span" style="font-size: 12px;"><br />
</span></span></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: left;"><br />
</div><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Advantages :</strong></span><br />
<div class="separator" style="clear: both; text-align: left;"><br />
</div><ol><li>All the functionalities of Google Maps can be integrated with cognos like direction tracking, distance calculation etc.</li>
<li>Drill down to another cognos report from the map.</li>
</ol></div>Sathishhttp://www.blogger.com/profile/00841490364940423414noreply@blogger.com0tag:blogger.com,1999:blog-4746174638463737973.post-41337311647558248012010-09-02T17:07:00.018+05:302010-09-03T14:09:20.067+05:30Cognos 8.2 Installation and configuration Guide(PDF)<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 15px; font-weight: bold;"></span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: small;">Please click the below link for the installation and configuration guide(PDF) of Cognos 8.2 with SQL server 2000.</span></span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: small;"><br />
</span> </span><span class="Apple-style-span" style="font-size: small;"> </span><a href="http://rapidshare.com/files/416620672/Cognos_Installtion_and_configuration_with_SQL_server_2005.pdf"><span class="Apple-style-span" style="color: blue;"><b><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: small;"> http://rapidshare.com/files/416620672/Cognos_Installtion_and_configuration_with_SQL_server_2005.pdf</span></span></b></span></a><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: small;"><br />
</span> </span><span class="Apple-style-span" style="font-size: small;"> </span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: small;"><a href="http://rapidshare.com/files/416620672/Cognos_Installtion_and_configuration_with_SQL_server_2005.pdf"></a>Note : While Configuring Content Store, delete the existing one and create a new one using the steps below.</span></span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"> </span><br />
<ol><li><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: small;">Right Click Content manager and create a new content store</span></span></li>
<li><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: small;">Give data base name as SQL server database.</span></span></li>
<li><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: small;">For Name, give the database name which you have created for Content Manager.</span></span></li>
<li><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: small;">For Database Server, give the server in which you have installed your database(localhost, if you installed in your local machine).</span></span></li>
<li><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: small;">Give the user id and Password you created</span></span></li>
<li><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: small;">Test the connection.</span></span></li>
</ol><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: small;">If you are using oracle as your database, don't forget to copy these jar(ojdbc14.jar, classes12.jar) files to WEB-INF/lib/ folder.</span></span><span class="Apple-style-span" style="font-size: small;"> </span><br />
<span class="Apple-style-span" style="font-weight: bold;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"> </span><span class="Apple-style-span" style="font-size: small;"> </span><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: small;"> </span> </span><span class="Apple-style-span" style="font-size: small;"> </span></span><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: small;"> </span></span></span><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: small;"><br />
</span> </span><span class="Apple-style-span" style="font-size: small;"> </span></span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-weight: bold;"></span></span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: arial, sans-serif; font-weight: bold;"></span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: arial, sans-serif; font-weight: bold;"></span></span><br />
<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 15px; font-weight: bold;"></span><br />
<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 15px; font-weight: bold;"><div><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: small;">For any Queries contact me at </span></span></span><a href="mailto:sathishmm2003@yahoo.co.in"><span class="Apple-style-span" style="color: blue;"><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: small;">sathishmm2003@yahoo.co.in</span></span></span></a></div></span><span class="Apple-style-span" style="color: #00204e; font-family: arial, sans-serif; font-size: 15px; font-weight: bold;"><br />
</span>Sathishhttp://www.blogger.com/profile/00841490364940423414noreply@blogger.com1