BoldDeskBoldDesk is now live on Product Hunt with a special offer: 50% off all plans. Let's grow together! Support us.
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.
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