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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Reporter

Status
Not open for further replies.

lomano

Programmer
Nov 15, 2000
18
CA
I have a question that deals with Data Reporter. I am trying to create a Function Control (Data Report Designer)dynamically. (found information in MSDN but it is only for Data Environment)I am not using a data environment so what I want to do is sum the insurance cost and have it display in a textbox/function control (either will work) located in the footer of the report. This is a snippet of code located in a command button:

With DRInsurance
.Hide
Set .DataSource = rs
.DataMember = ""
With .Sections("Section1").Controls
For intCtrl = 1 To .Count
If TypeOf .Item(intCtrl) Is RptTextBox Then
.Item(intCtrl).DataField = rs(z).Name
z = z + 1
End If
Next intCtrl

End With
.Refresh
.Show
End With

How can I create a function that populates the control with the correct information? Is it possible?
 
When I wanted something similar to your problem, I used the following code.

DataReport1.Sections("head").Controls("lblheader").Caption = Form2.Label5.Caption
DataReport1.Show


You could do the functions calculation in code, and then use this code to plug it into a label on the report. Try it and see if it works for you. It was exactly what I needed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top