all groups > sql server reporting services > july 2005 >
You're in the

sql server reporting services

group:

Reporting Services Objects only during printing & multiselect ques


Reporting Services Objects only during printing & multiselect ques RSUser
7/11/2005 3:16:06 PM
sql server reporting services:
Hi all,

1)Is there a way to supress the textbox,image etc when the report is
displayed in browser and then make them available for printing on paper alone?

2) how to construct url to call reports that has multiselect parameters. In
other words how to pass values through url to a report for multiselect
parameters.

Any idea is greately appreciated.

Thanks.
Re: Reporting Services Objects only during printing & multiselect ques Jéjé
7/11/2005 10:43:12 PM
1. today there is no way to know how the report is rendered except by adding
a parameter in the report.

2. try using coma delimited values and convert this list into a table using
a function like the following code.
and use it like this:

select * from products P inner join dbo.ListToTableChar('P1', 'P2', 'P3',
'P4', ',') L on P.ProductID = L.str



create FUNCTION [ListToTableChar](@list [ntext], @delimiter [nchar](1) =
N',')
RETURNS @tbl TABLE (
[listpos] [int] IDENTITY NOT NULL,
[str] [varchar](4000) NULL,
[nstr] [nvarchar](2000) NULL
) AS
BEGIN
DECLARE @pos int,
@textpos int,
@chunklen smallint,
@tmpstr nvarchar(4000),
@leftover nvarchar(4000),
@tmpval nvarchar(4000)

SET @textpos = 1
SET @leftover = ''
WHILE @textpos <= datalength(@list) / 2
BEGIN
SET @chunklen = 4000 - datalength(@leftover) / 2
SET @tmpstr = @leftover + substring(@list, @textpos, @chunklen)
SET @textpos = @textpos + @chunklen

SET @pos = charindex(@delimiter, @tmpstr)

WHILE @pos > 0
BEGIN
SET @tmpval = ltrim(rtrim(left(@tmpstr, @pos - 1)))
INSERT @tbl (str, nstr) VALUES(@tmpval, @tmpval)
SET @tmpstr = substring(@tmpstr, @pos + 1, len(@tmpstr))
SET @pos = charindex(@delimiter, @tmpstr)
END

SET @leftover = @tmpstr
END

INSERT @tbl(str, nstr) VALUES (ltrim(rtrim(@leftover)),
ltrim(rtrim(@leftover)))
RETURN
END




[quoted text, click to view]

Re: Multi select problem sridevi3 NO[at]SPAM hotmail-dot-com.no-spam.invalid
7/13/2005 1:00:40 AM
Hi

For multiselect I constructed a udf which will break my strin
delimited with comma and return a table datatype with a fiel
containing all values.It works fine in the dataset part in m
report.(Actually if i try to use report manager interface instead o
url access, i need not even construct udf; it simply works with th
sql like select x,y from table1 where x in (@z))

My problem is i do not know how to construct the url which has to pas
comma separated values to report

The sample url which i try to use now and getting error is

http://localhost/reportserver?/foldername/rptname&rs:command=render&rc:parameters=false&param1=value1&multiparam1=value1,value

Please correct the above url so that my multiselect report will wor
when i call from browser like this

Thanks
AddThis Social Bookmark Button