Showing posts with label datasource. Show all posts
Showing posts with label datasource. Show all posts

Friday, March 9, 2012

Error viewing reports

I have created a report, in SQL RS 2000, using My Windows Credentials.

ie under the datasource tab, I chose the "credentials stored securely in report server" OPTION. There I specified my user NT Credentials.

However, when I view the report, it gives me err

An error has occurred during report processing. (rsProcessingAborted) Get Online Help

Cannot create a connection to data source xxx. (rsErrorOpeningConnection) Get Online Help

Login failed for user xxxx

Pl advise.

Thanks.

Hello Tarana,

You need to check the box 'Use as Windows credentials when connecting to the data source' in the data source tab. Try that and see if it works.

Jarret

Sunday, February 26, 2012

Error updating a data source

I have a strange problem and not sure where to go.
If I go into Report Manager and create a datasource, RS will create the
datasource and it will work properly. However if I go into that datasource
and edit the connection string, I get an error that the item could not be
found. The log file shows:
<Header>
<Product>Microsoft SQL Server Reporting Services Version
8.00.878.00</Product>
<Locale>en-US</Locale>
<TimeZone>Central Standard Time</TimeZone>
<Path>C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\LogFiles\ReportServerWebApp__02_19_2005_13_00_31.log</Path>
<SystemName>TRANQ</SystemName>
<OSName>Microsoft Windows NT 5.0.2195.0</OSName>
<OSVersion>5.0.2195.0</OSVersion>
</Header>
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
MaxActiveReqForOneUser to '20' requests(s) as specified in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
MaxScheduleWait to default value of '1' second(s) because it was not
specified in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
DatabaseQueryTimeout to default value of '30' second(s) because it was not
specified in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing InstanceName
to default value of 'MSSQLSERVER.1' because it was not specified in
Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
ProcessRecycleOptions to default value of '0' because it was not specified
in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
RunningRequestsScavengerCycle to default value of '30' second(s) because it
was not specified in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
RunningRequestsDbCycle to default value of '30' second(s) because it was not
specified in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
RunningRequestsAge to default value of '30' second(s) because it was not
specified in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
CleanupCycleMinutes to default value of '10' minute(s) because it was not
specified in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
SecureConnectionLevel to default value of '1' because it was not specified
in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
DisplayErrorLink to 'True' as specified in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
WebServiceUseFileShareStorage to default value of 'False' because it was not
specified in Configuration file.
aspnet_wp!ui!aa0!2/19/2005-13:01:39:: e ERROR:
System.Web.Services.Protocols.SoapException: The item
'/TSIReports/Reports/test' cannot be found. -->
Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: The
item '/TSIReports/Reports/test' cannot be found.
at
Microsoft.ReportingServices.Library.RSService._SetDataSourceContents(String
path, DataSourceDefinition dataSourceDefinition)
at
Microsoft.ReportingServices.Library.RSService.SetDataSourceContents(CallParameters parameters)
at Microsoft.ReportingServices.Library.RSService.ExecuteBatch(Guid batchId)
at Microsoft.ReportingServices.WebServer.ReportingService.ExecuteBatch()
-- End of inner exception stack trace --
at Microsoft.ReportingServices.WebServer.ReportingService.ExecuteBatch()
aspnet_wp!ui!aa0!2/19/2005-13:01:40:: e ERROR: HTTP status code --> 200
--Details--
System.Web.Services.Protocols.SoapException:
System.Web.Services.Protocols.SoapException: The item
'/TSIReports/Reports/test' cannot be found. -->
Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: The
item '/TSIReports/Reports/test' cannot be found.
at
Microsoft.ReportingServices.Library.RSService._SetDataSourceContents(String
path, DataSourceDefinition dataSourceDefinition)
at
Microsoft.ReportingServices.Library.RSService.SetDataSourceContents(CallParameters parameters)
at Microsoft.ReportingServices.Library.RSService.ExecuteBatch(Guid batchId)
at Microsoft.ReportingServices.WebServer.ReportingService.ExecuteBatch()
-- End of inner exception stack trace --
at Microsoft.ReportingServices.WebServer.ReportingService.ExecuteBatch()
at Microsoft.ReportingServices.UI.BaseProperties.ApplyChanges()
at Microsoft.ReportingServices.UI.DataSourceProperties.ApplyChanges()
at Microsoft.ReportingServices.UI.BaseApplyPage.ApplyBtn_Click(Object
sender, EventArgs e)
at Microsoft.ReportingServices.UI.ScriptButton.OnClick(EventArgs e)
at Microsoft.ReportingServices.UI.ScriptButton.RaisePostBackEvent(String
eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain()
aspnet_wp!ui!aa0!2/19/2005-13:01:41:: e ERROR: Exception in ShowErrorPage:
System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String
errMsg) at at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String
errMsg)
It does not matter if I update the data source programatically either, the
result is the same. I see nothing on this server that is different than any
other servers that I have setup and worked with. I am a admin on the box and
RS is running locally. I have uninstalled and reinstalled to no avail.
Any ideas? It seems like some type of rights issue, but as admin, I am a
content manager and that is applied at the home page level, so should trickle
down to all objects and folders. It is a 2000 box with SP4, RS with SP1.
ThanksI'm not 100% sure about your problem in particular, but I have found
that editing datasources after they have been created in a bad thing,
unless you change the XML file by hand.
Jeff Morgan wrote:
> I have a strange problem and not sure where to go.
> If I go into Report Manager and create a datasource, RS will create the
> datasource and it will work properly. However if I go into that datasource
> and edit the connection string, I get an error that the item could not be
> found. The log file shows:
> <Header>
> <Product>Microsoft SQL Server Reporting Services Version
> 8.00.878.00</Product>
> <Locale>en-US</Locale>
> <TimeZone>Central Standard Time</TimeZone>
> <Path>C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
> Services\LogFiles\ReportServerWebApp__02_19_2005_13_00_31.log</Path>
> <SystemName>TRANQ</SystemName>
> <OSName>Microsoft Windows NT 5.0.2195.0</OSName>
> <OSVersion>5.0.2195.0</OSVersion>
> </Header>
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> MaxActiveReqForOneUser to '20' requests(s) as specified in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> MaxScheduleWait to default value of '1' second(s) because it was not
> specified in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> DatabaseQueryTimeout to default value of '30' second(s) because it was not
> specified in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing InstanceName
> to default value of 'MSSQLSERVER.1' because it was not specified in
> Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> ProcessRecycleOptions to default value of '0' because it was not specified
> in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> RunningRequestsScavengerCycle to default value of '30' second(s) because it
> was not specified in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> RunningRequestsDbCycle to default value of '30' second(s) because it was not
> specified in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> RunningRequestsAge to default value of '30' second(s) because it was not
> specified in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> CleanupCycleMinutes to default value of '10' minute(s) because it was not
> specified in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> SecureConnectionLevel to default value of '1' because it was not specified
> in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> DisplayErrorLink to 'True' as specified in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> WebServiceUseFileShareStorage to default value of 'False' because it was not
> specified in Configuration file.
> aspnet_wp!ui!aa0!2/19/2005-13:01:39:: e ERROR:
> System.Web.Services.Protocols.SoapException: The item
> '/TSIReports/Reports/test' cannot be found. -->
> Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: The
> item '/TSIReports/Reports/test' cannot be found.
> at
> Microsoft.ReportingServices.Library.RSService._SetDataSourceContents(String
> path, DataSourceDefinition dataSourceDefinition)
> at
> Microsoft.ReportingServices.Library.RSService.SetDataSourceContents(CallParameters parameters)
> at Microsoft.ReportingServices.Library.RSService.ExecuteBatch(Guid batchId)
> at Microsoft.ReportingServices.WebServer.ReportingService.ExecuteBatch()
> -- End of inner exception stack trace --
> at Microsoft.ReportingServices.WebServer.ReportingService.ExecuteBatch()
> aspnet_wp!ui!aa0!2/19/2005-13:01:40:: e ERROR: HTTP status code --> 200
> --Details--
> System.Web.Services.Protocols.SoapException:
> System.Web.Services.Protocols.SoapException: The item
> '/TSIReports/Reports/test' cannot be found. -->
> Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: The
> item '/TSIReports/Reports/test' cannot be found.
> at
> Microsoft.ReportingServices.Library.RSService._SetDataSourceContents(String
> path, DataSourceDefinition dataSourceDefinition)
> at
> Microsoft.ReportingServices.Library.RSService.SetDataSourceContents(CallParameters parameters)
> at Microsoft.ReportingServices.Library.RSService.ExecuteBatch(Guid batchId)
> at Microsoft.ReportingServices.WebServer.ReportingService.ExecuteBatch()
> -- End of inner exception stack trace --
> at Microsoft.ReportingServices.WebServer.ReportingService.ExecuteBatch()
> at Microsoft.ReportingServices.UI.BaseProperties.ApplyChanges()
> at Microsoft.ReportingServices.UI.DataSourceProperties.ApplyChanges()
> at Microsoft.ReportingServices.UI.BaseApplyPage.ApplyBtn_Click(Object
> sender, EventArgs e)
> at Microsoft.ReportingServices.UI.ScriptButton.OnClick(EventArgs e)
> at Microsoft.ReportingServices.UI.ScriptButton.RaisePostBackEvent(String
> eventArgument)
> at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
> sourceControl, String eventArgument)
> at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
> at System.Web.UI.Page.ProcessRequestMain()
> aspnet_wp!ui!aa0!2/19/2005-13:01:41:: e ERROR: Exception in ShowErrorPage:
> System.Threading.ThreadAbortException: Thread was being aborted.
> at System.Threading.Thread.AbortInternal()
> at System.Threading.Thread.Abort(Object stateInfo)
> at System.Web.HttpResponse.End()
> at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
> at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String
> errMsg) at at System.Threading.Thread.AbortInternal()
> at System.Threading.Thread.Abort(Object stateInfo)
> at System.Web.HttpResponse.End()
> at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
> at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String
> errMsg)
>
> It does not matter if I update the data source programatically either, the
> result is the same. I see nothing on this server that is different than any
> other servers that I have setup and worked with. I am a admin on the box and
> RS is running locally. I have uninstalled and reinstalled to no avail.
> Any ideas? It seems like some type of rights issue, but as admin, I am a
> content manager and that is applied at the home page level, so should trickle
> down to all objects and folders. It is a 2000 box with SP4, RS with SP1.
> Thanks
>

Friday, February 24, 2012

Error trapping of datasource control

Hello,

I encountered an interesting situation. I have a gridview and a sqldatasource. It has delete function. When I delete a record an error of foreign key violation is raised. I would like to trap this error and give a user friendly message to the user.

If I use ADO.Net I can use Try/Catch, but it seems there is no way to do the same thing using datasource. Anyone knows?

Thank you,

J

void CustomersGridView_RowDeleted(Object sender, GridViewDeletedEventArgs e)
{

// Display whether the delete operation succeeded.
if(e.Exception ==null)
{
Message.Text ="Row deleted successfully.";
}
else
{
Message.Text ="An error occurredwhile attempting to delete the row.";
e.ExceptionHandled =true;
}

}

Take a look@.MSDNhttp://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.rowdeleted.aspx
|||

Hosam,

Thank you for the reply. It helps, but I would like to get more specific message and give users a friendly message based on that. That is, how can I know the exception is raised due to foreign key violation specifically for example?

Or is there any way to trap the error message passed by a stored procedure?

Thank you,

J

|||

What about check forConstraintException

http://msdn2.microsoft.com/en-us/library/system.data(VS.71).aspx

http://msdn2.microsoft.com/en-us/library/system.data.constraintexception(VS.71).aspx

|||

That is a good suggestion. I will read them.

By the way, thinking for a little time your previous answer does not make sense. The exception is handled after row is ALREADY deleted?

|||

But note that if this exception was thrown nor record will be deleted as the constraint will prevent this.

So if the exception exists no records actually deleted.

|||

Thank you, Hosam.

I tested with detailsview's inserted event, but it did not work. However, what you were saying makes sense as well. I will look into details. If I find more new things, I wll post it here. Thank you.

J