Results 1 to 5 of 5

Thread: Crystal also Hangs.

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2007
    Posts
    13

    Crystal also Hangs.

    If I try to use fields from more than one table in dataset the report hangs.

    I have three tables Customer, Orders, orderdetails. I create a dataset in my project with the three tables with relations:
    Customers----> Orders ----> Orderdetails.

    I create a report with the wizard that contains the three tables linked in the same manner as the relations. grouped by Orders.OrderId and ordered by this field.

    I have a form that executes that has the crystalviewer and the follwing code in the load event.

    Code:
            Dim connstring As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + _
                                         "C:\ReynerioData\Nwind\nwind.mdb"
    
            Dim conn As OleDbConnection = New OleDbConnection(connstring)
    
            Dim oledbadap As OleDbDataAdapter = New OleDbDataAdapter("Select * from Customers", conn)
            Dim oledbAdapOrdr As OleDbDataAdapter = New OleDbDataAdapter("SELECT * FROM Orders", conn)
            Dim oledbAdapOrdrDetails As OleDbDataAdapter = New OleDbDataAdapter("Select * from [Order Details]", conn)
            'Dim oledbAdapCustCat As OleDbDataAdapter = New OleDbDataAdapter("Select * from CustCat", conn)
    
            Dim NwindDataset1 As New nwindDataSet
    
            oledbadap.Fill(NwindDataSet1.Customers)
            oledbAdapOrdr.Fill(NwindDataset1.Orders)
            oledbAdapOrdrDetails.Fill(NwindDataset1.Order_Details)
    
            Dim rpt As New CrystalReport3
    
            rpt.SetDataSource(NwindDataset1)
    
            Me.CrystalReportViewer1.ReportSource = rpt
    When I execute the code if I have fields from more than one of the tables the form hangs.

    It works fine if I use ado but not if I use ado.net.

    It is using OLEdb (Access).

    Any suggestions?

    BillyBoyPR

    PS Do you all use the crystal for reporting in VB or do you think there is something better out there?

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

    Re: Crystal also Hangs.

    If you use ado.net then its different as you need to deploy the merge modules depending on your CR version. Are you setting the logon info for all tables?
    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
    New Member
    Join Date
    Aug 2007
    Posts
    13

    Re: Crystal also Hangs.

    I'm getting thi8s problem in development mode. The application has not been deployed.

    BillyBoyPR

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

    Re: Crystal also Hangs.

    Quote Originally Posted by RobDog888
    Are you setting the logon info for all tables?
    I dont see in your code where you are using the .SetlogonInfo credientials.
    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

  5. #5

    Thread Starter
    New Member
    Join Date
    Aug 2007
    Posts
    13

    Re: Crystal also Hangs.

    I don't need to set logon info. The database and ado.net manage the connections to the database.

    Besides if I use fields from only one table it will work ok. but if I use more than one table thats were it will hang.

    BillyBoyPR

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