|
-
Dec 31st, 2007, 12:05 PM
#1
Thread Starter
Frenzied Member
Print selected columnheader to data report
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?
-
Dec 31st, 2007, 03:44 PM
#2
Re: Print selected columnheader 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
-
Dec 31st, 2007, 04:20 PM
#3
Thread Starter
Frenzied Member
Re: Print selected columnheader to data report
 Originally Posted by wes4dbt
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 ?
-
Dec 31st, 2007, 04:54 PM
#4
Re: Print selected columnheader to data report
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
-
Jan 1st, 2008, 04:05 AM
#5
Re: Print selected columnheader to data report
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|