Microsoft KB Archive/190584

= BUG: Some Properties or Methods Not Displayed in DataReport =

Article ID: 190584

Article Last Modified on 1/8/2003

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q190584



SYMPTOMS
When using the DataReport, the following problems may occur:


 * 1) Expected properties or methods are not displayed in the completion list for a variable of type DataReport.
 * 2) Run-time error 438 (Object doesn't support this property or method) occurs when accessing a method or property of a DataReport object.



RESOLUTION
Either refer directly to the Data Report or use variables of type Object.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.



Example 1
 Create a new Standard EXE project.Form1 is created by default. From the Project menu, select Add Data Report. In the Project window, right-click on Form1, and select View Code.  Type (don't paste) the following into the Form1 code window: Sub Example1 Dim dr As DataReport Set dr = DataReport1 dr.                        When the dot is typed in the last line at step 4, Visual Basic will display a list of DataReport properties and methods. Note that items such as the Show and Hide methods are not listed.

NOTE: To ensure that IntelliSense is active, make sure that the Auto List Members option is checked in Tools.Options.Editor. This property is set by default.</ol>

Workaround 1
Use this workaround if you need only reference a specific Data Report.

Change the line:

Dim dr As DataReport

to:

Dim dr As DataReport1

Workaround 2
Use this workaround if you can reference any of several DataReport objects.

Change the line:

Dim dr As DataReport

to:

Dim dr As Object

NOTE: This will cause no list of properties and methods to be displayed when typing the line: dr.

Refer to the Visual Basic online Help for a list or DataReport properties and methods.

Example 2
<ol> Follow steps 1-3 from Example 1.</li>  Paste the following code into the Form1 code window: Sub Example2(dr As DataReport) Dim o As Object Set o = dr       o.Show End Sub

Private Sub Form_Load Example2 DataReport1 End Sub </li> Select Start from the Run menu. Run-time error 438 will occur when executing the line o.Show in the sub procedure Example2.</li></ol>

Workaround 1
Use this workaround if you know which DataReport object will be passed to the procedure Example2.

Replace the procedure Example2 with:

Sub Example2(dr As DataReport1) dr.Show End Sub

Workaround 2
Use this workaround if one of several possible DataReport objects will be passed to the procedure Example2.

Replace the procedure Example2 with"

Sub Example2(dr As Object) dr.Show End Sub

Additional query words: kbDSupport kbDesigner kbReportWriter kbVBp600bug kbdse kbVBp

Keywords: kbbug KB190584

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.