Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Data Report


Message #1 by vwindrow@m... on Tue, 22 Oct 2002 23:01:18
A guess here, but try going into the report designer, right clicking the
report, and selecting "Retrieve Structure".

That should sync up the report template with the database, but be aware
you will lose anything you created in the report.

-----Original Message-----
From: vwindrow@m... [mailto:vwindrow@m...]
Sent: Tuesday, October 22, 2002 6:01 PM
To: professional vb
Subject: [pro_vb] Data Report


I am having trouble getting data into the Group Header Section of my
Data
Report.  I am loading the Report through code versus using the
DataEnvironment.  It works fine with the DataEnvironment, however the
requirements are that it needs to be done throught code using a
recordset.  I can load dat into the Detail Section but when I add a few
text boxes and try to fill them with data in the Group Section I get an
error that says "Report Sections Do not match data source". Is there
something that I need to set in the Group Header Section?

This is the code below that I am using to load the report.


PickSQL =3D "SELECT Orders.OrderID, Orders.OrderDate, Orders.CustID,
OrderLineItems.LineItemNbr, OrderLineItems.Quantity, Products.Title,
Products.Author, Products.ISBN " + _
"From Orders, OrderLineItems, Products Where Orders.OrderID =3D
OrderLineItems.OrderId " + _
"AND OrderLineItems.ISBN =3D Products.ISBN AND Orders.OrderID =3D
OrderLineItems.OrderId Order By OrderLineItems.LineItemNbr"
          
 If cmdProcess(0) Then

    Screen.MousePointer =3D vbHourglass
  
   Set Pick =3D conOES.Execute(PickSQL)
 
   Set rptPickList.DataSource =3D Pick
   rptPickList.Show
  
   Screen.MousePointer =3D vbDefault
         
    Exit Sub
 End If

---
Visual C# - A Guide for VB6 Developers
This book will make it easy to transfer your skills
from Visual Basic 6 to C#, the language of choice
of the .NET Framework.
http://www.wrox.com/ACON11.asp?ISBN=3D1861007175&p2p0059




  Return to Index