Hi, I have problems in LS SL VB.NET to open embedded reports, I tested with C # and I have no problems but in VB.NET returns error:
{System.ArgumentNullException: Value cannot be null." & vbCrLf & "Parameter name: input" & vbCrLf & " at System.Xml.XmlReaderSettings.CreateReader(Stream input, Uri baseUri, String baseUriString, XmlParserContext inputContext)" & vbCrLf & " at System.Xml.XmlReader.Create(Stream input, XmlReaderSettings settings, String baseUri)" & vbCrLf & " at System.Xml.XmlReader.Create(Stream input)" & vbCrLf & " at Syncfusion.RDL.Data.ReportModel.LoadReport(Stream fileStream, Boolean internalpass)" & vbCrLf & " at Syncfusion.RDL.Data.ReportModel.LoadReport(Stream fileStream)" & vbCrLf & " at Syncfusion.Windows.Reports.Viewer.ReportViewer.LoadReport(Stream fileStream)" & vbCrLf & " at Syncfusion.LightSwitch.Extension.ReportViewer.Presentation.Controls.ReportViewer.ShowReport()" & vbCrLf & " at LightSwitchApplication.Reporte._Closure$__1._Lambda$__2()" & vbCrLf & " at Microsoft.LightSwitch.Threading.ClientGenerated.Internal.MainDispatcher.<>c__DisplayClass2.<BeginInvoke>b__0()}
Private Sub CompanySales_Activated()
AddHandler Me.FindControl("ScreenContent").ControlAvailable, AddressOf CompanySales_ControlAvailable
End Sub
Private Sub CompanySales_ControlAvailable(sender As Object, e As ControlAvailableEventArgs)
RemoveHandler Me.FindControl("ScreenContent").ControlAvailable, AddressOf CompanySales_ControlAvailable
Me.Details.Dispatcher.BeginInvoke(Sub()
Dim items As Object = Me.DataWorkspace.ApplicationData.SalesDetailsSet.GetQuery().Execute().Cast(Of Object)().ToList()
Dispatchers.Main.BeginInvoke(Sub()
Dim viewer As ReportViewer = TryCast(e.Control, ReportViewer)
Dim dataSource As New ReportDataSource("Sales", items)
viewer.DataSources = New List(Of ReportDataSource)()
viewer.DataSources.Add(dataSource)
viewer.ShowReport()
End Sub)
End Sub)
End Sub
Someone help me??, thanks,
Francisco.
Thanks, I resolved my problem, the ReportPath in VB.net is not necessary to place the namespace or the folder, only the report name.