i don't have the crystal report add-in on my version of vb6, so is there another way outputting database data in a report format that i can print off.
If so is it possible to view it before i print it off?
Thank you in advance
Printable View
i don't have the crystal report add-in on my version of vb6, so is there another way outputting database data in a report format that i can print off.
If so is it possible to view it before i print it off?
Thank you in advance
use data report provided by visual basic. but unlike, crystal reports, its not so advanced and user friendly.
anyways, check it out
regards,
prakash
hi,
for small reports use rich text box control and print the data using window common dialog control.
I have some issue here regarding data report. I have no problem previewing the report before printing it out. My issue here is after previewing the report I saw some mistakes and I would like to go back to my form to make some changes...and when I click the preview button again... I have this run time error '-2147418113 (800ffff)' Catastrophic failure. What do you mean by this...please help...thanks in advance..
When you go back to your form are you sure you are destroying your report object.
i.e Set objReport = nothing.
Here is my coding..
Option Explicit
Public autoCann As Integer
---
---
---
Private Sub cmdPreview_Click()
UpdateRecord
ISOProject.cmdCanni_Grouping autoCann
'rptCannibalisation.Orientation = rptOrientLandscape
rptCannibalisation.Show
End Sub
---
---
Private Sub UpdateRecord()
Dim cnn As ADODB.Connection
Dim strCnn As String
Dim rst As ADODB.Recordset
Dim rst1 As ADODB.Recordset
Dim strSelect As String
Set cnn = New ADODB.Connection
cnn.Open "DSN=ISOmysql;UID=root;host=DALVINDERJIT;DATABASE=JJCM_ISO_DB"
'cnn.Open "DSN=ISOserver"
Set rst = New ADODB.Recordset
rst.CursorType = adOpenKeyset
rst.LockType = adLockOptimistic
rst.Open "Cannibalisation", cnn, , , adCmdTable
rst.AddNew
---
---
---
rst.Update
Set rst1 = New ADODB.Recordset
strSelect = "SELECT Cannid from Cannibalisation where Cannid = LAST_INSERT_ID();"
rst1.Open strSelect, cnn, , , adCmdText
autoCann = rst1!Cannid
End Sub
please advice....
My guess is that you should be closing your connection before exit the sub
Something like
conn.close
set cnn = nothing
still not working mate..really stuck at this...damm..thanks for the advice though...