error: CFG-ERR-0103 Unable to start IBM Cognos service. Execution of the external process returns an error code value of -1

Cognos service fails to start by error –

” CFG-ERR-0103 Unable to start IBM Cognos service. Execution of the external process returns an error code value of -1 ”

When this error happens it happens mainly due to issue related to content store.

a. test content store. If its working then it might have got corrupted.

b. dispatcher port may be in use.

 

Source:
http://www-01.ibm.com/support/docview.wss?uid=swg21599720

 

error: cognos Content Manager failed to start because it could not load driver “com.microsoft.sqlserver.jdbc.SQLServerDriver”.

issue- In Cognos analytics(11.0.5+) when you are trying to configure content store with SQL server data base for the first time you will get the error – “cognos Content Manager failed to start because it could not load driver “com.microsoft.sqlserver.jdbc.SQLServerDriver”.”

Solution is mentioned in below website:
https://www.ibm.com/support/knowledgecenter/SSEP7J_11.0.0/com.ibm.swg.ba.cognos.inst_cr_winux.doc/t_MSdriver_SSLconfig.html

Microsoft JDBC driver are found in below  microsoft website:
https://www.microsoft.com/en-us/download/details.aspx?id=55539

Download the file – sqljdbc_6.2.2.1_enu.tar.gz from above microsoft link.
Extract the above file and find the file – “sqljdbc42.jar” and place it at cognos installation –  install_location/drivers folder.

Re-open Cognos configuration and test the Content store.

 

for data source connection to work
keep “sqljdbc_auth.dll” file at drivers, bin64 folder.

 

Cognos analytics- how to run a report using URL

Check below link for details.
http://www-01.ibm.com/support/docview.wss?uid=swg21983556

By using above mentioned steps your final url will look like

http://servername:9300/bi/v1/disp?b_action=cognosViewer&run.outputFormat=HTML&run.prompt=true&ui.object=storeID (%22insert_StoreID_here%22)&ui.action=run&cv.header=false&cv.toolbar=false
9300[servername/ibmcognos/cgi-bin/cognosisapi.dll?b_action=cognosViewer&run.outputFormat=HTML&run.prompt=true&ui.object=storeID(%22insert_StoreID_here%22)&ui.action=run&cv.header=false&cv.toolbar=false

Cognos how to customize search and select prompt

Cognos How to resize Select and Search prompts
Cognos How to change the default prompt option of search and select

use html2 for resize
use html3 for  default option to contains

add 3 html items. 1 item before prompt and 2 items after prompt.

Prompt name say” ParName”

cognos customize search and select prompt

cognos customize search and select prompt html code

source:
http://www-01.ibm.com/support/docview.wss?uid=swg21341018

Quickie: Changing default option in a Select and Search Prompt


https://www-01.ibm.com/support/docview.wss?uid=swg21902305
https://www.cognoise.com/index.php?topic=26076.0

 

 

Pass data item/query item into Hyperlink. How to get Google maps links at Cognos.

For this example I am using google maps.
Google maps URL –
https://www.google.com/maps/search/?api=1&query=58.698017,-152.522067

Create 2 query items with latitude and longitude. Say [Query Item Latitude], [Query Item Longitude]
create a new data item say – [Query Item_google maps url] with
https://www.google.com/maps/search/?api=1&query= ‘ ||cast([Query Item Latitude] as varchar(10))||’,’|| cast([Query Item Longitude] as varchar(10))

at report studio drag hyperlink to your list report.
Select Hyperlink and change properties as follows
Source type – Data Item value
Data Item Value – [Query Item_google maps url]
Googlemaps

Run the report. You should be able to get to google maps from the hyperlink.

Another google map URL you can play with –
https://maps.google.com/?hl=en&ll={LATITUDE},{LONGITUDE}&t=m&z=19&vpsrc=6&layer=c&cbll={LATITUDE},{LONGITUDE}&cbp=12,15.61,,0,0

Here is the URL API guide from google: https://developers.google.com/maps/documentation/urls/guide

cognos dates

_first_of_month(_add_months(current_date,-3)) — 1st of last 3rd month i.e. for march 10th 2018 you will get output as Dec 1st 2017

 
— end of last month
-Last day of the previous month can be determined by using the following expression:
_last_of_month(_add_months(current_date,-1))

-First day of the previous month can be determined by using the following expression:
_first_of_month(_add_months(current_date,-1))

–current date
current_date

–current date-1 or yesterday date
_add_days ( current_date, -1)

— current year last 7th day
_add_days ( current_date, -7)

–current year
extract (year, current_date)

— current year First Day of Year
_add_days(Current_date , (_day_of_year(Current_date)*-1)+1 )

–CY Total Days till today
_day_of_year (current_date)

–CY Total Days till last 7th day
_day_of_year (_add_days(current_date,-7))

— CY First Day of Current Month
_first_of_month ( current_date)

source:
https://www-01.ibm.com/support/docview.wss?uid=swg21340206

Cognos cross tab percentages

 

How to get percentages in cognos cross tab

I need to calculate % for count distinct value. to do this in the query we need 3 data items.
data item 1 – count (distinct item_id) . solve order 1
data item 2 – count(distinct item_id for report) . solve order 2
data item 3 – data item 1/ data item 2

use data item 3 in your crosstab and format it as percentage.