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?
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?