Results 1 to 4 of 4

Thread: Problem using SetDataSource * resolved *

  1. #1

    Thread Starter
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,969

    Resolved Problem using SetDataSource * resolved *

    Hi all,

    I'm having a problem using Crystal 8.0 and Visual Basic 6.0. I'm selecting my data into a recordset but the Crystal report continues to use the data from the database I used to design it before I imported it into the project. I can't seem to make it stop going to the database.

    I populate a recordset called rsTempRecordSet.

    Then I use:

    If (CR_CustomReport.HasSavedData) Then
    CR_CustomReport.DiscardSavedData
    End If

    Then I use:

    CR_CustomReport.Database.SetDataSource rsTempRecordSet

    It still uses the database though. Any suggestions.
    Last edited by TysonLPrice; Jan 20th, 2005 at 03:24 PM.

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Problem using SetDataSource

    This is usually from having the option in CR to "Save data with report". Uncheck
    it and re-save your report. There is also a .DiscardSavedData method of the
    report object that you can invoke too.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,969

    Re: Problem using SetDataSource

    Quote Originally Posted by RobDog888
    This is usually from having the option in CR to "Save data with report". Uncheck
    it and re-save your report. There is also a .DiscardSavedData method of the
    report object that you can invoke too.
    Yaba-daba-doo

    It was the "Save data with report" option. I was beating my brains out on that and ended up working around it with a hammer.

    By the way I hit a couple of forums on this and you are the only one that came close.

    Thanks!

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Problem using SetDataSource * resolved *

    No prob. Glad to help and hope that VBF will be your new home.

    Btw, came close? I thought I won.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

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