Showing posts with label existing. Show all posts
Showing posts with label existing. Show all posts

Friday, March 30, 2012

rsInternalError General network error for new report

Running RS2000 on Windows 2003
I published a new report today (copied from an existing report, used same
data source calling different stored procedure, changed parameters, etc.).
It worked fine when run locally.
However, when published and run within Report Manager I get the following
error -
Reporting Services Error
----
An internal error occurred on the report server. See the error log for more
details. (rsInternalError) Get Online Help
General network error. Check your network documentation.
I'm not sure I've seen this error before. I've had errors before but they
usually occurred because I forgot to give adequate permissions to the stored
procedure or something like that.
I've search around but haven't figured out how to troubleshoot this problem.
I have looked at the trace logs but I'm still learning how to read them.
Here is what appear to be the relevant portion found in them -
In ReportServer__08_17_2007_06_42_51.log
w3wp!library!1058!08/17/2007-10:54:06:: i INFO: Call to RenderFirst(
'/Development/Ref Des Term Count' )
w3wp!library!1058!08/17/2007-10:54:07:: e ERROR: Throwing
Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
An internal error occurred on the report server. See the error log for more
details., ;
Info:
Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
An internal error occurred on the report server. See the error log for more
details. --> System.Data.SqlClient.SqlException: A severe error occurred on
the current command. The results, if any, should be discarded.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at
Microsoft.ReportingServices.Library.CancelableSqlCommand.ExecuteNonQuery()
at
Microsoft.ReportingServices.Library.ChunkStorage.WriteNewSnapshotToDB(String
effectiveParams, Int32 paramsHash, DateTime createdDate, String description,
Guid snapshotDataID, Boolean isPermanentSnapshot)
at
Microsoft.ReportingServices.Library.ReportSnapshot.WriteNewSnapshotToDB(String effectiveParams, Int32 paramsHash, DateTime createdDate, String description)
at
Microsoft.ReportingServices.Library.RSService.AllocateNewSnapshot(Boolean
isPermanentSnapshot, String effectiveParams, Int32 paramsHash, DateTime
createdDate, String description)
at
Microsoft.ReportingServices.Library.RSService.RenderAsLive(CatalogItemContext
reportContext, ItemProperties properties, ParameterInfoCollection
effectiveParameters, Guid reportId, ClientRequest session, String
description, ReportSnapshot intermediateSnapshot, DataSourceInfoCollection
thisReportDataSources, Boolean cachingRequested, Warning[]& warnings,
ReportSnapshot& resultSnapshotData, DateTime& executionDateTime,
RuntimeDataSourceInfoCollection& alldataSources, UserProfileState&
usedUserProfile)
at
Microsoft.ReportingServices.Library.RSService.RenderAsLiveOrSnapshot(CatalogItemContext
reportContext, ClientRequest session, Warning[]& warnings,
ParameterInfoCollection& effectiveParameters)
at
Microsoft.ReportingServices.Library.RSService.RenderFirst(CatalogItemContext
reportContext, ClientRequest session, Warning[]& warnings,
ParameterInfoCollection& effectiveParameters, String[]& secondaryStreamNames)
-- End of inner exception stack trace --
w3wp!library!1058!08/17/2007-10:54:07:: i INFO: Initializing
EnableExecutionLogging to 'True' as specified in Server system properties.
w3wp!webserver!1058!08/17/2007-10:54:08:: e ERROR: Reporting Services error
Microsoft.ReportingServices.Diagnostics.Utilities.RSException: An internal
error occurred on the report server. See the error log for more details. -->
Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
An internal error occurred on the report server. See the error log for more
details. --> System.Data.SqlClient.SqlException: A severe error occurred on
the current command. The results, if any, should be discarded.
In ReportServerService__main_08_17_2007_05_10_24.log
<Header>
<Product>Microsoft SQL Server Reporting Services Version
8.00.1038.00</Product>
<Locale>en-US</Locale>
<TimeZone>Central Daylight Time</TimeZone>
<Path>C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\LogFiles\ReportServerService__main_08_17_2007_05_10_24.log</Path>
<SystemName>IW-SQL</SystemName>
<OSName>Microsoft Windows NT 5.2.3790.0</OSName>
<OSVersion>5.2.3790.0</OSVersion>
</Header>
ReportingServicesService!servicecontroller!11dc!8/17/2007-05:10:24:: i INFO:
Recycling the service from default domain
ReportingServicesService!servicecontroller!11dc!8/17/2007-05:10:27:: i INFO:
New app domain started
Other existing reports seem to be working with no problem.
Any help troubleshooting this would be greatly appreciated.
KevinWell I've found a solution. Instead of copying an existing report I just
started from scratch. I built a new one from the ground up and it worked
fine.
Apparently there was something in the report I made from the copy that it
didn't like. I thought I went through it pretty thoroughly to make sure
nothing referred to fields, parameters, etc. that didn't apply but I guess I
missed something.
For future reference I would appreciate any recommendations for catching
problems when copying a report. Maybe copying isn't recommended? It usually
seems to save time (except in this case!).
Kevin|||Rats!!! I thought I had it fixed. My report and stored procedure both have
just one parameter. I just made a simple report (data is listed in a table)
and set a default value for the report parameter and it worked.
Thinking that it was fixed, I removed the default and re-published. Now
when I select a value from the list in the prompt and run the report I get
the error.
So, is the problem something to do with my prompt? Any ideas on
troubleshooting would be appreciated. The prompt is just a simple query from
one table -
SELECT DISTINCT r.item AS PromptValue
,r.item AS PromptLabel
FROM dbname.dbo.tablename r
WHERE r.item <> ''
ORDER BY r.item
The stored procedure queries the same table and is as follows -
CREATE PROCEDURE rpt_Ref_DesTermCount
(
@.StockCode VARCHAR(30) = '%'
)
AS
SELECT r.item
,r.ref_des
,r.TermCount
FROM dbname.dbo.tablename r
WHERE r.item LIKE @.StockCode
ORDER BY r.ref_des
GO
Thanks in advance,
Kevin

Wednesday, March 7, 2012

RS Migration to new server

My team is moving its development to London. A Reporting Services
server has been configured in London, but aside from simply importing
existing RDLs, what is the best way to migrate existing subscriptions,
snapshots, etc. to the new server from the old? Is this simply a copy
of certain tables in the Reporting Services database?
At a 10,000-ft. level, how can this be accomplished? A simple link to a
how-to will suffice, I just had trouble finding one.
Thanks!
MikeDid you ever receive help on this. We're going through the same thing, and I
have two servers to migrate.
--
Thanks,
CGW
"Bassist695" wrote:
> My team is moving its development to London. A Reporting Services
> server has been configured in London, but aside from simply importing
> existing RDLs, what is the best way to migrate existing subscriptions,
> snapshots, etc. to the new server from the old? Is this simply a copy
> of certain tables in the Reporting Services database?
> At a 10,000-ft. level, how can this be accomplished? A simple link to a
> how-to will suffice, I just had trouble finding one.
> Thanks!
> Mike
>|||This link should help if you are moving to the SAME version of reporting
services..
http://support.microsoft.com/default.aspx?scid=kb;en-us;842425
If you are using a different version, then you're in the same boat as I am.
If you get any info on migrating to newer version, please let me know.
Hope this helps
"CGW" wrote:
> Did you ever receive help on this. We're going through the same thing, and I
> have two servers to migrate.
> --
> Thanks,
> CGW
>
> "Bassist695" wrote:
> > My team is moving its development to London. A Reporting Services
> > server has been configured in London, but aside from simply importing
> > existing RDLs, what is the best way to migrate existing subscriptions,
> > snapshots, etc. to the new server from the old? Is this simply a copy
> > of certain tables in the Reporting Services database?
> >
> > At a 10,000-ft. level, how can this be accomplished? A simple link to a
> > how-to will suffice, I just had trouble finding one.
> >
> > Thanks!
> > Mike
> >
> >|||Excellent!
--
Thanks,
CGW
"J Selburg" wrote:
> This link should help if you are moving to the SAME version of reporting
> services..
> http://support.microsoft.com/default.aspx?scid=kb;en-us;842425
> If you are using a different version, then you're in the same boat as I am.
> If you get any info on migrating to newer version, please let me know.
> Hope this helps
> "CGW" wrote:
> > Did you ever receive help on this. We're going through the same thing, and I
> > have two servers to migrate.
> > --
> > Thanks,
> >
> > CGW
> >
> >
> > "Bassist695" wrote:
> >
> > > My team is moving its development to London. A Reporting Services
> > > server has been configured in London, but aside from simply importing
> > > existing RDLs, what is the best way to migrate existing subscriptions,
> > > snapshots, etc. to the new server from the old? Is this simply a copy
> > > of certain tables in the Reporting Services database?
> > >
> > > At a 10,000-ft. level, how can this be accomplished? A simple link to a
> > > how-to will suffice, I just had trouble finding one.
> > >
> > > Thanks!
> > > Mike
> > >
> > >

Saturday, February 25, 2012

rs drops first column in data set

I started having this problem some time ago when trying to build a report using a stored procedure. Existing reports work fine, it is only new reports that result in this error:

The data set ‘WeeklyManagement’ contains a definition for the field ‘BrewNumber’. This field is missing from the returned result set from the data source.

I get this error when I try to preview the report. The missing field is always the first column in the dataset. I have tried everything I can think of, including repeating the column, rewriting the sproc, rewriting the report, everything. I cannot find any reason why this should be happening. Can anyone help? BTW, when I create the dataset and run the sproc, all fields are returned fine. When I examine the xml, all the fields are there, correctly defined.

Help, please! TIA. D. Lewis

Can you publish the sproc? Print statements did this to us in the past.|||

Hmmm. Very interesting. Following is the sproc, which I altered to comment out the 'Print' statements (yes, I did have some in there for debugging purposes). I also as an experiment repeated the first column to see if it would work, and RS began dropping that new column; error message as below:
Build complete -- 0 errors, 0 warnings

The data set ‘WeeklyManagement’ contains a definition for the field ‘B’. This field is missing from the returned result set from the data source.

Preview complete -- 0 errors, 1 warnings
The sproc is a bit messy, and uses a temp table, but for completeness' sake here it is:

use snb01
go

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
Alter PROCEDURE spBrewhouseOverview
AS
Declare @.BeginDate smalldatetime
Declare @.EndDate smalldatetime
Set @.BeginDate = DATEADD(dd,-45,Getdate())--'9/1/05'
set @.EndDate = Getdate()--'9/15/05'

--Print convert(varchar,@.begindate)
--Print convert(varchar,@.enddate)

--spBrewhouseOverview '8/2/05','8/3/05'
--5/20/03
--Have to convert the dates to char then to date again
--to strip out the time portion that crystall passes
--also added one day to the end time to
--allow for the fact that the end day would be midnight
--at the beginning of the ending day, which would otherwise
--effectively eliminate all brews on that day from showing up.
BEGIN
CREATE TABLE [#tblOverview] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[ProBrewID] [int] NULL,
[BrewNumber] [int] NULL ,
[Kettle] [char] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[StartTimeInKettle] [smalldatetime] NULL ,
[StartTimeBoil] [smalldatetime] NULL ,
[EndTimeBoil] [smalldatetime] NULL ,
[Hop1Time] [smalldatetime] NULL ,
[Hop2Time] [smalldatetime] NULL ,
[MossTime] [smalldatetime] NULL ,
[Hop3Time] [smalldatetime] NULL ,
[Hop4Time] [smalldatetime] NULL ,
/*[StartTimeMash] [smalldatetime] NULL ,
[SaccReqTime] [smalldatetime] NULL ,
[SaccTime] [smalldatetime] NULL ,
[MashOutTime] [smalldatetime] NULL ,
[StartTimeInLauter] [smalldatetime] NULL ,
[StartTimeVorlauf] [smalldatetime] NULL ,
[StartTimeLauter] [smalldatetime] NULL ,
[EndTimeLauter] [smalldatetime] NULL ,
[GravityVorlauf] [int] NULL ,
[GravityFirstRunnings] [int] NULL ,
[GravityLastRunnings] [int] NULL ,
[GravityLauter] [int] NULL ,
[HazeFirstRunnings] [int] NULL ,
[HazeLauterVorlauf] [int] NULL ,
[HazeLauterLauter] [int] NULL ,*/
[StartTimeRest] [smalldatetime] NULL ,
[StartTimeWhirlWaterVor] [smalldatetime] NULL,
/*[MashHour] [int] NULL,
[LauterHour] [int] NULL,
[KettleHour] [int] NULL,
[WhirlpoolHour] [int] NULL,
[BrewerMash] [Varchar] (20) NULL,
[BrewerLauter] [Varchar] (20) NULL,*/
[BrewerKettle] [Varchar] (20) NULL,
[BrewerWhirlpool] [Varchar] (20) NULL,
CONSTRAINT [PK_tblOverview] PRIMARY KEY CLUSTERED
(
[ID]
) ON [PRIMARY]
) ON [PRIMARY]
END

SET NOCOUNT ON
INSERT #tblOverview
(Probrewid
, Brewnumber
, Kettle
, StarttimeInKettle
, StartTimeBoil
, EndTimeBoil
, Hop1Time
, Hop2Time
, MossTime
, Hop3Time
, Hop4Time/*
, StartTimeMash
, SaccReqTime
, SaccTime
, MashOutTime
, StartTimeInLauter
, StartTimeVorlauf
, StartTimeLauter
, EndTimeLauter
, GravityVorlauf
, GravityFirstRunnings
, GravityLastRunnings
, GravityLauter
, HazeFirstRunnings
, HazeLauterVorlauf
, HazeLauterLauter*/
, StartTimeRest
, StartTimeWhirlWaterVor)
(
Select a.probrewid
, a.Brewnumber
, a.Kettle
, a.StarttimeInKettle
, a.StartTimeBoil
, a.EndTimeBoil
, a.Hop1Time
, a.Hop2Time
, a.MossTime
, a.Hop3Time
, a.Hop4Time
/*, b.StartTimeMash
, b.SaccReqTime
, b.SaccTime
, b.MashOutTime
, c.StartTimeInLauter
, c.StartTimeVorlauf
, c.StartTimeLauter
, c.EndTimeLauter
, c.GravityVorlauf
, c.GravityFirstRunnings
, c.GravityLastRunnings
, c.GravityLauter
, c.HazeFirstRunnings
, c.HazeLauterVorlauf
, c.HazeLauterLauter*/
, d.StartTimeRest
, d.StartTimeWhirlWaterVor
FROM Proleit.dbo.tblRptKettleAll a
INNER JOIN Proleit.dbo.tblRptMashingAll b on a.Probrewid=b.probrewid
INNER JOIN Proleit.dbo.tblRptLauterAll c on a.Probrewid=c.Probrewid
INNER JOIN Proleit.dbo.tblRptWhirlpoolAll d on a.Probrewid=d.probrewid
WHERE a.StartTimeBoil>=CONVERT(datetime,(CONVERT(varchar,@.BeginDate,112)))
AND a.StartTimeBoil<= DATEADD(day,1,CONVERT(datetime,(CONVERT(varchar,@.EndDate,112))))
)

--Comment out for troubleshooting
--declare a cursor for the table, loop through
--and update each brewer


DECLARE CurC CURSOR FOR SELECT Probrewid,MossTime,StartTimeRest
FROM #tblOverview
DECLARE @.Probrewid int
DECLARE @.TimeMoss datetime
DECLARE @.TimeWhirl datetime
OPEN CurC

FETCH NEXT FROM CurC INTO @.probrewid,@.TimeMoss,@.TimeWhirl
BEGIN
WHILE @.@.FETCH_STATUS=0
BEGIN

--Print convert(varchar,@.probrewid) + ' is probrewid'
--Print convert(varchar,@.TimeMoss) + ' is @.TimeMoss'
--Exec spBrewhouseOverviewSacc @.probrewid,@.timeSacc
--Exec spBrewhouseOverviewVorlauf @.probrewid,@.timeVorlauf
Exec Proleit.dbo.spBrewhouseOverviewKettle @.probrewid,@.timeMoss
Exec Proleit.dbo.spBrewhouseOverviewWhirlpool @.probrewid,@.timeWhirl

FETCH NEXT FROM CurC INTO @.probrewid,@.TimeMoss,@.TimeWhirl
END
END
CLOSE CurC
DEALLOCATE CurC

SET NOCOUNT ON
UPDATE #tblOverview
SET BrewerKettle='None Recorded'
WHERE BrewerKettle is null

UPDATE #tblOverview
SET BrewerWhirlpool='None Recorded'
WHERE BrewerWhirlpool is null


SELECT
a.BrewNumber as B
, a.BrewNumber
, a.Kettle
, Convert(datetime,Convert(varchar,a.StartTimeInKettle,110)) as BrewDate
, DATEDIFF(n,MossTime,Hop3Time) as Minutes
, BrewerKettle as Brewer
, 'Hop3Time' as Type
FROM #tblOverview a
WHERE DATEDIFF(n,MossTime,Hop3Time)<10
OR DATEDIFF(n,MossTime,Hop3Time)>13

UNION ALL

SELECT
a.BrewNumber as B
, a.BrewNumber
, a.Kettle
, Convert(datetime,Convert(varchar,a.StartTimeInKettle,110)) as BrewDate
, DATEDIFF(n,Hop3Time,Hop4Time) as Minutes
, BrewerKettle as Brewer
, 'Hop4Time' as Type
FROM #tblOverview a
WHERE DATEDIFF(n,Hop3Time,Hop4Time)<10
OR DATEDIFF(n,Hop3Time,Hop4Time) > 13

UNION ALL

SELECT
a.BrewNumber as B
, a.BrewNumber
, a.Kettle
, Convert(datetime,Convert(varchar,a.StartTimeInKettle,110)) as BrewDate
, DATEDIFF(n,StartTimeRest,StartTimeWhirlWaterVor) as Minutes
, BrewerWhirlpool
, 'WhirlpoolTime' as Type
FROM #tblOverview a
WHERE DATEDIFF(n,StartTimeRest,StartTimeWhirlWaterVor)>21

Drop Table #tblOverview

GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

|||If you're not working with a whole lot of data, an @.Table variable instead of a temp table may be more efficient and you won't need the drop table statement at the end.
Try adding to your UNION ALL statements with a select statement at the top that sets a default value.... eg. SELECT 0 as B, 0 as BrewNumber, 0 as Kettle, 0 as BrewDate, etc.... to see if it is a problem with the naming of the fields and the first result set not returning a value.
Maybe dump that above dummy SELECT statement in various places within the stored procedure, so that you can find out where it is breaking. (not returning the right result set)
It could have something to do with the 2 execs you have going there... It would be interesting to see the SQL messages pane.|||I will set to work on those suggestions, thanks.

Just to clarify, the result set returned in Query Analyzer is fine, with no errors and no messages. When I refresh the dataset from within visual studio while designing the report, I also get the entire set with no issues. It is only when I try to preview the report that the thing bonks -- i.e., the first column is dropped and VS tells me that it is not defined.

Also, I went back and examined the two 'exec ....' statements, and they are simple update statements, with no 'Print....' or anything else. Very innocuous, actually. I placed them in separate sprocs because they are reused elsewhere and are long.