Showing posts with label statement. Show all posts
Showing posts with label statement. Show all posts

Monday, March 26, 2012

Reporting Services 2005 & Parameters

Hi, I experiencing some problems when accesing the Parameters collection on
the dataset to build the the sql statement.
Below is my code (very simple):
DataSet:
="SELECT 'userid' = '" & code.Parameter("userID", Parameters) & "' FROM
users"
Code:
Public Function Parameter(ByVal field As String, ByRef pars As Object) As
String
return pars(field).Value
End Function
This code works just fine on the Preview but if I test the report on the
browser, it doesnt work and returns the following error:
a.. An error has occurred during report processing.
a.. Cannot set the command text for data set 'ExpoMedios'.
a.. Error during processing of the CommandText expression of dataset
'ExpoMedios'.
Doing some debugging the error message inside the function is:
Attempt to access the method failed.
Can anyone pleae explain why this is happening. Your help will be
appreciated.
Regards,
FabianAny help please? It happens when I access to the Parameters Collection
inside a custom code.
Any help will be appreciated.
Thanks in avance,
Fabian von Romberg
"Fabian von Romberg" <fromberg100@.hotmail.com> wrote in message
news:uBbFLro3GHA.3492@.TK2MSFTNGP06.phx.gbl...
> Hi, I experiencing some problems when accesing the Parameters collection
on
> the dataset to build the the sql statement.
> Below is my code (very simple):
> DataSet:
> ="SELECT 'userid' = '" & code.Parameter("userID", Parameters) & "' FROM
> users"
> Code:
> Public Function Parameter(ByVal field As String, ByRef pars As Object) As
> String
> return pars(field).Value
> End Function
>
> This code works just fine on the Preview but if I test the report on the
> browser, it doesnt work and returns the following error:
> a.. An error has occurred during report processing.
> a.. Cannot set the command text for data set 'ExpoMedios'.
> a.. Error during processing of the CommandText expression of dataset
> 'ExpoMedios'.
> Doing some debugging the error message inside the function is:
> Attempt to access the method failed.
>
> Can anyone pleae explain why this is happening. Your help will be
> appreciated.
> Regards,
> Fabian
>

Friday, March 9, 2012

reporting service performance issue

Hi,
I construct a sql statement as a dataset. But when I click Run or Refresh,
the VS.NET runs so slow and no response sometimes. Do you know why, and how
to
deal with this issue?
below is the sql statement I used for:
DECLARE
@.sql NVARCHAR(4000)
select @.resp=ltrim(rtrim(@.resp)),
@.country =ltrim(rtrim(@.country )),
@.entity=ltrim(rtrim(@.entity)),
@.loc=ltrim(rtrim(@.loc)),
--@.office=ltrim(rtrim(@.office)),
@.local_oc=ltrim(rtrim(@.local_oc)),
@.for_agent=ltrim(rtrim(@.for_agent))
select @.sql =
'SELECT Country_Application.country_code, Country_Application.type,
Country_Application.appl_no,
Action_Due.hpj_resp_atty, Action_Due.pdno, Action_Due.sub_case,
Action_Due.item, Action_Due.action_due_resp_atty,
Action_Due.action_type, Action_Due.action_due, Action_Due.indicator,
Action_Due.due_date,
Action_Due.remark, Action_Due.resp_admin
from Country_Application INNER JOIN Action_Due on
Country_Application.pdno = Action_Due.pdno and Country_Application.sub_case
= Action_Due.sub_case
inner join Invention_Data on Action_Due.pdno=Invention_Data.pdno
where upper(Action_Due.done) = ''NO'' and upper(Action_Due.action_type) <>
''ANNUITY''' + --hard code
' and Action_Due.due_date between '''+ @.DateBegin + ''' and ''' + @.DateEnd +
''''
if @.resp not in ('ALL', '')
begin
set @.sql = @.sql + ' and Action_Due.hpj_resp_atty in ('+ @.resp + ')'
end
if @.country not in ('ALL', '')
begin
if @.country = '<> US'
begin
set @.sql = @.sql + ' and Country_Application.country_code <> ''US'''
end
else
begin
set @.sql = @.sql + ' and Country_Application.country_code in ('+ @.country
+')'
end
end
if @.entity not in ('ALL', '')
begin
set @.sql = @.sql + ' and Invention_Data.entity = '''+@.entity+''' and
Invention_Data.loc = '''+@.loc+''''
end
if @.local_oc <> ''
begin
set @.sql = @.sql +' and Action_Due.local_oc = '''+@.local_oc+''''
end
if @.for_agent <> ''
begin
set @.sql = @.sql +' and Action_Due.for_agent = '''+@.for_agent+''''
end
exec sp_executesql @.sqlThe best way to deal with this is to pull the query out and run it in SQL
SErver Management Studio - get the query plan and find out what is
happening...
You are using some <>, and functions in where clauses which prevents the
optimizer from using index statistics to choose indexes..so you might not the
best plan...
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
I support the Professional Association for SQL Server ( PASS) and it''s
community of SQL Professionals.
"David Zhu" wrote:
> Hi,
> I construct a sql statement as a dataset. But when I click Run or Refresh,
> the VS.NET runs so slow and no response sometimes. Do you know why, and how
> to
> deal with this issue?
> below is the sql statement I used for:
> DECLARE
> @.sql NVARCHAR(4000)
> select @.resp=ltrim(rtrim(@.resp)),
> @.country =ltrim(rtrim(@.country )),
> @.entity=ltrim(rtrim(@.entity)),
> @.loc=ltrim(rtrim(@.loc)),
> --@.office=ltrim(rtrim(@.office)),
> @.local_oc=ltrim(rtrim(@.local_oc)),
> @.for_agent=ltrim(rtrim(@.for_agent))
> select @.sql => 'SELECT Country_Application.country_code, Country_Application.type,
> Country_Application.appl_no,
> Action_Due.hpj_resp_atty, Action_Due.pdno, Action_Due.sub_case,
> Action_Due.item, Action_Due.action_due_resp_atty,
> Action_Due.action_type, Action_Due.action_due, Action_Due.indicator,
> Action_Due.due_date,
> Action_Due.remark, Action_Due.resp_admin
> from Country_Application INNER JOIN Action_Due on
> Country_Application.pdno = Action_Due.pdno and Country_Application.sub_case
> = Action_Due.sub_case
> inner join Invention_Data on Action_Due.pdno=Invention_Data.pdno
>
> where upper(Action_Due.done) = ''NO'' and upper(Action_Due.action_type) <>
> ''ANNUITY''' + --hard code
> ' and Action_Due.due_date between '''+ @.DateBegin + ''' and ''' + @.DateEnd +
> ''''
> if @.resp not in ('ALL', '')
> begin
> set @.sql = @.sql + ' and Action_Due.hpj_resp_atty in ('+ @.resp + ')'
> end
> if @.country not in ('ALL', '')
> begin
> if @.country = '<> US'
> begin
> set @.sql = @.sql + ' and Country_Application.country_code <> ''US'''
> end
> else
> begin
> set @.sql = @.sql + ' and Country_Application.country_code in ('+ @.country
> +')'
> end
> end
> if @.entity not in ('ALL', '')
> begin
> set @.sql = @.sql + ' and Invention_Data.entity = '''+@.entity+''' and
> Invention_Data.loc = '''+@.loc+''''
> end
> if @.local_oc <> ''
> begin
> set @.sql = @.sql +' and Action_Due.local_oc = '''+@.local_oc+''''
> end
> if @.for_agent <> ''
> begin
> set @.sql = @.sql +' and Action_Due.for_agent = '''+@.for_agent+''''
> end
> exec sp_executesql @.sql
>
>
>
>|||Hi Snyder,
Thanks a lot.
I also did some investigation. Unfortunately, the sql statement run fast
enough in
Sql query analyser. And I found the report run fast on the RS2000 without
SP2 machine, but slow on RS2000 with SP2.
Could you please give me some suggestion?
"Wayne Snyder" wrote:
> The best way to deal with this is to pull the query out and run it in SQL
> SErver Management Studio - get the query plan and find out what is
> happening...
> You are using some <>, and functions in where clauses which prevents the
> optimizer from using index statistics to choose indexes..so you might not the
> best plan...
> --
> Wayne Snyder MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> I support the Professional Association for SQL Server ( PASS) and it''s
> community of SQL Professionals.
>
> "David Zhu" wrote:
> > Hi,
> >
> > I construct a sql statement as a dataset. But when I click Run or Refresh,
> > the VS.NET runs so slow and no response sometimes. Do you know why, and how
> > to
> > deal with this issue?
> >
> > below is the sql statement I used for:
> >
> > DECLARE
> >
> > @.sql NVARCHAR(4000)
> >
> > select @.resp=ltrim(rtrim(@.resp)),
> > @.country =ltrim(rtrim(@.country )),
> > @.entity=ltrim(rtrim(@.entity)),
> > @.loc=ltrim(rtrim(@.loc)),
> > --@.office=ltrim(rtrim(@.office)),
> > @.local_oc=ltrim(rtrim(@.local_oc)),
> > @.for_agent=ltrim(rtrim(@.for_agent))
> >
> > select @.sql => >
> > 'SELECT Country_Application.country_code, Country_Application.type,
> > Country_Application.appl_no,
> > Action_Due.hpj_resp_atty, Action_Due.pdno, Action_Due.sub_case,
> > Action_Due.item, Action_Due.action_due_resp_atty,
> > Action_Due.action_type, Action_Due.action_due, Action_Due.indicator,
> > Action_Due.due_date,
> > Action_Due.remark, Action_Due.resp_admin
> >
> > from Country_Application INNER JOIN Action_Due on
> > Country_Application.pdno = Action_Due.pdno and Country_Application.sub_case
> > = Action_Due.sub_case
> > inner join Invention_Data on Action_Due.pdno=Invention_Data.pdno
> >
> >
> > where upper(Action_Due.done) = ''NO'' and upper(Action_Due.action_type) <>
> > ''ANNUITY''' + --hard code
> >
> > ' and Action_Due.due_date between '''+ @.DateBegin + ''' and ''' + @.DateEnd +
> > ''''
> >
> > if @.resp not in ('ALL', '')
> > begin
> > set @.sql = @.sql + ' and Action_Due.hpj_resp_atty in ('+ @.resp + ')'
> > end
> >
> > if @.country not in ('ALL', '')
> > begin
> > if @.country = '<> US'
> > begin
> > set @.sql = @.sql + ' and Country_Application.country_code <> ''US'''
> > end
> > else
> > begin
> > set @.sql = @.sql + ' and Country_Application.country_code in ('+ @.country
> > +')'
> > end
> > end
> >
> > if @.entity not in ('ALL', '')
> > begin
> > set @.sql = @.sql + ' and Invention_Data.entity = '''+@.entity+''' and
> > Invention_Data.loc = '''+@.loc+''''
> > end
> >
> > if @.local_oc <> ''
> > begin
> > set @.sql = @.sql +' and Action_Due.local_oc = '''+@.local_oc+''''
> > end
> >
> > if @.for_agent <> ''
> > begin
> > set @.sql = @.sql +' and Action_Due.for_agent = '''+@.for_agent+''''
> > end
> >
> > exec sp_executesql @.sql
> >
> >
> >
> >
> >
> >
> >|||My suggestion is to put this in a stored procedure and call that instead and
see what that does for performance.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"David Zhu" <DavidZhu@.discussions.microsoft.com> wrote in message
news:C32A3B2C-5392-4C4B-B909-13D6B1B26F9B@.microsoft.com...
> Hi Snyder,
> Thanks a lot.
> I also did some investigation. Unfortunately, the sql statement run fast
> enough in
> Sql query analyser. And I found the report run fast on the RS2000 without
> SP2 machine, but slow on RS2000 with SP2.
> Could you please give me some suggestion?
> "Wayne Snyder" wrote:
>> The best way to deal with this is to pull the query out and run it in SQL
>> SErver Management Studio - get the query plan and find out what is
>> happening...
>> You are using some <>, and functions in where clauses which prevents the
>> optimizer from using index statistics to choose indexes..so you might not
>> the
>> best plan...
>> --
>> Wayne Snyder MCDBA, SQL Server MVP
>> Mariner, Charlotte, NC
>> I support the Professional Association for SQL Server ( PASS) and it''s
>> community of SQL Professionals.
>>
>> "David Zhu" wrote:
>> > Hi,
>> >
>> > I construct a sql statement as a dataset. But when I click Run or
>> > Refresh,
>> > the VS.NET runs so slow and no response sometimes. Do you know why, and
>> > how
>> > to
>> > deal with this issue?
>> >
>> > below is the sql statement I used for:
>> >
>> > DECLARE
>> >
>> > @.sql NVARCHAR(4000)
>> >
>> > select @.resp=ltrim(rtrim(@.resp)),
>> > @.country =ltrim(rtrim(@.country )),
>> > @.entity=ltrim(rtrim(@.entity)),
>> > @.loc=ltrim(rtrim(@.loc)),
>> > --@.office=ltrim(rtrim(@.office)),
>> > @.local_oc=ltrim(rtrim(@.local_oc)),
>> > @.for_agent=ltrim(rtrim(@.for_agent))
>> >
>> > select @.sql =>> >
>> > 'SELECT Country_Application.country_code, Country_Application.type,
>> > Country_Application.appl_no,
>> > Action_Due.hpj_resp_atty, Action_Due.pdno, Action_Due.sub_case,
>> > Action_Due.item, Action_Due.action_due_resp_atty,
>> > Action_Due.action_type, Action_Due.action_due, Action_Due.indicator,
>> > Action_Due.due_date,
>> > Action_Due.remark, Action_Due.resp_admin
>> >
>> > from Country_Application INNER JOIN Action_Due on
>> > Country_Application.pdno = Action_Due.pdno and
>> > Country_Application.sub_case
>> > = Action_Due.sub_case
>> > inner join Invention_Data on Action_Due.pdno=Invention_Data.pdno
>> >
>> >
>> > where upper(Action_Due.done) = ''NO'' and upper(Action_Due.action_type)
>> > <>
>> > ''ANNUITY''' + --hard code
>> >
>> > ' and Action_Due.due_date between '''+ @.DateBegin + ''' and ''' +
>> > @.DateEnd +
>> > ''''
>> >
>> > if @.resp not in ('ALL', '')
>> > begin
>> > set @.sql = @.sql + ' and Action_Due.hpj_resp_atty in ('+ @.resp + ')'
>> > end
>> >
>> > if @.country not in ('ALL', '')
>> > begin
>> > if @.country = '<> US'
>> > begin
>> > set @.sql = @.sql + ' and Country_Application.country_code <> ''US'''
>> > end
>> > else
>> > begin
>> > set @.sql = @.sql + ' and Country_Application.country_code in ('+
>> > @.country
>> > +')'
>> > end
>> > end
>> >
>> > if @.entity not in ('ALL', '')
>> > begin
>> > set @.sql = @.sql + ' and Invention_Data.entity = '''+@.entity+''' and
>> > Invention_Data.loc = '''+@.loc+''''
>> > end
>> >
>> > if @.local_oc <> ''
>> > begin
>> > set @.sql = @.sql +' and Action_Due.local_oc = '''+@.local_oc+''''
>> > end
>> >
>> > if @.for_agent <> ''
>> > begin
>> > set @.sql = @.sql +' and Action_Due.for_agent = '''+@.for_agent+''''
>> > end
>> >
>> > exec sp_executesql @.sql
>> >
>> >
>> >
>> >
>> >
>> >
>> >|||I have the same problem..
Unfortunately, things did improve when I wrote it into a stored procedure.
The bad part about this is that we are planning to allow our customers
create reports using our views. They will not like extremely slow reports. I
have tracked this down in the log files to the fact that the report is being
add to a job list and then not being run from 1 to 3 minutes.
I haven't figured out how to make the report run without going to this list.
"David Zhu" <DavidZhu@.discussions.microsoft.com> wrote in message
news:44673263-E25F-44C1-8C33-E5D9DF419422@.microsoft.com...
> Hi,
> I construct a sql statement as a dataset. But when I click Run or Refresh,
> the VS.NET runs so slow and no response sometimes. Do you know why, and
> how
> to
> deal with this issue?
> below is the sql statement I used for:
> DECLARE
> @.sql NVARCHAR(4000)
> select @.resp=ltrim(rtrim(@.resp)),
> @.country =ltrim(rtrim(@.country )),
> @.entity=ltrim(rtrim(@.entity)),
> @.loc=ltrim(rtrim(@.loc)),
> --@.office=ltrim(rtrim(@.office)),
> @.local_oc=ltrim(rtrim(@.local_oc)),
> @.for_agent=ltrim(rtrim(@.for_agent))
> select @.sql => 'SELECT Country_Application.country_code, Country_Application.type,
> Country_Application.appl_no,
> Action_Due.hpj_resp_atty, Action_Due.pdno, Action_Due.sub_case,
> Action_Due.item, Action_Due.action_due_resp_atty,
> Action_Due.action_type, Action_Due.action_due, Action_Due.indicator,
> Action_Due.due_date,
> Action_Due.remark, Action_Due.resp_admin
> from Country_Application INNER JOIN Action_Due on
> Country_Application.pdno = Action_Due.pdno and
> Country_Application.sub_case
> = Action_Due.sub_case
> inner join Invention_Data on Action_Due.pdno=Invention_Data.pdno
>
> where upper(Action_Due.done) = ''NO'' and upper(Action_Due.action_type) <>
> ''ANNUITY''' + --hard code
> ' and Action_Due.due_date between '''+ @.DateBegin + ''' and ''' + @.DateEnd
> +
> ''''
> if @.resp not in ('ALL', '')
> begin
> set @.sql = @.sql + ' and Action_Due.hpj_resp_atty in ('+ @.resp + ')'
> end
> if @.country not in ('ALL', '')
> begin
> if @.country = '<> US'
> begin
> set @.sql = @.sql + ' and Country_Application.country_code <> ''US'''
> end
> else
> begin
> set @.sql = @.sql + ' and Country_Application.country_code in ('+ @.country
> +')'
> end
> end
> if @.entity not in ('ALL', '')
> begin
> set @.sql = @.sql + ' and Invention_Data.entity = '''+@.entity+''' and
> Invention_Data.loc = '''+@.loc+''''
> end
> if @.local_oc <> ''
> begin
> set @.sql = @.sql +' and Action_Due.local_oc = '''+@.local_oc+''''
> end
> if @.for_agent <> ''
> begin
> set @.sql = @.sql +' and Action_Due.for_agent = '''+@.for_agent+''''
> end
> exec sp_executesql @.sql
>
>
>
>|||David.
You may experience a great performance improvment if you write the
statement as a stored procedure AND avoid using dynamic execution
(sp_executesql).
In fact, you can rewrite your SQL query in a simple statement.
Try to replace code like the following:
if @.resp not in ('ALL', '')
begin
set @.sql = @.sql + ' and Action_Due.hpj_resp_atty in ('+ @.resp + ')'
end
by a condition in the clause WHERE:
WHERE
...
AND (@.resp not in ('ALL', '') or Action_Due.hpj_resp_atty in (select
[str] from fList(@.resp)))
where fList is as UDF that converts a comma-separated list of values to
a table:
ALTER FUNCTION fList(@.list ntext)
RETURNS @.tbl TABLE
( listpos int IDENTITY(1, 1) NOT NULL,
str varchar(4000) COLLATE
SQL_Latin1_General_CP1_CI_AS,
nstr nvarchar(2000) COLLATE
SQL_Latin1_General_CP1_CI_AS
)
AS
BEGIN
if @.list is null return
DECLARE @.pos int, @.textpos int, @.tam smallint, @.tmpstr
nvarchar(4000), @.resto nvarchar(4000), @.tmpval nvarchar(4000)
SET @.textpos = 1
SET @.resto = ''
WHILE @.textpos <= datalength(@.list) / 2
BEGIN
SET @.tam = 4000 - datalength(@.resto) / 2
SET @.tmpstr = @.resto + substring(@.list, @.textpos, @.tam)
SET @.textpos = @.textpos + @.tam
SET @.pos = charindex(',', @.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(',', @.tmpstr)
END
SET @.resto = @.tmpstr
END
INSERT @.tbl(str, nstr) VALUES (ltrim(rtrim(@.resto)),
ltrim(rtrim(@.resto)))
RETURN
END
David Zhu escreveu:
> Hi,
> I construct a sql statement as a dataset. But when I click Run or Refresh,
> the VS.NET runs so slow and no response sometimes. Do you know why, and how
> to
> deal with this issue?
> below is the sql statement I used for:
> DECLARE
> @.sql NVARCHAR(4000)
> select @.resp=ltrim(rtrim(@.resp)),
> @.country =ltrim(rtrim(@.country )),
> @.entity=ltrim(rtrim(@.entity)),
> @.loc=ltrim(rtrim(@.loc)),
> --@.office=ltrim(rtrim(@.office)),
> @.local_oc=ltrim(rtrim(@.local_oc)),
> @.for_agent=ltrim(rtrim(@.for_agent))
> select @.sql => 'SELECT Country_Application.country_code, Country_Application.type,
> Country_Application.appl_no,
> Action_Due.hpj_resp_atty, Action_Due.pdno, Action_Due.sub_case,
> Action_Due.item, Action_Due.action_due_resp_atty,
> Action_Due.action_type, Action_Due.action_due, Action_Due.indicator,
> Action_Due.due_date,
> Action_Due.remark, Action_Due.resp_admin
> from Country_Application INNER JOIN Action_Due on
> Country_Application.pdno = Action_Due.pdno and Country_Application.sub_case
> = Action_Due.sub_case
> inner join Invention_Data on Action_Due.pdno=Invention_Data.pdno
>
> where upper(Action_Due.done) = ''NO'' and upper(Action_Due.action_type) <>
> ''ANNUITY''' + --hard code
> ' and Action_Due.due_date between '''+ @.DateBegin + ''' and ''' + @.DateEnd +
> ''''
> if @.resp not in ('ALL', '')
> begin
> set @.sql = @.sql + ' and Action_Due.hpj_resp_atty in ('+ @.resp + ')'
> end
> if @.country not in ('ALL', '')
> begin
> if @.country = '<> US'
> begin
> set @.sql = @.sql + ' and Country_Application.country_code <> ''US'''
> end
> else
> begin
> set @.sql = @.sql + ' and Country_Application.country_code in ('+ @.country
> +')'
> end
> end
> if @.entity not in ('ALL', '')
> begin
> set @.sql = @.sql + ' and Invention_Data.entity = '''+@.entity+''' and
> Invention_Data.loc = '''+@.loc+''''
> end
> if @.local_oc <> ''
> begin
> set @.sql = @.sql +' and Action_Due.local_oc = '''+@.local_oc+''''
> end
> if @.for_agent <> ''
> begin
> set @.sql = @.sql +' and Action_Due.for_agent = '''+@.for_agent+''''
> end
> exec sp_executesql @.sql|||David.
You may experience a great performance improvment if you write the
statement as a stored procedure AND avoid using dynamic execution
(sp_executesql).
In fact, you can rewrite your SQL query in a simple statement.
Try to replace code like the following:
if @.resp not in ('ALL', '')
begin
set @.sql = @.sql + ' and Action_Due.hpj_resp_atty in ('+ @.resp + ')'
end
by a condition in the clause WHERE:
WHERE
...
AND (@.resp not in ('ALL', '') or Action_Due.hpj_resp_atty in (select
[str] from fList(@.resp)))
where fList is as UDF that converts a comma-separated list of values to
a table:
ALTER FUNCTION fList(@.list ntext)
RETURNS @.tbl TABLE
( listpos int IDENTITY(1, 1) NOT NULL,
str varchar(4000) COLLATE
SQL_Latin1_General_CP1_CI_AS,
nstr nvarchar(2000) COLLATE
SQL_Latin1_General_CP1_CI_AS
)
AS
BEGIN
if @.list is null return
DECLARE @.pos int, @.textpos int, @.tam smallint, @.tmpstr
nvarchar(4000), @.resto nvarchar(4000), @.tmpval nvarchar(4000)
SET @.textpos = 1
SET @.resto = ''
WHILE @.textpos <= datalength(@.list) / 2
BEGIN
SET @.tam = 4000 - datalength(@.resto) / 2
SET @.tmpstr = @.resto + substring(@.list, @.textpos, @.tam)
SET @.textpos = @.textpos + @.tam
SET @.pos = charindex(',', @.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(',', @.tmpstr)
END
SET @.resto = @.tmpstr
END
INSERT @.tbl(str, nstr) VALUES (ltrim(rtrim(@.resto)),
ltrim(rtrim(@.resto)))
RETURN
END

Reporting Service not installed even they say it was installed

When trying to install Rs on Win2003 server running standard SQL2k SP3a I get into strange situation.
On start of installation I get statement that asp.net and Visual studio are not installed or not running (they are installed and running)
Than it proceedes to install Reporting services, goes through all dialogues, states it is installed
But it is not! I can see RS books, but not the program, also no reporting services are running .
Help
Natalijahi,
i prepared a documentation to install sps,sqlserver and
reporting services in a machine...i'm sending it to
you..just leave with the sharepoint and do the
remaining ..u dont need to change any file name or any
thing . just follow the procedure. better to use sql
server enterprise edition
************
To configure a server running share point portal server,
sql server , analysis services and reporting services
Software Requirements:
1. windows 2003 server enterprise edition.
1.1. Configure application server (enable both front page
extensions and asp.net ) to install IIS.
1.2. Install smtp server
1.3. Configure DNS giving appropriate IP address.
2. SQL Server 2000 Enterprise Edition with Analysis
Services (if reqd) and service packs for both SQL server
and Analysis services.
3. Visual Studio .net Enterprise Architecture
4. Share Point Portal Server
Install share point portal server with out
desktop engine if u r using sql server on the same
machine.
while configuring share point portal server it
will ask to remove front page server extensions at the
time of creating a portal. remove the front page server
extensions and then restart the machine and after that
create a portal site.
5. Reporting services
While installing reporting services it will
check the system and gives a warning message that share
point is also installed in the system and we need to
manually configure reporting services.
leave it and go for the next tab.
Specify a domain/user account where ever asked.
unckeck the ssl certification if u dont have
any and check direct to default
website.
Then continue installing.
After installation
1. go to IIS
right click on reports--> properties--
>configuration -->extensions-->edit
and then uncheck if "Verify that the file exists" is
checked.
and then click OK
close IIS.
2. open E:\Inetpub\wwwroot\webconfig file.
2.1. in <http Modules>
include the third line also.
<add name="Session"
type="System.Web.SessionState.SessionStateModule"/>
and change the below line as follows
pages enableSessionState="true" enableViewState="true"
enableViewStateMac="true" validateRequest="false" />
3. In cmd prompt go to
E:\Program Files\Common Files\Microsoft Shared\web server
extensions\60\BIN
type
stsadm -o addpath -url http://localhost/reportserver -type
exclusion
and
stsadm -o addpath -url http://localhost/reports -type
exclusion
4. in cmd prompt go to
E:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportServer
type
rsactivate -c "rsreportserver.config"
Then restart the machine
ur configuration is complete now.
*********************
>--Original Message--
>When trying to install Rs on Win2003 server running
standard SQL2k SP3a I get into strange situation.
>On start of installation I get statement that asp.net and
Visual studio are not installed or not running (they are
installed and running)
>Than it proceedes to install Reporting services, goes
through all dialogues, states it is installed
>But it is not! I can see RS books, but not the program,
also no reporting services are running .
>Help
>Natalija
>.
>

Reporting service does not support In clause in select statment?

Hi,
I am trying to pass a parameters to the reporting services using "IN" clause in select statement.
If my parameter is 'C','D','F' and i wish to pass it to the IN clause, however it seem like it is taking the parameter as a whole string, and doesn't return me the result where the status IN ('C','D','F')
Anyone got solution for this??

Hi,
I managed to solve it. Found the solution from one of the site.
http://solidqualitylearning.com/Blogs/dejan/archive/2004/10/22/200.aspx
Hope it helps those that have this problem :o)