Results 1 to 8 of 8

Thread: reporting

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2001
    Location
    ottawa, canada
    Posts
    233

    reporting

    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

  2. #2
    Fanatic Member pvbangera's Avatar
    Join Date
    Sep 2001
    Location
    Mumbai, India
    Posts
    961
    use data report provided by visual basic. but unlike, crystal reports, its not so advanced and user friendly.

    anyways, check it out

    regards,

    prakash

  3. #3
    Hyperactive Member
    Join Date
    Nov 2002
    Location
    india
    Posts
    418
    hi,

    for small reports use rich text box control and print the data using window common dialog control.

  4. #4
    Lively Member
    Join Date
    May 2002
    Location
    Malaysia
    Posts
    103

    data reporting

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

  5. #5
    Addicted Member
    Join Date
    Nov 2000
    Location
    San Diego - California
    Posts
    251
    When you go back to your form are you sure you are destroying your report object.


    i.e Set objReport = nothing.

  6. #6
    Lively Member
    Join Date
    May 2002
    Location
    Malaysia
    Posts
    103
    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....

  7. #7
    Addicted Member
    Join Date
    Nov 2000
    Location
    San Diego - California
    Posts
    251
    My guess is that you should be closing your connection before exit the sub


    Something like

    conn.close
    set cnn = nothing

  8. #8
    Lively Member
    Join Date
    May 2002
    Location
    Malaysia
    Posts
    103
    still not working mate..really stuck at this...damm..thanks for the advice though...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width