[RESOLVED] how to print data from datagrid using datareport?
http://www.fileden.com/files/2008/3/...res/vbkoh2.jpg
in my sreenshot it must print all what it is in in column1 which is:
aaa
bbb
ccc
Code:
DataReport6.Show
DataReport6.Sections("Section2").Controls("label1").Caption = DataGrid1.Columns(1)
plz help..
tnx.. :)
Re: how to print data from datagrid using datareport?
Re: how to print data from datagrid using datareport?
oppss.. ok.. :D sorry.. :o
plz help me..
:)
Re: how to print data from datagrid using datareport?
Add the appropriate controls to the Data Report at design time. Then simply use the code below to view the report.
Code:
Private Sub cmdPrint_Click()
Set DataReport1.DataSource = DataGrid1.DataSource
DataReport1.Show
End Sub
Re: how to print data from datagrid using datareport?
Failed getting Rowset(s) from current data source :confused:
Re: how to print data from datagrid using datareport?
Is the DataGrid attached to an ADO Data Control? If yes try this code
Code:
Private Sub cmdPrint_Click()
Set DataReport1.DataSource = ADODC1.RecordSet
DataReport1.Show
End Sub
Re: how to print data from datagrid using datareport?
using that code it returns this error:
runtime error 3001 :
The application is using arguments that are of wrong type, are out of acceptable range, or are in conflict with one another :confused:
printing data on datagrid gives me headache:confused:
Re: how to print data from datagrid using datareport?
What can I say! Everything I posted works fine for me.
I could keep on guesing and posting solutions but without more help from you it would be futile.
Re: how to print data from datagrid using datareport?
Code:
Private Sub cmdPrint_Click()
Do While DataGrid1.Columns(0) <> ""
DataReport6.Sections("Section2").Controls("label1").Caption = DataGrid1.Columns(1)
DataGrid1.Row = DataGrid1.Row + 1
Loop
End Sub
i try this code
but it gives me an error message:
run time error '6148'
invalid row number
in this line of code:
Code:
DataGrid1.Row = DataGrid1.Row + 1
plz help tnx.
Re: how to print data from datagrid using datareport?
i've solved it already..hehehe :D
Re: [RESOLVED] how to print data from datagrid using datareport?
can you show the code you used? thanks! :)
Re: how to print data from datagrid using datareport?
Quote:
Originally Posted by
kirara22
i've solved it already..hehehe :D
mate! what code did you use! i have the same porblem as you! really need it :((
thnx in advance!