RE: Error: Subreport could not be shown

Thanks for the reply, sorry I have been away fromthis project for a while and
some of this has slipped my mind. When you refer to:

e.DataSources.Add(New ReportDataSource ("DataSet1_rpt_table",

what is meant by the ObjectDataSource1? I understand the DataSet1_rpt_table
is the dataset of the subreport. Is the ObjectDataSource1 the view which the
dataset refers to?

"Steven Cheng[MSFT]" wrote:

Thanks for your reply Herb,

For VB.NET page, you can directly type the
"reportViewer.LocalReport.SubReportProcessing" event regardless of the
intellisense support. Here is the converted VB.NET version of my test
page's codebehind:

Imports Microsoft.Reporting.WebForms

Partial Class vb_vbreportpage
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
AddHandler ReportViewer1.LocalReport.SubreportProcessing, AddressOf

End Sub

Public Sub SetSubDataSource(ByVal sender As Object, ByVal e As

e.DataSources.Add(New ReportDataSource("DataSet1_rpt_table",

End Sub

End Class

Hope this helps.


Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.


Relevant Pages

  • Re: Referring to form objects from inside a thread pool
    ... but I don't think it's good practice to refer to specific ... reference to an instance of the form in the thread class and then whenever ... Private Delegate Sub DoSomething_Delegate ...
  • Re: How to refer to controls in a Sub
    ... "Filip Neyt" wrote in message ... In the Sub below, I don't know how to refer to the control om the TabControl of the form. ... Dim strKader As String 'Rectangle subform ...
  • Re: Code Help (New Info)
    ... "You can use the RecordsetClone property to refer to a form's Recordset ... Dim RST As DAO.Recordset ... End Sub ...
  • Re: Rookie:Form_AfterUdate?
    ... Words in refer to the field name in a table, ... Private Sub Form_Current ... Kelvin ... the current "OnHand" amount in the stock room. ...
  • Re: SpecialCells and Names
    ... it with additem or use formulas/code to build your range in another area and ... refer to that. ... TEST CODE ... End Sub ...