Results 1 to 5 of 5

Thread: crystal report without database - listview

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Mar 2005
    Posts
    2,586

    crystal report without database - listview

    Code:
    ...
    Call GetListViewData(ListView1)
    ....
    
    Private Sub GetListViewData(lv As ListView)
    
        Dim I As Integer
    
        Set RSTEST = New ADODB.Recordset
        With RSTEST.Fields
            .Append "Field1", adBSTR
            .Append "Field2", adBSTR
            .Append "Field3", adBSTR
            .Append "Field4", adBSTR
            .Append "Field5", adBSTR
            .Append "Field6", adBSTR
        End With
    
        RSTEST.Open
        For I = 1 To lv.ListItems.Count
            With RSTEST
                .AddNew
                .Fields("Field1") = lv.ListItems(I).Text
                .Fields("Field2") = lv.ListItems(I).SubItems(1)
                .Fields("Field3") = lv.ListItems(I).SubItems(2)
                .Fields("Field4") = lv.ListItems(I).SubItems(3)
                .Fields("Field5") = lv.ListItems(I).SubItems(4)
                .Fields("Field6") = lv.ListItems(I).SubItems(5)
                .Update
            End With
        Next I
    
    End Sub
    now i need to paas the recordset RSTEST into the report attached

    Tath is all.
    Tks
    Attached Files Attached Files

  2. #2
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: crystal report without database - listview

    With Active Reports it is as simple as setting the report recordset to the recordset you want at runtime.
    Haven't used Crystal in many years. I would hope it is that simple with CR as well but have a feeling it is not.

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Mar 2005
    Posts
    2,586

    Re: crystal report without database - listview

    Quote Originally Posted by DataMiser View Post
    With Active Reports it is as simple as setting the report recordset to the recordset you want at runtime.
    Haven't used Crystal in many years. I would hope it is that simple with CR as well but have a feeling it is not.
    TKS bro but i need a solution.
    Tkx

  4. #4
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,837

    Re: crystal report without database - listview

    I googled:

    VB 6.0 Crystal using recordset

    and got pages of results. Many of them from here if you want to use this site's search feature.
    Please remember next time...elections matter!

  5. #5
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: crystal report without database - listview

    Quote Originally Posted by TysonLPrice View Post
    ... and got pages of results. Many of them from here if you want to use this site's search feature.
    Always like to emphasize this tip when searching the forums...

    Google and append this to the search criteria - site:vbforums.com
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

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