Showing posts with label object. Show all posts
Showing posts with label object. Show all posts

Monday, March 26, 2012

ReportViewer - Operation is not valid due to the current state of the object

Hi,
I'm getting an InvalidOperationException, message ("Operation is not
valid due to the current state of the object") when setting the
ServerReport.ReportServerUrl (or ServerReport.ReportPath) property of
the VS2005 ReportViewer control after performing a drilldown.
I've reproduced this error in the following scenario:
1) Clean Windows 2003 server with SP1 and latest hot fixes (installed
to defaults except UK English).
2) Clean SQL Server 2005 (RTM) install with SQL Server and Reporting
Services component (all installed to defaults).
3) Clean VS2005 (RTM) web app (default.aspx and default.aspx.cs, see
below) (running on a Windows XP Pro workstation under VS2005
Development Server but same thing on W2003 Web Server).
4) Clean reports (RSTest.rdl and RSTest2.rdl, see below).
The error can be reproduced as follows:
1) Click Button1 (standard asp:button). This sets
ReportViewer1.ServerReport.ReportPath and
ReportViewer1.ServerReport.ReportUrl to RSTest.rdl and correctly
displays the report.
2) Click the drilldown link in the report. This correctly displays
RSTest2.rdl.
3) Repeat step1. This causes the error.
Relevant code snippets are:
default.aspx:
<rsweb:ReportViewer ID="ReportViewer1" runat="server"
ProcessingMode="Remote">
</rsweb:ReportViewer>
<asp:Button ID="Button1" runat="server" Text="Button"
OnClick="Button1_Click" />
default.aspx.cs:
protected void Button1_Click(object sender, EventArgs e)
{
ReportViewer1.ServerReport.ReportServerUrl = new
Uri("http://dstst1/ReportServer");
ReportViewer1.ServerReport.ReportPath = "/RS Test
Project/RSTest";
}
RSTest.rdl:
<Textbox Name="textbox1">
...snip...
<Action>
<Drillthrough>
<ReportName>RSTest2</ReportName>
</Drillthrough>
</Action>
...snip...
</Textbox>
Has anyone got any ideas or is this a bug as I suspect?
Regards,
Ian Addis
Dorset Software Services Limited
Poole, Dorset, ENGLAND
Keywords: SQL Server 2005 Reporting Services ReportViewer drilldown
InvalidOperationException "Operation is not valid due to the current
state of the object" ServerReport.ReportServerUrl
ServerReport.ReportPathI have this exact same problem but have not found an answer. Did you
figure out the problem and if not how did you work around it? I am
using a nearly identical software configuration.
Scott Wylie
i.p.addis@.dunelm.org.uk wrote:
> Hi,
> I'm getting an InvalidOperationException, message ("Operation is not
> valid due to the current state of the object") when setting the
> ServerReport.ReportServerUrl (or ServerReport.ReportPath) property of
> the VS2005 ReportViewer control after performing a drilldown.
> I've reproduced this error in the following scenario:
> 1) Clean Windows 2003 server with SP1 and latest hot fixes (installed
> to defaults except UK English).
> 2) Clean SQL Server 2005 (RTM) install with SQL Server and Reporting
> Services component (all installed to defaults).
> 3) Clean VS2005 (RTM) web app (default.aspx and default.aspx.cs, see
> below) (running on a Windows XP Pro workstation under VS2005
> Development Server but same thing on W2003 Web Server).
> 4) Clean reports (RSTest.rdl and RSTest2.rdl, see below).
>
> The error can be reproduced as follows:
> 1) Click Button1 (standard asp:button). This sets
> ReportViewer1.ServerReport.ReportPath and
> ReportViewer1.ServerReport.ReportUrl to RSTest.rdl and correctly
> displays the report.
> 2) Click the drilldown link in the report. This correctly displays
> RSTest2.rdl.
> 3) Repeat step1. This causes the error.
> Relevant code snippets are:
> default.aspx:
> <rsweb:ReportViewer ID="ReportViewer1" runat="server"
> ProcessingMode="Remote">
> </rsweb:ReportViewer>
> <asp:Button ID="Button1" runat="server" Text="Button"
> OnClick="Button1_Click" />
>
> default.aspx.cs:
> protected void Button1_Click(object sender, EventArgs e)
> {
> ReportViewer1.ServerReport.ReportServerUrl = new
> Uri("http://dstst1/ReportServer");
> ReportViewer1.ServerReport.ReportPath = "/RS Test
> Project/RSTest";
> }
>
> RSTest.rdl:
> <Textbox Name="textbox1">
> ...snip...
> <Action>
> <Drillthrough>
> <ReportName>RSTest2</ReportName>
> </Drillthrough>
> </Action>
> ...snip...
> </Textbox>
> Has anyone got any ideas or is this a bug as I suspect?
> Regards,
> Ian Addis
> Dorset Software Services Limited
> Poole, Dorset, ENGLAND
> Keywords: SQL Server 2005 Reporting Services ReportViewer drilldown
> InvalidOperationException "Operation is not valid due to the current
> state of the object" ServerReport.ReportServerUrl
> ServerReport.ReportPath|||strw2001@.gmail.com wrote:
> I have this exact same problem but have not found an answer. Did you
> figure out the problem and if not how did you work around it? I am
> using a nearly identical software configuration.
> Scott Wylie
Nope, no solution as unfortunately the company I'm working with is
currently re-negotiating their support agreement with Microsoft. I'm
fairly sure it's a bug though, I was hoping someone from MS would be on
here to comment considering it's easily reproducible.
Ian A.

Wednesday, March 21, 2012

ReportServer - http://localhost/ReportServer - Error

An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help

Object reference not set to an instance of an object.

And my ReportServer log:

<Header>

<Product>Microsoft SQL Server Reporting Services Version 9.00.1399.00</Product>

<Locale>en-US</Locale>

<TimeZone>Pacific Standard Time</TimeZone>

<Path>C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles\ReportServer__03_24_2006_16_45_06.log</Path>

<SystemName>USPROFILING</SystemName>

<OSName>Microsoft Windows NT 5.2.3790 Service Pack 1</OSName>

<OSVersion>5.2.3790.65536</OSVersion>

</Header>

w3wp!webserver!1!3/24/2006-16:45:06:: i INFO: Reporting Web Server started

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing ConnectionType to '1'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing IsSchedulingService to 'True'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing IsNotificationService to 'True'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing IsEventService to 'True'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing PollingInterval to '10' second(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing WindowsServiceUseFileShareStorage to 'False'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing MemoryLimit to '60' percent as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing RecycleTime to '720' minute(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing MaximumMemoryLimit to '80' percent as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing MaxAppDomainUnloadTime to '30' minute(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing MaxQueueThreads to '0' thread(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing IsWebServiceEnabled to 'True'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing MaxActiveReqForOneUser to '20' requests(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing MaxScheduleWait to '5' second(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing DatabaseQueryTimeout to '120' second(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing ProcessRecycleOptions to '0'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing RunningRequestsScavengerCycle to '60' second(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing RunningRequestsDbCycle to '60' second(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing RunningRequestsAge to '30' second(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing CleanupCycleMinutes to '10' minute(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing DailyCleanupMinuteOfDay to default value of '120' minutes since midnight because it was not specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing WatsonFlags to '1064'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing WatsonDumpOnExceptions to 'Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException,Microsoft.ReportingServices.Modeling.InternalModelingException'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing WatsonDumpExcludeIfContainsExceptions to 'System.Data.SqlClient.SqlException,System.Threading.ThreadAbortException'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing SecureConnectionLevel to '0'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing DisplayErrorLink to 'True'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing WebServiceUseFileShareStorage to 'False'as specified in Configuration file.

w3wp!resourceutilities!1!3/24/2006-16:45:06:: i INFO: Reporting Services starting SKU: Enterprise

w3wp!resourceutilities!1!3/24/2006-16:45:06:: i INFO: Evaluation copy: 0 days left

w3wp!runningjobs!1!3/24/2006-16:45:06:: i INFO: Database Cleanup (Web Service) timer enabled: Next Event: 600 seconds.Cycle: 600 seconds

w3wp!runningjobs!1!3/24/2006-16:45:06:: i INFO: Running Requests Scavenger timer enabled: Next Event: 60 seconds.Cycle: 60 seconds

w3wp!runningjobs!1!3/24/2006-16:45:06:: i INFO: Running Requests DB timer enabled: Next Event: 60 seconds.Cycle: 60 seconds

w3wp!runningjobs!1!3/24/2006-16:45:06:: i INFO: Memory stats update timer enabled: Next Event: 60 seconds.Cycle: 60 seconds

w3wp!library!1!03/24/2006-16:45:06:: 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.NullReferenceException: Object reference not set to an instance of an object.

at Microsoft.ReportingServices.Diagnostics.WebConfigUtil.GetWebConfigAuthenticationAttribute(String attrName)

at Microsoft.ReportingServices.Diagnostics.WebConfigUtil.GetAuthenticationType()

at Microsoft.ReportingServices.Diagnostics.WebConfigUtil.get_UsingWindowsAuth()

at Microsoft.ReportingServices.WebServer.Global.EnableAntiDos()

at Microsoft.ReportingServices.WebServer.Global.ShouldRejectAntiDos()

at Microsoft.ReportingServices.WebServer.Global.Application_AuthenticateRequest(Object sender, EventArgs e)

End of inner exception stack trace

w3wp!library!1!03/24/2006-16:45:09:: i INFO: Exception dumped to: C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles flags= ReferencedMemory, AllThreads, SendToWatson

w3wp!library!1!03/24/2006-16:45:11:: i INFO: Catalog SQL Server Edition = Enterprise

w3wp!library!1!03/24/2006-16:45:11:: 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.NullReferenceException: Object reference not set to an instance of an object.

at Microsoft.ReportingServices.Diagnostics.WebConfigUtil.GetWebConfigAuthenticationAttribute(String attrName)

at Microsoft.ReportingServices.Diagnostics.WebConfigUtil.GetAuthenticationType()

at Microsoft.ReportingServices.Diagnostics.WebConfigUtil.get_UsingWindowsAuth()

at Microsoft.ReportingServices.WebServer.Global.EnableAntiDos()

at Microsoft.ReportingServices.WebServer.Global.Application_EndRequest(Object sender, EventArgs e)

End of inner exception stack trace

w3wp!library!1!03/24/2006-16:45:14:: i INFO: Exception dumped to: C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles flags= ReferencedMemory, AllThreads, SendToWatson

Any help would be appreciated:

System 2003 Server IIS6 and Sql2005 enterprise all housed on Virtual Server. all housed locally.

Check whether your ReportServer\web.config file has an XML namespace in it. SRS doesn't expect one to be present, but some tools from VS2005 web projects will add one in some cases.

If there is a namespace present, you can safely remove it.

Hope that helps,

Tudor

|||

Thanks here is my webconfig file:

<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<configSections>
<section name="RStrace" type="Microsoft.ReportingServices.Diagnostics.RSTraceSectionHandler,Microsoft.ReportingServices.Diagnostics" />
</configSections>
<system.diagnostics>
<switches>
<!-- 1 = error, 2 = warning, 3 = info, 4 = verbose -->
<add name="DefaultTraceSwitch" value="3" />
</switches>
<assert assertuienabled="false" />
</system.diagnostics>
<RStrace>
<add name="FileName" value="ReportServer_" />
<add name="FileSizeLimitMb" value="32" />
<add name="KeepFilesForDays" value="14" />
<add name="Prefix" value="tid, time" />
<add name="TraceListeners" value="debugwindow, file" />
<add name="TraceFileMode" value="unique" />
<add name="Components" value="all,RunningJobs:3,SemanticQueryEngine:2,SemanticModelGenerator:2" />
</RStrace>
<system.web>
<customErrors mode="On" defaultRedirect="http://usprofiling/ReportCustomErrorPage.htm" />
<pages validateRequest="false" />
<authentication mode="Windows" />
<identity userName="" password="" impersonate="true" />
<compilation defaultLanguage="c#" debug="false">
<assemblies>
<clear />
<add assembly="ReportingServicesWebServer" />
</assemblies>
</compilation>
<trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
<sessionState mode="Off" />
<httpHandlers>
<add verb="*" path="Reserved.ReportServer" type="Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler, ReportingServicesWebServer" />
<add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, ReportingServicesWebServer, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</httpHandlers>
<httpModules></httpModules>
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
<httpRuntime executionTimeout="9000" />
<securityPolicy>
<trustLevel name="RosettaSrv" policyFile="rssrvpolicy.config" />
</securityPolicy>
<trust level="RosettaSrv" originUrl="" />


</system.web>
<runtime>
<legacyImpersonationPolicy enabled="true"/>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.ReportingServices.Interfaces"
publicKeyToken="89845dcd8080cc91"
culture="neutral" />
<bindingRedirect oldVersion="8.0.242.0"
newVersion="9.0.242.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

Ant this has been working for the past month suddenly stopped. I removed the xmlns per request and it works now, so when using vs2005 it adds this tag?

|||

Hi,

I have the same problem and deleted the xmlns in the web.config:

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

But then another error happens: rsServerConfigurationError. The log indicates the following:

aspnet_wp!library!1!12/07/2006-10:06:39:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: An internal error occurred on the report server. See the error log for more details., Could not load Authorization extension;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: An internal error occurred on the report server. See the error log for more details.
aspnet_wp!library!6!07/12/2006-10:07:40:: i INFO: Catalog SQL Server Edition = Developer
aspnet_wp!library!1!12/07/2006-10:08:47:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: An internal error occurred on the report server. See the error log for more details., Could not load Authorization extension;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: An internal error occurred on the report server. See the error log for more details.

Any idea? Help will be much appreciated, thanks a lot! :)

|||

Look in the ReportManager\web.config and ReportServer\web.config files, you should have the authentication mode set to "Windows".

<system.web>

<pages validateRequest="false" />

<authentication mode="Windows" />

<identity impersonate="true" />

This should be enough to solve your problem.

Greets.

|||Thanks, that was the solution for me!|||

.. so close to resolving my problem - but I'm still getting error 'Object reference not set to an instance of an object'.

I have checked out all of the above - but my Reporting Manager is still not my friend - anymore. Something must have happened ...

Subscribtions from Reporting Manager are still working, when I'm sending file (pdf e.g.)

Web.config is on both RepMan and RepServ =

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>

--

<system.web>
<pages validateRequest="false" />
<authentication mode="Windows" />
<identity impersonate="true" />
<compilation defaultLanguage="c#" debug="false">
<assemblies>
<clear />

SQL server 2005 is installed on MS server 2003 Stand ed., SP1

Is there any good souls who can help me find a solution to this problem?

ReportServer - http://localhost/ReportServer - Error

An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help

Object reference not set to an instance of an object.

And my ReportServer log:

<Header>

<Product>Microsoft SQL Server Reporting Services Version 9.00.1399.00</Product>

<Locale>en-US</Locale>

<TimeZone>Pacific Standard Time</TimeZone>

<Path>C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles\ReportServer__03_24_2006_16_45_06.log</Path>

<SystemName>USPROFILING</SystemName>

<OSName>Microsoft Windows NT 5.2.3790 Service Pack 1</OSName>

<OSVersion>5.2.3790.65536</OSVersion>

</Header>

w3wp!webserver!1!3/24/2006-16:45:06:: i INFO: Reporting Web Server started

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing ConnectionType to '1'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing IsSchedulingService to 'True'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing IsNotificationService to 'True'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing IsEventService to 'True'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing PollingInterval to '10' second(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing WindowsServiceUseFileShareStorage to 'False'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing MemoryLimit to '60' percent as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing RecycleTime to '720' minute(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing MaximumMemoryLimit to '80' percent as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing MaxAppDomainUnloadTime to '30' minute(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing MaxQueueThreads to '0' thread(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing IsWebServiceEnabled to 'True'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing MaxActiveReqForOneUser to '20' requests(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing MaxScheduleWait to '5' second(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing DatabaseQueryTimeout to '120' second(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing ProcessRecycleOptions to '0'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing RunningRequestsScavengerCycle to '60' second(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing RunningRequestsDbCycle to '60' second(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing RunningRequestsAge to '30' second(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing CleanupCycleMinutes to '10' minute(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing DailyCleanupMinuteOfDay to default value of '120' minutes since midnight because it was not specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing WatsonFlags to '1064'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing WatsonDumpOnExceptions to 'Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException,Microsoft.ReportingServices.Modeling.InternalModelingException'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing WatsonDumpExcludeIfContainsExceptions to 'System.Data.SqlClient.SqlException,System.Threading.ThreadAbortException'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing SecureConnectionLevel to '0'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing DisplayErrorLink to 'True'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing WebServiceUseFileShareStorage to 'False'as specified in Configuration file.

w3wp!resourceutilities!1!3/24/2006-16:45:06:: i INFO: Reporting Services starting SKU: Enterprise

w3wp!resourceutilities!1!3/24/2006-16:45:06:: i INFO: Evaluation copy: 0 days left

w3wp!runningjobs!1!3/24/2006-16:45:06:: i INFO: Database Cleanup (Web Service) timer enabled: Next Event: 600 seconds.Cycle: 600 seconds

w3wp!runningjobs!1!3/24/2006-16:45:06:: i INFO: Running Requests Scavenger timer enabled: Next Event: 60 seconds.Cycle: 60 seconds

w3wp!runningjobs!1!3/24/2006-16:45:06:: i INFO: Running Requests DB timer enabled: Next Event: 60 seconds.Cycle: 60 seconds

w3wp!runningjobs!1!3/24/2006-16:45:06:: i INFO: Memory stats update timer enabled: Next Event: 60 seconds.Cycle: 60 seconds

w3wp!library!1!03/24/2006-16:45:06:: 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.NullReferenceException: Object reference not set to an instance of an object.

at Microsoft.ReportingServices.Diagnostics.WebConfigUtil.GetWebConfigAuthenticationAttribute(String attrName)

at Microsoft.ReportingServices.Diagnostics.WebConfigUtil.GetAuthenticationType()

at Microsoft.ReportingServices.Diagnostics.WebConfigUtil.get_UsingWindowsAuth()

at Microsoft.ReportingServices.WebServer.Global.EnableAntiDos()

at Microsoft.ReportingServices.WebServer.Global.ShouldRejectAntiDos()

at Microsoft.ReportingServices.WebServer.Global.Application_AuthenticateRequest(Object sender, EventArgs e)

End of inner exception stack trace

w3wp!library!1!03/24/2006-16:45:09:: i INFO: Exception dumped to: C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles flags= ReferencedMemory, AllThreads, SendToWatson

w3wp!library!1!03/24/2006-16:45:11:: i INFO: Catalog SQL Server Edition = Enterprise

w3wp!library!1!03/24/2006-16:45:11:: 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.NullReferenceException: Object reference not set to an instance of an object.

at Microsoft.ReportingServices.Diagnostics.WebConfigUtil.GetWebConfigAuthenticationAttribute(String attrName)

at Microsoft.ReportingServices.Diagnostics.WebConfigUtil.GetAuthenticationType()

at Microsoft.ReportingServices.Diagnostics.WebConfigUtil.get_UsingWindowsAuth()

at Microsoft.ReportingServices.WebServer.Global.EnableAntiDos()

at Microsoft.ReportingServices.WebServer.Global.Application_EndRequest(Object sender, EventArgs e)

End of inner exception stack trace

w3wp!library!1!03/24/2006-16:45:14:: i INFO: Exception dumped to: C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles flags= ReferencedMemory, AllThreads, SendToWatson

Any help would be appreciated:

System 2003 Server IIS6 and Sql2005 enterprise all housed on Virtual Server. all housed locally.

Check whether your ReportServer\web.config file has an XML namespace in it. SRS doesn't expect one to be present, but some tools from VS2005 web projects will add one in some cases.

If there is a namespace present, you can safely remove it.

Hope that helps,

Tudor

|||

Thanks here is my webconfig file:

<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<configSections>
<section name="RStrace" type="Microsoft.ReportingServices.Diagnostics.RSTraceSectionHandler,Microsoft.ReportingServices.Diagnostics" />
</configSections>
<system.diagnostics>
<switches>
<!-- 1 = error, 2 = warning, 3 = info, 4 = verbose -->
<add name="DefaultTraceSwitch" value="3" />
</switches>
<assert assertuienabled="false" />
</system.diagnostics>
<RStrace>
<add name="FileName" value="ReportServer_" />
<add name="FileSizeLimitMb" value="32" />
<add name="KeepFilesForDays" value="14" />
<add name="Prefix" value="tid, time" />
<add name="TraceListeners" value="debugwindow, file" />
<add name="TraceFileMode" value="unique" />
<add name="Components" value="all,RunningJobs:3,SemanticQueryEngine:2,SemanticModelGenerator:2" />
</RStrace>
<system.web>
<customErrors mode="On" defaultRedirect="http://usprofiling/ReportCustomErrorPage.htm" />
<pages validateRequest="false" />
<authentication mode="Windows" />
<identity userName="" password="" impersonate="true" />
<compilation defaultLanguage="c#" debug="false">
<assemblies>
<clear />
<add assembly="ReportingServicesWebServer" />
</assemblies>
</compilation>
<trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
<sessionState mode="Off" />
<httpHandlers>
<add verb="*" path="Reserved.ReportServer" type="Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler, ReportingServicesWebServer" />
<add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, ReportingServicesWebServer, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</httpHandlers>
<httpModules></httpModules>
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
<httpRuntime executionTimeout="9000" />
<securityPolicy>
<trustLevel name="RosettaSrv" policyFile="rssrvpolicy.config" />
</securityPolicy>
<trust level="RosettaSrv" originUrl="" />


</system.web>
<runtime>
<legacyImpersonationPolicy enabled="true"/>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.ReportingServices.Interfaces"
publicKeyToken="89845dcd8080cc91"
culture="neutral" />
<bindingRedirect oldVersion="8.0.242.0"
newVersion="9.0.242.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

Ant this has been working for the past month suddenly stopped. I removed the xmlns per request and it works now, so when using vs2005 it adds this tag?

|||

Hi,

I have the same problem and deleted the xmlns in the web.config:

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

But then another error happens: rsServerConfigurationError. The log indicates the following:

aspnet_wp!library!1!12/07/2006-10:06:39:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: An internal error occurred on the report server. See the error log for more details., Could not load Authorization extension;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: An internal error occurred on the report server. See the error log for more details.
aspnet_wp!library!6!07/12/2006-10:07:40:: i INFO: Catalog SQL Server Edition = Developer
aspnet_wp!library!1!12/07/2006-10:08:47:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: An internal error occurred on the report server. See the error log for more details., Could not load Authorization extension;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: An internal error occurred on the report server. See the error log for more details.

Any idea? Help will be much appreciated, thanks a lot! :)

|||

Look in the ReportManager\web.config and ReportServer\web.config files, you should have the authentication mode set to "Windows".

<system.web>

<pages validateRequest="false" />

<authentication mode="Windows" />

<identity impersonate="true" />

This should be enough to solve your problem.

Greets.

|||Thanks, that was the solution for me!|||

.. so close to resolving my problem - but I'm still getting error 'Object reference not set to an instance of an object'.

I have checked out all of the above - but my Reporting Manager is still not my friend - anymore. Something must have happened ...

Subscribtions from Reporting Manager are still working, when I'm sending file (pdf e.g.)

Web.config is on both RepMan and RepServ =

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>

--

<system.web>
<pages validateRequest="false" />
<authentication mode="Windows" />
<identity impersonate="true" />
<compilation defaultLanguage="c#" debug="false">
<assemblies>
<clear />

SQL server 2005 is installed on MS server 2003 Stand ed., SP1

Is there any good souls who can help me find a solution to this problem?

ReportServer - http://localhost/ReportServer - Error

An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help Object reference not set to an instance of an object.

And my ReportServer log:

<Header>

<Product>Microsoft SQL Server Reporting Services Version 9.00.1399.00</Product>

<Locale>en-US</Locale>

<TimeZone>Pacific Standard Time</TimeZone>

<Path>C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles\ReportServer__03_24_2006_16_45_06.log</Path>

<SystemName>USPROFILING</SystemName>

<OSName>Microsoft Windows NT 5.2.3790 Service Pack 1</OSName>

<OSVersion>5.2.3790.65536</OSVersion>

</Header>

w3wp!webserver!1!3/24/2006-16:45:06:: i INFO: Reporting Web Server started

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing ConnectionType to '1'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing IsSchedulingService to 'True'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing IsNotificationService to 'True'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing IsEventService to 'True'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing PollingInterval to '10' second(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing WindowsServiceUseFileShareStorage to 'False'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing MemoryLimit to '60' percent as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing RecycleTime to '720' minute(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing MaximumMemoryLimit to '80' percent as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing MaxAppDomainUnloadTime to '30' minute(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing MaxQueueThreads to '0' thread(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing IsWebServiceEnabled to 'True'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing MaxActiveReqForOneUser to '20' requests(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing MaxScheduleWait to '5' second(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing DatabaseQueryTimeout to '120' second(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing ProcessRecycleOptions to '0'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing RunningRequestsScavengerCycle to '60' second(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing RunningRequestsDbCycle to '60' second(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing RunningRequestsAge to '30' second(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing CleanupCycleMinutes to '10' minute(s) as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing DailyCleanupMinuteOfDay to default value of '120' minutes since midnight because it was not specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing WatsonFlags to '1064'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing WatsonDumpOnExceptions to 'Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException,Microsoft.ReportingServices.Modeling.InternalModelingException'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing WatsonDumpExcludeIfContainsExceptions to 'System.Data.SqlClient.SqlException,System.Threading.ThreadAbortException'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing SecureConnectionLevel to '0'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing DisplayErrorLink to 'True'as specified in Configuration file.

w3wp!library!1!3/24/2006-16:45:06:: i INFO: Initializing WebServiceUseFileShareStorage to 'False'as specified in Configuration file.

w3wp!resourceutilities!1!3/24/2006-16:45:06:: i INFO: Reporting Services starting SKU: Enterprise

w3wp!resourceutilities!1!3/24/2006-16:45:06:: i INFO: Evaluation copy: 0 days left

w3wp!runningjobs!1!3/24/2006-16:45:06:: i INFO: Database Cleanup (Web Service) timer enabled: Next Event: 600 seconds.Cycle: 600 seconds

w3wp!runningjobs!1!3/24/2006-16:45:06:: i INFO: Running Requests Scavenger timer enabled: Next Event: 60 seconds.Cycle: 60 seconds

w3wp!runningjobs!1!3/24/2006-16:45:06:: i INFO: Running Requests DB timer enabled: Next Event: 60 seconds.Cycle: 60 seconds

w3wp!runningjobs!1!3/24/2006-16:45:06:: i INFO: Memory stats update timer enabled: Next Event: 60 seconds.Cycle: 60 seconds

w3wp!library!1!03/24/2006-16:45:06:: 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.NullReferenceException: Object reference not set to an instance of an object.

at Microsoft.ReportingServices.Diagnostics.WebConfigUtil.GetWebConfigAuthenticationAttribute(String attrName)

at Microsoft.ReportingServices.Diagnostics.WebConfigUtil.GetAuthenticationType()

at Microsoft.ReportingServices.Diagnostics.WebConfigUtil.get_UsingWindowsAuth()

at Microsoft.ReportingServices.WebServer.Global.EnableAntiDos()

at Microsoft.ReportingServices.WebServer.Global.ShouldRejectAntiDos()

at Microsoft.ReportingServices.WebServer.Global.Application_AuthenticateRequest(Object sender, EventArgs e)

End of inner exception stack trace

w3wp!library!1!03/24/2006-16:45:09:: i INFO: Exception dumped to: C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles flags= ReferencedMemory, AllThreads, SendToWatson

w3wp!library!1!03/24/2006-16:45:11:: i INFO: Catalog SQL Server Edition = Enterprise

w3wp!library!1!03/24/2006-16:45:11:: 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.NullReferenceException: Object reference not set to an instance of an object.

at Microsoft.ReportingServices.Diagnostics.WebConfigUtil.GetWebConfigAuthenticationAttribute(String attrName)

at Microsoft.ReportingServices.Diagnostics.WebConfigUtil.GetAuthenticationType()

at Microsoft.ReportingServices.Diagnostics.WebConfigUtil.get_UsingWindowsAuth()

at Microsoft.ReportingServices.WebServer.Global.EnableAntiDos()

at Microsoft.ReportingServices.WebServer.Global.Application_EndRequest(Object sender, EventArgs e)

End of inner exception stack trace

w3wp!library!1!03/24/2006-16:45:14:: i INFO: Exception dumped to: C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles flags= ReferencedMemory, AllThreads, SendToWatson

Any help would be appreciated:

System 2003 Server IIS6 and Sql2005 enterprise all housed on Virtual Server. all housed locally.

Check whether your ReportServer\web.config file has an XML namespace in it. SRS doesn't expect one to be present, but some tools from VS2005 web projects will add one in some cases.

If there is a namespace present, you can safely remove it.

Hope that helps,

Tudor

|||

Thanks here is my webconfig file:

<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<configSections>
<section name="RStrace" type="Microsoft.ReportingServices.Diagnostics.RSTraceSectionHandler,Microsoft.ReportingServices.Diagnostics" />
</configSections>
<system.diagnostics>
<switches>
<!-- 1 = error, 2 = warning, 3 = info, 4 = verbose -->
<add name="DefaultTraceSwitch" value="3" />
</switches>
<assert assertuienabled="false" />
</system.diagnostics>
<RStrace>
<add name="FileName" value="ReportServer_" />
<add name="FileSizeLimitMb" value="32" />
<add name="KeepFilesForDays" value="14" />
<add name="Prefix" value="tid, time" />
<add name="TraceListeners" value="debugwindow, file" />
<add name="TraceFileMode" value="unique" />
<add name="Components" value="all,RunningJobs:3,SemanticQueryEngine:2,SemanticModelGenerator:2" />
</RStrace>
<system.web>
<customErrors mode="On" defaultRedirect="http://usprofiling/ReportCustomErrorPage.htm" />
<pages validateRequest="false" />
<authentication mode="Windows" />
<identity userName="" password="" impersonate="true" />
<compilation defaultLanguage="c#" debug="false">
<assemblies>
<clear />
<add assembly="ReportingServicesWebServer" />
</assemblies>
</compilation>
<trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
<sessionState mode="Off" />
<httpHandlers>
<add verb="*" path="Reserved.ReportServer" type="Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler, ReportingServicesWebServer" />
<add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, ReportingServicesWebServer, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</httpHandlers>
<httpModules></httpModules>
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
<httpRuntime executionTimeout="9000" />
<securityPolicy>
<trustLevel name="RosettaSrv" policyFile="rssrvpolicy.config" />
</securityPolicy>
<trust level="RosettaSrv" originUrl="" />


</system.web>
<runtime>
<legacyImpersonationPolicy enabled="true"/>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.ReportingServices.Interfaces"
publicKeyToken="89845dcd8080cc91"
culture="neutral" />
<bindingRedirect oldVersion="8.0.242.0"
newVersion="9.0.242.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

Ant this has been working for the past month suddenly stopped. I removed the xmlns per request and it works now, so when using vs2005 it adds this tag?

|||

Hi,

I have the same problem and deleted the xmlns in the web.config:

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

But then another error happens: rsServerConfigurationError. The log indicates the following:

aspnet_wp!library!1!12/07/2006-10:06:39:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: An internal error occurred on the report server. See the error log for more details., Could not load Authorization extension;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: An internal error occurred on the report server. See the error log for more details.
aspnet_wp!library!6!07/12/2006-10:07:40:: i INFO: Catalog SQL Server Edition = Developer
aspnet_wp!library!1!12/07/2006-10:08:47:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: An internal error occurred on the report server. See the error log for more details., Could not load Authorization extension;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: An internal error occurred on the report server. See the error log for more details.

Any idea? Help will be much appreciated, thanks a lot! :)

|||

Look in the ReportManager\web.config and ReportServer\web.config files, you should have the authentication mode set to "Windows".

<system.web>

<pages validateRequest="false" />

<authentication mode="Windows" />

<identity impersonate="true" />

This should be enough to solve your problem.

Greets.

|||Thanks, that was the solution for me!|||

.. so close to resolving my problem - but I'm still getting error 'Object reference not set to an instance of an object'.

I have checked out all of the above - but my Reporting Manager is still not my friend - anymore. Something must have happened ...

Subscribtions from Reporting Manager are still working, when I'm sending file (pdf e.g.)

Web.config is on both RepMan and RepServ =

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>

--

<system.web>
<pages validateRequest="false" />
<authentication mode="Windows" />
<identity impersonate="true" />
<compilation defaultLanguage="c#" debug="false">
<assemblies>
<clear />

SQL server 2005 is installed on MS server 2003 Stand ed., SP1

Is there any good souls who can help me find a solution to this problem?

Monday, March 12, 2012

reports icon missing from management studio

Can someone explain me why my reports icon is missing from the object explorer details view within SQL Server 2005 Management Studio?

Thanks

which edition/service pack of sql server 2005 is this? . Have u applied SP2 , if not earlier to sp2 , if i remember correctly... you had to install reporting services to get the Reports. This problem has been sorted out in SP2.

Madhu

|||I have SP2 installed and SSRS running. I was able to use the report icon but I think it disappeared when installing SP2|||

post back the result of Select @.@.Version

Madhu

|||

The functionality is moved after you apply SP 2. Right click on a node in the object explorer window and select Reports, then select Standard and the list of reports is there.

-Sue

Friday, March 9, 2012

ReportObjectModel.Fields as DataRow?

I have a function in C# that performs some complex calculations given a
DataRow object. I would like to somehow pass in my Fields structure as a
parameter to this function. But, I get a compile error saying cannot convert
Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.Fields to
System.Data.DataRow. So, I changed the parameter from DataRow to Object[].
That does not work either. Finally, I changed the reqd parameter from
Object[] to Object, just to see the contents of the Fields structure. Now,
this compiles but the contents of the structure are really weird! I see
properties named a, b,c,d, e, etc! Is there something I am doing wrong? or
are these the ACTUAL property names' Also, i tried searching all over for
documentation on ReportObjectModel.Fields class but could not find anything.
Any comments/pointers to helpful material would be appreciated.You have to pass-in the field values as arguments to your function. You
cannot just pass-along the entire Fields object (which is an internal
object). The property names you are seeing (through reflection) are
obfuscated internal properties. Only the Field class (but not the Fields
collection) has public properties.
Please check this article for an example how to pass-in values to custom
code:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/ERSCstCode.asp?frame=true
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Aparna" <Aparna@.discussions.microsoft.com> wrote in message
news:F3CFC82D-56B5-4449-A2E1-175444E2C508@.microsoft.com...
>I have a function in C# that performs some complex calculations given a
> DataRow object. I would like to somehow pass in my Fields structure as a
> parameter to this function. But, I get a compile error saying cannot
> convert
> Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.Fields to
> System.Data.DataRow. So, I changed the parameter from DataRow to Object[].
> That does not work either. Finally, I changed the reqd parameter from
> Object[] to Object, just to see the contents of the Fields structure. Now,
> this compiles but the contents of the structure are really weird! I see
> properties named a, b,c,d, e, etc! Is there something I am doing wrong? or
> are these the ACTUAL property names' Also, i tried searching all over for
> documentation on ReportObjectModel.Fields class but could not find
> anything.
> Any comments/pointers to helpful material would be appreciated.|||Hi Robert,
I guess what I was trying to achieve was someway of passing the entire
collection of my fields as an array(object[]), so that my custom assembly
code could then map that collection to a datarow. I am aware that I can pass
in the individual field values as parameters, but in that case, what would
happen if I had about 10 field values or 15 or 20..It seems it would be very
inconvenient to pass in that many arguments to a function. I know I could
write en embedded VB function that takes the Fields object as a parameter and
creates an array from it, and pass that array to my custom assembly, but then
I am going to have to rewrite this translation function in every report. Is
there a better way of doing this?
Anyway, thanks for the info about the Fields collection. I have read Teo's
article before but thanks anyway...
Aparna.
"Robert Bruckner [MSFT]" wrote:
> You have to pass-in the field values as arguments to your function. You
> cannot just pass-along the entire Fields object (which is an internal
> object). The property names you are seeing (through reflection) are
> obfuscated internal properties. Only the Field class (but not the Fields
> collection) has public properties.
> Please check this article for an example how to pass-in values to custom
> code:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/ERSCstCode.asp?frame=true
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Aparna" <Aparna@.discussions.microsoft.com> wrote in message
> news:F3CFC82D-56B5-4449-A2E1-175444E2C508@.microsoft.com...
> >I have a function in C# that performs some complex calculations given a
> > DataRow object. I would like to somehow pass in my Fields structure as a
> > parameter to this function. But, I get a compile error saying cannot
> > convert
> > Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.Fields to
> > System.Data.DataRow. So, I changed the parameter from DataRow to Object[].
> > That does not work either. Finally, I changed the reqd parameter from
> > Object[] to Object, just to see the contents of the Fields structure. Now,
> > this compiles but the contents of the structure are really weird! I see
> > properties named a, b,c,d, e, etc! Is there something I am doing wrong? or
> > are these the ACTUAL property names' Also, i tried searching all over for
> > documentation on ReportObjectModel.Fields class but could not find
> > anything.
> > Any comments/pointers to helpful material would be appreciated.
>
>|||At this point there is no better way of doing this. But even if we would
expose the field values as object array, I don't think it is feasible to
write a generic custom assembly and reuse it for arbitrary reports, because
the custom assembly would need to have metadata about the semantics of the
field values to interpret them correctly.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Aparna" <Aparna@.discussions.microsoft.com> wrote in message
news:0F632520-C6E3-4BB2-AADD-AED858B5370D@.microsoft.com...
> Hi Robert,
> I guess what I was trying to achieve was someway of passing the entire
> collection of my fields as an array(object[]), so that my custom assembly
> code could then map that collection to a datarow. I am aware that I can
> pass
> in the individual field values as parameters, but in that case, what would
> happen if I had about 10 field values or 15 or 20..It seems it would be
> very
> inconvenient to pass in that many arguments to a function. I know I could
> write en embedded VB function that takes the Fields object as a parameter
> and
> creates an array from it, and pass that array to my custom assembly, but
> then
> I am going to have to rewrite this translation function in every report.
> Is
> there a better way of doing this?
> Anyway, thanks for the info about the Fields collection. I have read Teo's
> article before but thanks anyway...
> Aparna.
>
>
> "Robert Bruckner [MSFT]" wrote:
>> You have to pass-in the field values as arguments to your function. You
>> cannot just pass-along the entire Fields object (which is an internal
>> object). The property names you are seeing (through reflection) are
>> obfuscated internal properties. Only the Field class (but not the Fields
>> collection) has public properties.
>> Please check this article for an example how to pass-in values to custom
>> code:
>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/ERSCstCode.asp?frame=true
>> --
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> "Aparna" <Aparna@.discussions.microsoft.com> wrote in message
>> news:F3CFC82D-56B5-4449-A2E1-175444E2C508@.microsoft.com...
>> >I have a function in C# that performs some complex calculations given a
>> > DataRow object. I would like to somehow pass in my Fields structure as
>> > a
>> > parameter to this function. But, I get a compile error saying cannot
>> > convert
>> > Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.Fields
>> > to
>> > System.Data.DataRow. So, I changed the parameter from DataRow to
>> > Object[].
>> > That does not work either. Finally, I changed the reqd parameter from
>> > Object[] to Object, just to see the contents of the Fields structure.
>> > Now,
>> > this compiles but the contents of the structure are really weird! I see
>> > properties named a, b,c,d, e, etc! Is there something I am doing wrong?
>> > or
>> > are these the ACTUAL property names' Also, i tried searching all over
>> > for
>> > documentation on ReportObjectModel.Fields class but could not find
>> > anything.
>> > Any comments/pointers to helpful material would be appreciated.
>>|||Works for me...
I pass a reference to the fields collection to custom code like this
=code.IsValid(Fields)
and recieve it in custom code like this:
Public Function IsValid(f as Fields) as Boolean
If f!MyField.Value < foo then return false
return true
End Function
I use it in the filter expression like this:
Expression =code.IsValid(Fields)
Operator = Value =true
Note that in the filter expression, the "Value" must begin with the equal
sign.
Good Luck,