xtrareports-devexpress-dot-xtrareports-dot-web-dot-extensions-dot-reportstoragewebextension-dot-cansetdata-x28-system-dot-string-x29.md
Determines whether a report with the specified URL can be saved.
Namespace : DevExpress.XtraReports.Web.Extensions
Assembly : DevExpress.XtraReports.v25.2.Web.dll
NuGet Package : DevExpress.Web.Reporting.Common
public virtual bool CanSetData(
string url
)
Public Overridable Function CanSetData(
url As String
) As Boolean
| Name | Type | Description |
|---|---|---|
| url | String |
A String specifying the URL that will identify a report in the storage.
|
| Type | Description |
|---|---|
| Boolean |
True if a report storage can save a report with the specified name; otherwise, false.
|
Use the CanSetData method to determine whether a user can save a report with the specified URL. Add custom logic that returns false for reports that should be read-only. Return true if no valdation is required. This method is called only for valid URLs (if the ReportStorageWebExtension.IsValidUrl method returns true ).
For a code example, create a new Web project from the DevExpress Visual Studio template and review the code for the CustomReportStorageWebExtension class in the Services folder.
The following code snippets (auto-collected from DevExpress Examples) contain references to the CanSetData(String) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
public override bool CanSetData(string url) {
return base.CanSetData(url);
}
reporting-web-forms-handle-server-side-errors/CS/DXWebApplication1/ReportStorageWebExtension.cs#L17
public override bool CanSetData(string url) {
return base.CanSetData(url);
}
reporting-web-forms-handle-server-side-errors/VB/DXWebApplication1/ReportStorageWebExtension.vb#L18
Public Overrides Function CanSetData(ByVal url As String) As Boolean
Return MyBase.CanSetData(url)
End Function
See Also
Add a Report Storage (ASP.NET Web Forms)
ReportStorageWebExtension Class