Results 1 to 11 of 11

Thread: [RESOLVED] [VB.NET/Crystal Reports]Multiple Tables problem... help!!

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2008
    Posts
    11

    Resolved [RESOLVED] [VB.NET/Crystal Reports]Multiple Tables problem... help!!

    Hello guys.

    Im having a problem right now on displaying my Cystal Report with multiple tables.

    My report contains two tables and but when I tried displaying my report in VB2005, I always get an exception error.

    question: how do I set the ConnectionInfo and the LogOnInfo given the there are two tables in the report?

    ive already tried a single table and it worked well.

    please guys.. help me. =)

  2. #2
    Lively Member
    Join Date
    Sep 2007
    Location
    Texas
    Posts
    98

    Re: [VB.NET/Crystal Reports]Multiple Tables problem... help!!

    What exception error are you getting?

    What exactly do you mean by "two tables" as this should not be an issue at all.
    Working in VB2005 and SQL2005

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2008
    Posts
    11

    Re: [VB.NET/Crystal Reports]Multiple Tables problem... help!!

    i am a newbie to vb.net and crystal so i still dont know my way to this thing.

    its an internal exception error.

    two tables would mean, in my report i used two tables from the database to display the information i want. i am not talking about the design, but on how to set the connection to the database. obviously i dont know my way around using ConnectionInfo and LogonInfo when more than two tables are involved.

    im sorry if my question wasnt so clear. =)

  4. #4
    Lively Member
    Join Date
    Sep 2007
    Location
    Texas
    Posts
    98

    Re: [VB.NET/Crystal Reports]Multiple Tables problem... help!!

    Still not too sure what you mean sorry :-(
    Can you post your code and the error?

    Have you tried the Crystal Viewer (available off the Toolbox) If you use the Crystal Viewer then you dont need to worry about setting the connection info as this is handled by the viewer
    Working in VB2005 and SQL2005

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: [VB.NET/Crystal Reports]Multiple Tables problem... help!!

    Quote Originally Posted by boreder
    its an internal exception error.
    What is the specific error?

  6. #6

    Thread Starter
    New Member
    Join Date
    Jan 2008
    Posts
    11

    Re: [VB.NET/Crystal Reports]Multiple Tables problem... help!!

    well the error turned out to be caused by the type of database i used and its incompatible with the setup. that part is done but I only used a single table. im gonna have to continue with the usage of two tables.

    if you guys have any idea on how to set the connectioninfo and logoninfo, it would be very appreciated. the code below is the one i used for the single table:

    vb Code:
    1. Dim logOnInfo As New TableLogOnInfo
    2.             Dim crDatabase As Database
    3.             Dim crTables As Tables
    4.             Dim crTable As Table
    5.  
    6.             logOnInfo = REPORT.Database.Tables.Item(TableName).LogOnInfo
    7.  
    8.             Dim connectionInfo As New ConnectionInfo
    9.  
    10.             crDatabase = REPORT.Database
    11.             crTables = crDatabase.Tables
    12.  
    13.             connectionInfo = REPORT.Database.Tables.Item(TableName).LogOnInfo.ConnectionInfo
    14.             connectionInfo.DatabaseName = Server
    15.             connectionInfo.ServerName = Server
    16.             connectionInfo.Password = Password
    17.             connectionInfo.UserID = username
    18.  
    19.             For Each crTable In crTables
    20.                 logOnInfo = crTable.LogOnInfo
    21.                 logOnInfo.ConnectionInfo = connectionInfo
    22.                 crTable.ApplyLogOnInfo(logOnInfo)
    23.  
    24.                 REPORT.Database.Tables.Item(crTable.Name).Location = username & "." & crTable.Location
    25.  
    26.             Next


    thanks!

  7. #7
    Frenzied Member
    Join Date
    Aug 2006
    Location
    India, Punjab, Bhatinda
    Posts
    1,689

    Re: [VB.NET/Crystal Reports]Multiple Tables problem... help!!

    pls post the exact error message. if possible take a snapshot of the error using Print Screen key in the keyboard and paste it in MSpaint. Post the image. I presume it is DAO Data linkng Error any way post it let's see

  8. #8

    Thread Starter
    New Member
    Join Date
    Jan 2008
    Posts
    11

    Re: [VB.NET/Crystal Reports]Multiple Tables problem... help!!

    the error problem is fixed.

    now, i would like ask for your idea on my second inquiry regarding the two tables included in a report. how to manipulate the ConnectionInfo and LogInfo classes. the code above is for sigle table only... but i want to learn if the report includes more than 1 table.

    thanks!

  9. #9
    Frenzied Member
    Join Date
    Aug 2006
    Location
    India, Punjab, Bhatinda
    Posts
    1,689

    Re: [VB.NET/Crystal Reports]Multiple Tables problem... help!!

    the error problem is fixed.
    may we know how?

  10. #10

    Thread Starter
    New Member
    Join Date
    Jan 2008
    Posts
    11

    Re: [VB.NET/Crystal Reports]Multiple Tables problem... help!!

    I just changed the connection type to ODBC(RDO). The problem was mainly on it, not on the multiple tables.

    Using the Datasource Save Location Settings (I dont know the exact tool/window, cuz im using a japanese environment.) I updatedthe datasource to match that of the actual database table. The reason I had to do this because the Dataset(.xsd) was created manually cuz the database is so big, it slows down the pc when trying to use the wizard.

    Im sorry if I cant explain it well, I hope my solutions makes sense.

  11. #11
    New Member
    Join Date
    Apr 2008
    Posts
    1

    Re: [RESOLVED] [VB.NET/Crystal Reports]Multiple Tables problem... help!!

    check this url , it abt showing data from multiple table in Crystal report

    http://vb.net-informations.com/cryst...ple_tables.htm

    jos.

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