Thursday, September 30, 2010

For those who want to access Athena from their laptop

Go to following site.
https://athenax.ugent.be/
Log in to Athena.
Go to ‘Academics’ and click on any software. For example: To work on SPSS double click on PASW Stistics 18 and you can start working on it. However some unfortunate people can get ICA File  and may not get access to any software.
Here is a solution for that.
Go down to that page



Click on ‘ICA Client Detection’ which is marked in red and then follow the direction as mentioned in the page.
Install Citirix in your machine
Don’t forget to Allow Pop up and Install ActiveX Control.
Also From Tool- Internet option, add the site https://athenax.ugent.be/ as trusted site.
Hope this will help… 

Monday, April 20, 2009

amar lekha kobita

Abasar

E ak abosarer jantrona, nam na jana nana rakom chinta,
Elomelo sab,chera sapner mato matha take ghire dhare
Kono kichutei monojog haina..

Kaj se ak lokhyo hin chute chala, kore jete hai,
Kore jete hai amon abodh alik chinta
Karon theme jaya jayna..

Sab kichu positive chintar moroke beche dite hai
Bechte na parle theme jete hai..


Shayane Shapone

Hathat akdin ghum theke uthe dekhi-
Ami ak nirjan saikate,
Chardike nil akas meghlakore ache
Bataso boiche mondo nai..
Sonali baluka belay nisthabdo saikate
Sudhu dheu er garjon..
Ami vese jachhi anonter dike

Tarpar abar akpasla bristi,.ami pouche gelam,
Megher kole pahar ghera dese.
Sunil akas abar amar chokher taray mise ak advut shanty..
Thanda hayar paras lege, siter porijayir mato vese cholechi akta
Bisal megher pahar periye..

Dure nodir soru rekha dekha jachhe,abar egiye chala
Abar cholte cholte pouche jaya nodir kinaray
Sobuj makhmaler mato ghase jotsna alo chuye chuye pore
Amar trisnay misegache
Ah! Eki tripti

Hatat akchilte roddur chokher opor pore venge diye jay robibarer sapno.
Abar asuk bastab!

Akti analytical kobita

Ak chilte roddur jodi mukhe ese pare takhon tar
Dimension dhore chole jao ramdhonu measure korte

Abar jakhon ak pasla bristi te bhije giye mone hai er swad
Nonta kano? Takhon janbe, akaser cube e
nuner measure group e akta notun measure join koreche,
se tomar chokher jal.

Friday, February 6, 2009

SSRS Reporting from Cube – A Different Approach

There are two ways to fetch data in SSRS report.

From SSAS Cube
From Sql server database.

For the second option either you have to write a Sql query in the data tab or you have to write the store procedure.
For the 1st option you can refer cube directly the report but the report are not customizable.
We have to create first cube from bids. For example I have a cube which calcute average claim paid, incurred_amt and days taken to complete a claim life cycle.Refer the MDX query below.

Example Code:


SELECT NON EMPTY {[LOCATION DIM].[REGION].[REGION].members } ON ROWS ,
NON EMPTY {[Measures].[MTH DAYS TAKEN CLOSED CLAIMS],[Measures].[QTR DAYS TAKEN CLOSED CLAIMS],[Measures].[YR DAYS TAKEN CLOSED CLAIMS],[Measures].[m Closed],[Measures].[q Closed],[Measures].[Closed],[Measures].[MTH INCURRED AMT],[Measures].[q TR INCURRED AMT],[Measures].[YR INCURRED AMT],[Measures].[MTH_ACP],[Measures].[QTR_ACP],[Measures].[YR_ACP]}ON COLUMNS
FROM [Claim_Knowbots]
Run the mdx query from SSMS.
Create a linked server from server object of object explorer.
We can create linked server either manually by right clicking on server object or writing code.








FIG1: Linked Server from server object






Then try the query in sql query analyzer with open query. Please refer below query.

select * from openquery(KNOWBOTNew,'SELECT NON EMPTY {[LOCATION DIM].[REGION].[REGION].members } ON ROWS ,
NON EMPTY {[Measures].[MTH DAYS TAKEN CLOSED CLAIMS],[Measures].[QTR DAYS TAKEN CLOSED CLAIMS],[Measures].[YR DAYS TAKEN CLOSED CLAIMS],[Measures].[m Closed],[Measures].[q Closed],[Measures].[Closed],[Measures].[MTH INCURRED AMT],[Measures].[q TR INCURRED AMT],[Measures].[YR INCURRED AMT],[Measures].[MTH_ACP],[Measures].[QTR_ACP],[Measures].[YR_ACP]}ON COLUMNS
FROM [Claim_Knowbots] ')

Requirement complexity

In my case the requirement was to show monthly, quarterly, yearly measures from cube through ssrs report but it should be dynamic. User can choose runtime month, quarter and year and according to that choice data should be fetched. Also we have fetch the data region wise.
Secondly the challenge was to parameter data, which was passed as as a string, or row in comma separated manner. We do have to convert it in column first then have to pass it to the mdx query. Below code snippet can give more light to the current scenario.
From SSMS write click on stored procedure from object explorer.
Create new store procedure
To covert the comma-separated string in to mdx format follow the code snippet.

CREATE TABLE #prm_Region(
LIST_ITEM VARCHAR (2000) NOT NULL)
SELECT @textXML = CAST('' + REPLACE(@prm_Region, @delimiter, '') + '' AS XML);
INSERT #prm_Region
SELECT '[LOCATION DIM].[REGION].&['+T.split.value('.', 'nvarchar(max)')+']'
FROM @textXML.nodes('/d') T (split)

SELECT @RegionList = COALESCE(@RegionList + ', ', '') +
CAST(LIST_ITEM AS varchar(2000))
FROM #prm_Region

select @pos=CHARINDEX(',', @RegionList)
if @pos <>0
SET @RegionList='union('+@RegionList+')'


Then we have to create a temp table to pass the result set of mdx query.

CREATE TABLE #ACP (
[REGION] [varchar](50) NULL,
[MTH_DAYS_TAKEN_CLOSED_CLAIMS] [numeric](18, 2) NULL,
[QTR_DAYS_TAKEN_CLOSED_CLAIMS] [numeric](18, 2) NULL,
[YR_DAYS_TAKEN_CLOSED_CLAIMS] [numeric](18, 2) NULL)

Then according to user’s selecttion of Year. Quarter and month we have to convert the parameter value and pass to mdx query.

Example:

IF @prm_Period='Year'
Begin
CREATE TABLE #prm_PeriodValue_YEAR1(
LIST_ITEM VARCHAR (2000) NOT NULL)
SELECT @textXML = CAST('' + REPLACE(@prm_PeriodValue, @delimiter, '') + '' AS XML);
INSERT #prm_PeriodValue_YEAR1
SELECT T.split.value('.', 'nvarchar(max)')
FROM @textXML.nodes('/d') T (split)

CREATE TABLE #prm_PeriodValue_YEAR2(
LIST_ITEM1 VARCHAR (2000) NOT NULL)

INSERT #prm_PeriodValue_YEAR2 select distinct '[TIME DIM].[YEAR].&['+LIST_ITEM+']' from #prm_PeriodValue_YEAR1

SELECT @YearList = COALESCE(@YearList + ', ', '') +
CAST(LIST_ITEM1 AS varchar(2000))
FROM #prm_PeriodValue_YEAR2

select @pos=CHARINDEX(',', @yearlist)
if @pos <>0
SET @yearlist='union('+@yearlist+')'

SET @mdx = 'SELECT NON EMPTY { ('+@RegionList+','+@LobList+' ) } ON ROWS ,
NON EMPTY {[Measures].[MTH DAYS TAKEN CLOSED CLAIMS],[Measures].[QTR DAYS TAKEN CLOSED CLAIMS],[Measures].[YR DAYS TAKEN CLOSED CLAIMS],[Measures].[m Closed],[Measures].[q Closed],[Measures].[Closed],[Measures].[MTH INCURRED AMT],[Measures].[q TR INCURRED AMT],[Measures].[YR INCURRED AMT],[Measures].[MTH_ACP],[Measures].[QTR_ACP],[Measures].[YR_ACP]}ON COLUMNS
FROM [Claim_Knowbots] where ('+@yearlist+','+@UserList+')'

end
Lastly We have to insert result set in temp table and use the result set in the report.

Example:
Set @mdx='SELECT NON EMPTY { ('+@RegionList+' ) } ON ROWS ,
NON EMPTY {[Measures].[MTH DAYS TAKEN CLOSED CLAIMS],[Measures].[QTR DAYS TAKEN CLOSED CLAIMS],[Measures].[YR DAYS TAKEN CLOSED CLAIMS],[Measures].[m Closed],[Measures].[q Closed],[Measures].[Closed],[Measures].[MTH INCURRED AMT],[Measures].[q TR INCURRED AMT],[Measures].[YR INCURRED AMT],[Measures].[MTH_ACP],[Measures].[QTR_ACP],[Measures].[YR_ACP]}ON COLUMNS
FROM [Claim_Knowbots]’


set @sql = 'Insert #ACP([REGION],
[MTH_DAYS_TAKEN_CLOSED_CLAIMS],
[QTR_DAYS_TAKEN_CLOSED_CLAIMS],
[YR_DAYS_TAKEN_CLOSED_CLAIMS],
[m_Closed],
[q_Closed],
[Closed],
[MTH_INCURRED_AMT],
[qTR_INCURRED_AMT],
[YR_INCURRED_AMT],
[MTH_ACP],
[QTR_ACP],
[YR_ACP]) select '+ @columns +' from openquery(KNOWBOTNew,''' + @mdx + ''')'

After creating Storeprocedure in your database we can use this store procedure in SSRS.

Advantages:

It will store the data aggregated format in your cube.
So the data retrieval will be faster.
In ssrs when you refer cube you can not modify the mdx query.This limitation can be minimised using this way.
You can write your own mdx and pass it through stored procedure.