Hi.
We have a Silverlight ReportViewer that talks to a WCF Report Service.
This report service looks implements "ApplicationPath" which according to its description should allow relative report file names when the silverlight viewer requests to render a report.
Our silverlight reportview uses standard binding to the "Report" attribute
The report renders correctly when "ReportName" is
However, if we try to set "ReportName" to a relative path it fails. We have tried
These produce a rendering error:
A report can't be created from Barcodes Report.trdx
The "ApplicationPath" does not seem to get called.
I can confirm by calling it manually that the correct path is returned (and ends in a slash char) and that MyReport.trdx exists and it is a valid report at this location.
From Silverlight report viewer how are we meant to specify a relative file path?
We would like to be able to specify only a relative path from Silverlight to not give away the full server path in any server communication.
Is this possible?
Looking at ReportFileResolver code it is not, so do we have to create a custom resolver or is this a possible feature for future versions?
Thanks.
Adrian.
We have a Silverlight ReportViewer that talks to a WCF Report Service.
This report service looks implements "ApplicationPath" which according to its description should allow relative report file names when the silverlight viewer requests to render a report.
ReportingService : ReportServiceBase, IReportService
{
private
static
string
_applicationPath =
null
;
/// <summary>
/// From <see cref="Telerik.Reporting.ReportServiceBase"/>
/// When implemented, returns the file system path of the current application's root directory.
/// It is used to resolve the relative paths of the <see cref="Telerik.Reporting.UriReportSource"/>s.
/// </summary>
protected
override
string
ApplicationPath
{
get
{
if
(_applicationPath ==
null
)
{
_applicationPath = XXXX.Helpers.LoadExternal.GetReportsPath();
// This sets a FullName path like C:\ProgramData\OurProgram\Reports
}
return
_applicationPath;
}
}
.....
}
Our silverlight reportview uses standard binding to the "Report" attribute
<
telerikReporting:ReportViewer
ReportServiceClientFactory
=
"{Binding ReportServiceClientFactory}"
ReportServiceUri
=
"{Binding ReportServiceUrl}"
Report
=
"{Binding ReportName}"
Visibility
=
"{Binding ReportVisibility}"
/>
The report renders correctly when "ReportName" is
- a fully qualified name that represents a report stored in a loaded dll on the server side
- "C:\ProgramData\OurApp\Reports\MyReport.trdx" - a fullName file path for a report stored on the server file system
However, if we try to set "ReportName" to a relative path it fails. We have tried
- MyReport.trdx
- MyReport
- ./MyReport.trdx
These produce a rendering error:
A report can't be created from Barcodes Report.trdx
The "ApplicationPath" does not seem to get called.
I can confirm by calling it manually that the correct path is returned (and ends in a slash char) and that MyReport.trdx exists and it is a valid report at this location.
From Silverlight report viewer how are we meant to specify a relative file path?
We would like to be able to specify only a relative path from Silverlight to not give away the full server path in any server communication.
Is this possible?
Looking at ReportFileResolver code it is not, so do we have to create a custom resolver or is this a possible feature for future versions?
Thanks.
Adrian.