We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
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.

Problems During Load Report VB.net

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()}


VB Code:


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


ReportPath: LightSwitchApplication.ReportTemplate.CompanySalesDemo.rdlc

Buil Action: Embedded Resource


Someone help me??, thanks,


Francisco.





4 Replies

FF Francisco Fonseca February 24, 2015 04:07 PM UTC

Thanks, I resolved my problem,  the ReportPath in VB.net is not necessary to place the namespace or the folder, only the report name.



FF Francisco Fonseca February 24, 2015 04:10 PM UTC

Thanks, I resolved my problem,  the ReportPath in VB.net is not necessary to place the namespace or the folder, only the report name.


CY cyril May 19, 2015 01:50 AM UTC

how did you fix your problem, i am stuck please share how you resolved the problem


NB Nithya B Syncfusion Team May 19, 2015 12:39 PM UTC

Hi Cyril,

Thank you for using Syncfusion products.

ReportViewer throws the above mentioned error, if an incorrect report path assigned to ReportViewer’s ReportPath property. In VB.NET, no need to specify the namespace or folder and the ReportName alone enough(CompanySalesDemo.rdlc), instead of specifying like LightSwitchApplication.ReportTemplate.CompanySalesDemo.rdlc in lsml file. And also set “Build Action” report property as “Embedded Resource”.

Please let us know if you need any further assistance on this.

Regards,
Nithya B

Loader.
Up arrow icon