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",
"ObjectDataSource1"))

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
SetSubDataSource
ReportViewer1.LocalReport.Refresh()

End Sub


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

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

End Sub

End Class
============================

Hope this helps.

Sincerely,

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 ...
    (microsoft.public.dotnet.languages.vb)
  • 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 ...
    (microsoft.public.access.modulesdaovba)
  • 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 ...
    (microsoft.public.access.formscoding)
  • 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. ...
    (microsoft.public.access.forms)
  • 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 ...
    (microsoft.public.excel.programming)