none
Problem setting datasource to subreport in VB.Net Desktop Application

    Question

  • I have a main report wich contains a subreport, each report values are in diferentes datasources.. I've no problem setting de datasource to the main report.. but I've no idea how set the datasource to the subreport...
    Could anybody help??.. Please
    Monday, March 23, 2009 2:04 AM

All replies

  • subreports get their datasources supplied in an subreport processing event. I don't remember exactly how it goes, but it should be something like this.

    Protected Sub localReport_SubreportProcessing(ByVal sender As Object, ByVal e As Microsoft.Reporting.WebForms.SubreportProcessingEventArgs)

    e.DataSources.Clear()

     

     e.DataSources.Add(urNiftyDataSourceGoesHere)

     

    End Sub


    Living my life at 123mph in 11.15 seconds
    Monday, March 23, 2009 4:54 PM