- Home
- Forum
- Silverlight
- Error when tryinmg to Read RDLC from Server side
Starting in 2019, the Reporting control is no longer included in Essential Studio®. If you're experiencing issues with the Syncfusion� Reporting Platform, Report Viewer, Report Designer, or Report Writer, we recommend migrating to Bold Reports, our dedicated reporting platform.
Bold Reports offers a comprehensive suite of tools and features for all your reporting needs, and we will help you make a smooth transition from the discontinued control. Our support team at https://support.boldreports.com/ is here to assist you with any questions or difficulties you may encounter during the migration process.
We thank you for choosing Syncfusion� and appreciate your understanding.
Bold Reports offers a comprehensive suite of tools and features for all your reporting needs, and we will help you make a smooth transition from the discontinued control. Our support team at https://support.boldreports.com/ is here to assist you with any questions or difficulties you may encounter during the migration process.
We thank you for choosing Syncfusion� and appreciate your understanding.
Error when tryinmg to Read RDLC from Server side
Hi,
I have an issue, if I am trying to read an RDLC to a byte array through a domain service and then convert the bytes back to a stream I am getting an error saying it can't find part of the report. But if I reference the report directly in the silver-light per the example it works.
Here is the code:
I have an issue, if I am trying to read an RDLC to a byte array through a domain service and then convert the bytes back to a stream I am getting an error saying it can't find part of the report. But if I reference the report directly in the silver-light per the example it works.
Here is the code:
Option Compare Binary Option Infer On Option Strict On Option Explicit On Imports System Imports System.Collections.Generic Imports System.ComponentModel Imports System.ComponentModel.DataAnnotations Imports System.Linq Imports System.ServiceModel.DomainServices.Hosting Imports System.ServiceModel.DomainServices.Server Imports System.IO Imports FileFunctions.FileFunctions 'TODO: Create methods containing your application logic. <EnableClientAccess()> _ Public Class TestReportServer Inherits DomainService Private Function GetServerRootPath() As String Dim r As String = HttpContext.Current.Server.MapPath("..") If r.EndsWith("\") = False Then r &= "\" Return r End Function <Invoke()> Public Function ReportTest() As String Dim r As String = GetServerRootPath() & "Reports\TestReport1.rdlc" Return r End Function <Invoke()> Public Function Getreport() As Byte() Dim b As Byte() Dim ff As New FileFunctions.FileFunctions b = ff.ReadFileToByte(GetServerRootPath() & "Reports\TestReport1.rdlc") Return b End Function End Class
Imports System.ServiceModel.DomainServices.Client Imports System.IO Partial Public Class MainPage Inherits UserControl Dim test As New ReportApp.ReportTest.TestReportServer Public Sub New() InitializeComponent() End Sub Private Sub MainPage_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded 'test.ReportTest(AddressOf GetTest, Nothing) test.Getreport(AddressOf DisplayReort, Nothing) End Sub Private Sub GetTest(e As InvokeOperation(Of String)) MessageBox.Show(e.Value) End Sub Private Sub DisplayReort(e As InvokeOperation(Of Byte())) Dim b As Byte() b = e.Value 'MessageBox.Show(b.Length.ToString) 's.Write(b, 0, b.Length) 'MessageBox.Show(s.Length.ToString) 's = Application.GetResourceStream(New Uri("BarChartDemo;component/TestReport1.rdlc", UriKind.Relative)).Stream Dim rdlStream As Stream = Application.GetResourceStream(New Uri("ReportApp;component/TestReport1.rdlc", UriKind.Relative)).Stream Dim rdlstream1 As Stream rdlstream1 = New MemoryStream() rdlstream1.Write(b, 0, b.Length) Try ReportViewer1.LoadReport(rdlStream) Catch ex As Exception MessageBox.Show(ex.ToString) End Try ReportViewer1.RefreshReport() 'MessageBox.Show(b.Length) End Sub
Is there any diffrence between stream and Application.GetResourceStream in there encoding.
I would like to keep the RDLC files on the server and read them in as a byte array and then reconstitute the stream.
Any help would be appreciated.
SIGN IN To post a reply.
1 Reply
AS
Anandakumar S
Syncfusion Team
October 2, 2013 02:03 PM UTC
Hi Darren Hunnter,
Thanks for using Syncfusion Products.
Please follow up the incident #113845 for updates regarding
this query.
Please let us know if you have any questions.
Regards,
Anandakumar S
SIGN IN To post a reply.
- 1 Reply
- 2 Participants
-
DH Darren Hunnter
- Oct 1, 2013 01:05 PM UTC
- Oct 2, 2013 02:03 PM UTC