Wednesday, March 21, 2012

Reporting Services Objects only during printing & multiselect ques

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.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
"RSUser" <RSUser@.discussions.microsoft.com> wrote in message
news:3CB5899F-04E9-4172-9BBD-3ECCADA27B4D@.microsoft.com...
> 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.
>|||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¶m1=value1&multiparam1=value1,value
Please correct the above url so that my multiselect report will wor
when i call from browser like this
Thanks

No comments:

Post a Comment