Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

does data report need a Datasource?

Status
Not open for further replies.

oigo

Programmer
Apr 27, 2002
23
CO
Hello, can i work a data report with unbound-data? for example to populate a data report with data of the controls of a form without use a recordset or command object.

Thank you
 
Just use datareport labels instead of Textboxes and you can load them programmatically before calling dr1.show:
This sets up the header section:

With dr1.Sections(1)
.Controls(1).Caption = "AGENT"
.Controls(2).Caption = "DAY/DATE"
.Controls(3).Caption = "DAYSHEET"
.Controls(4).Caption = glbBrMan
.Controls(5).Caption = "BRANCH"
.Controls(6).Caption = glbBrName
.Controls(7).Caption = Format(DTPicker1.Value, "ddd d/m")
.Controls(9).Caption = "SHEET:"
.Controls(10).Caption = ""
.Controls(11).Caption = "OF"
.Controls(12).Caption = ""
End With
dr1.Show
Let me know if this helps
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
Hi johnwm,
Is it possible for us to bind the controls to a recordset programatically? Thanks in advance. Hope it helps. Let me know what happens.
With regards,
PGK
 
Hi,

It's very easy to bind the controls to a recordset programmatically.

Set DataReport1.DataSource = recordset.DataSource
Set the names of the unbound datafields to the datafieldnames of the recordset.

Hope this helps you out.

Lode
 
Hi Lode,
Thanks a lot for your prompt reply. I wil have to try it tomorrow. Hope it helps. Let me know what happens.
With regards,
PGK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top