How can i use order by within Cascading

Hi All:

I am having problem of Cascading and order by, i need to bind the 2nd parameter to the 1st parameter and i am trying to tidy up the 2nd parameter when it shows up. Therefore i need an order by like the code below, but it is not allowed.

Looking forward to your great answers. Thanks in advance. (also i have updated the screenshot there)

 

 

PROCEDURE[dbo].[CascadingPriceHotelNameBrandName]

(

@BName VARCHAR(50))

AS

BEGIN

SET

NOCOUNTON(

SELECT

AName from[dbo].[xxxList]

WHERE

Bname =@BName

Order by .... (THIS IS ACTUALLY NOT ALOOWED)

)

END




April 17th, 2015 7:20am

Hi,

Where are you using @AName in this procedure . 

Do you want to order BName or @AName or @BName.

Do you want to use cascading for parameters. and order by parameter display like below right . '

order by will work in procedure.

Kindly can you please share your requirements detailed like sample data or desired output and share your error details.

Free Windows Admin Tool Kit Click here and download it now
April 17th, 2015 10:42am

You can do ordering while fetching inside report also. This can be done inside parameter properties tab.
April 17th, 2015 11:34am

Hi Gvrspk:

Thanks a lot for your kindly reply.

Your sample screenshot on the right side is exactly what i want to have, however i am keep on getting an error by using order by (pelase refer to the screenshot for the details).

That will be great if you can kindly give me a hand.

Cheers

Johnny

Free Windows Admin Tool Kit Click here and download it now
April 18th, 2015 8:44pm

Hi Visakh:

Thanks a lot for your help. just wondering if it is possible to be more specific on "ordering while fetching inside report?

Cheers

Johnny

April 18th, 2015 8:45pm

not sure if i followed everything but - n short - to fix the error...remove the parenthisis 

create procedure usp_test(@column3 int)
as 
begin 
set nocount on
select column1,column2 from tablename where column3=@column3 order by column1
end


Free Windows Admin Tool Kit Click here and download it now
April 19th, 2015 12:04am

Hi Visakh:

Thanks a lot for your help. just wondering if it is possible to be more specific on "ordering while fetching inside report?

Cheers

Johnny

That means you can apply ordering inside the ssrs report. In the dataset properties as well as in grouping/tablix properties you've sorting option where you can specify the field(s) based on which you want report to be sorted.
April 19th, 2015 12:52am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics