Popular White Paper On This Topic

You need to add a new data item to number your months from 1 to 12. You do not need to add this to your crosstab, you just need it in the query. You can then sort on this column and your months will then be in the correct order.

Winson or anyone,
If I have a xml for a report, how to make use of it. Here we have XML for the report. So is it copy from clipboard and paste or anything else. I don't hav the model with it, just the report, so I suspect whether I can run the report. please give some guidance.

Also I have couple of more questions.

Suppose I have a model and package is published then structure is changed and many other reports were also using that structure, So how can I find which other reports were effected with the changed structure.

Suman,
If you have xml you can always open it up in the report studio and look at the design of the report. Also if you have any other sample model not as exactly then you can reference each data item to that. Let's say I have 10.1 model but you have 8.2 report xml then you have to reference all the query item to the new model then should work.

Second question we have discussed while back in the toolbox. In FM if can see report dependencies. It will show or if we have third party tools it will also shows which report it will get break.
I will try to find the link for this post it back soon.
Thanks,
Winson

Thanks,winson, I would like to add one more thing here ,that is the package winson is talking about should be the same even though versions are different ,means the query item we want to reference should be present in both the packages ,the one we are referencing from and to .Thanks

If you want your months sorted into the correct order then the ONLY way to do this is to convert the month to the equivalent integer value which will then allow you to sort the months correctly, if you just use sort on your month names then you get something like April, August, December, February, etc

case
when ([Month]='January') then 01
when ([Month]='February') then 02
when ([Month]='March') then 03
when ([Month]='April') then 04
when ([Month]='May') then 05
when ([Month]='June') then 06
when ([Month]='July') then 07
when ([Month]='August') then 08
when ([Month]='September') then 09
when ([Month]='October) then 10
when ([Month]='November') then 11
when ([Month]='December') then 12

Bari,
Can you cut and paste your actual definition of the new data item here?
I've done this many times and it works, perhaps there is something odd in how
you defined the month sort column.
Also. make sure you are NOT still sorting on the original Month name column.

case
when ([Month]='January') then 01
when ([Month]='February') then 02
when ([Month]='March') then 03
when ([Month]='April') then 04
when ([Month]='May') then 05
when ([Month]='June') then 06
when ([Month]='July') then 07
when ([Month]='August') then 08
when ([Month]='September') then 09
when ([Month]='October) then 10
when ([Month]='November') then 11
when ([Month]='December') then 12
else
0
end

Create like this then its works
case
when [gosales_goretailers].[Orders].[Order month]='1' then 'JAN'
when [gosales_goretailers].[Orders].[Order month]='2' then 'fEB'
when [gosales_goretailers].[Orders].[Order month]='3' then 'MARCH'
when [gosales_goretailers].[Orders].[Order month]='4' then 'APR'
when [gosales_goretailers].[Orders].[Order month]='5' then 'MAY'
when [gosales_goretailers].[Orders].[Order month]='6' then 'JUNE'
when [gosales_goretailers].[Orders].[Order month]='7' then 'JULY'
when [gosales_goretailers].[Orders].[Order month]='8' then 'AUG'
when [gosales_goretailers].[Orders].[Order month]='9' then 'SEP'
when [gosales_goretailers].[Orders].[Order month]='10' then 'OCT'
when [gosales_goretailers].[Orders].[Order month]='11' then 'NOV'
ELSE
'DEC'
END
----
first sort months numbers asc then automatically months asc

Thanks.dramesh511 ,I have tried this way still wouldn't work.
Case
when([Month]='January') then '1'
when([Month]='Febuary') then '2'
when([Month]='March') then '3'
when([Month]='April') then '4'
when([Month]='May')then '5'
when([Month]='June') then '6'
when([Month]='July') then '7'
when([Month]='August') then '8'
when([Month]='Sptember') then '9'
when([Month]='October') then '10'
when([Month]='November') then '11'
ELSE
'DEC'
END

Here we go! Cognos simply wouldn't able to sort in ascending order as it is character data type.even when we apply sort it works on ascii values of character,obiviously we don't want this:There is very simple way to get around this by following steps:

1.Create a new data item in your main query,this data item needs not be shown on the report page

2:Write this expression in the newly created data item:

Case
when([Month]='January') then '01'
when([Month]='February') then '02'
when([Month]='March') then '03'
when([Month]='April') then '04'
when([Month]='May')then '05'
when([Month]='June') then '06'
when([Month]='July') then '07'
when([Month]='August') then '08'
when([Month]='September') then '09'
when([Month]='October') then '10'
when([Month]='November') then '11'
when([Month]='December') then '12'
ELSE
(null)
END

3: Then,go to advance sorting and drag and drop newly created data item there,which is by default ascending

Depends on the structure of id's in database. If you have a month id's like
201101, 201102, 201103 you can apply sorting on id's instead of names.
Please don't forget to add id's to the property of list, crosstab or chart
(whichever object ) you are using. Adding id's in the property is very
important as this dataitem will not be used on list/chart/crosstab.

If it does not work, please elaborate on structure of id's and if there is
any filter/prompt for year.