Skip to main content

ReportStorageWebExtension.IsValidUrl(String) Method

Determines whether the URL passed to the current report storage is valid.

Namespace: DevExpress.XtraReports.Web.Extensions

Assembly: DevExpress.XtraReports.v23.2.Web.dll

NuGet Package: DevExpress.Web.Reporting.Common

Declaration

public virtual bool IsValidUrl(
    string url
)

Parameters

Name Type Description
url String

A report name (URL).

Returns

Type Description
Boolean

True if the specified name (URL) is valid; otherwise, false.

Remarks

Use the IsValidUrl method to validate the report name (URL) that is passed to your Report Storage. Implement your own logic to prohibit URLs that contain spaces or other specific characters. Return true if no validation is required.

The reporting component calls the IsValidUrl method when the component opens a report and before the GetData method.

The Report Designer calls the IsValidUrl method when the component saves a report with the specified name (URL) before the CanSetData and SetData methods.

The reporting component does not call the IsValidUrl method before the SetNewData method. Validate and correct the name of the newly created report in the SetNewData method implementation.

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.

See Also