I have select few columnheader from listview1 list it in the listbox1.Now from listbox, How I can sent this columnheader and listitems to data report?
Printable View
I have select few columnheader from listview1 list it in the listbox1.Now from listbox, How I can sent this columnheader and listitems to data report?
You would have to create a recordset containing the listitems and then set this recordset as the datareport datasource at runtime. You can set the datareport columns also at runtime, see below.
Code:Private Sub DataReport_Initialize()
rptDailyuse.Sections("pageheader").Controls.Item("lblCompany").Caption = "somename"
End Sub
Let said I have three columnheader in my listbox1. So How I can label this to the data report?. So How I can sent using you code? Where I can call the listbox1 name in the DataReport_Initialize ?Quote:
Originally Posted by wes4dbt
The labels can be set like this,
Code:Private Sub DataReport_Initialize()
rptDailyuse.Sections("pageheader").Controls.Item("label1").Caption = Form1.Listview1.ColumnHeaders(1)
rptDailyuse.Sections("pageheader").Controls.Item("label2").Caption = Form1.Listview1.ColumnHeaders(2)
rptDailyuse.Sections("pageheader").Controls.Item("label3").Caption = Form1.Listview1.ColumnHeaders(3)
End Sub
Moved to Reporting