COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: robin2008 on 15 Oct 2008 11:11:47 AM

Title: please help..help
Post by: robin2008 on 15 Oct 2008 11:11:47 AM
I am doing sorting this way

propmt page---drag value prompt---select static choice---add the dispaly(ZIP CODE)--OK--got to Query Explorer---drag new data item----write expression
case ?Parameter1?
when 'code' then [ZIP-CODE]
end
ok(no error).----then go to report pages---click page set--go to group and sorting...click on sort list and drag this new data item below sort list...then RUN


OK...when I did same and exact process for COMPANY_NAME then it runs perfect..BUT
BUT...when i did this for ZIP-CODe like above it took long long time (more than half hour) and still not giving anything.....just runs and runs and runs only..............plz help
Title: Re: please help..help
Post by: robin2008 on 15 Oct 2008 11:33:59 AM
help please........anybody..plz
Title: Re: please help..help
Post by: Suraj on 15 Oct 2008 11:37:28 AM
Your filter is messed up.

case ?Parameter1?
when 'code' then [ZIP-CODE]
end

What is code?
If you have display ZIP CODE why r u using 'code'???
Title: Re: please help..help
Post by: Suraj on 15 Oct 2008 11:39:37 AM
I already gave you answer in another post...

case
when ?Sort Prompt? = 'Loan' then [LOAN_ID]
when ?Sort Prompt? = 'Zip' then [Zip]
when ?Sort Prompt? =  'Name' then [Name]
end

Do some reading and research so that ur skill level is enhanced.
Title: Re: please help..help
Post by: robin2008 on 15 Oct 2008 11:45:41 AM
what I did is

case ?Parameter?
when 'zip' then [CHRMAILZIPCODE]
end

is this correct OR I have to write ??

thank you
Title: Re: please help..help
Post by: robin2008 on 15 Oct 2008 11:49:05 AM
I mean
ON Static Choices USE and DISPALY should be same ????
OR anything else...plz
Title: Re: please help..help
Post by: Suraj on 15 Oct 2008 12:14:46 PM
You have to use the USE value in your filter not the DISPLAY value.

ON Static Choices USE and DISPALY should be same ?
OR anything else...plz

It doesn't matter, it can be same or different but USE value is the one used in calculation.
The display value is in report expression to display what is selected.

example:
?Parameter?
Use value = zip-----Display = Zip Code
Use value = name---Display = Name

In your data item,
case ?Parameter?
when 'zip' then [Your Zip Code column]
when 'name' then [Your Name column]
end

Then sort in this column.
It's very simple logic.