Results 1 to 3 of 3

Thread: Problem with crystal 4.6 and VB6

  1. #1

    Thread Starter
    Lively Member Xcoder's Avatar
    Join Date
    Jan 2004
    Posts
    120

    Problem with crystal 4.6 and VB6

    Here is the situation, on a clean windows installation (tried so far in 98 and 2000) the following code is used to retrieve a report to the screen. But sadly it does nothing, the result in the .status property after the .action = 1 line is -1 where actually a successful report shows 3.


    VB Code:
    1. 'use ADO to connect to a Access 97 DB.
    2.  
    3. CrystalReport1.Connect = "Provider = Microsoft.Jet.OLEDB.4.0;" &
    4. App.Path & "\config.mdb;UID=sa;PWD=12345;"
    5. Me.CrystalReport1.DataFiles(0) = App.Path + "\db.mdb"
    6.  
    7. 'call the report which is stored in the app's path.
    8.  
    9. CrystalReport1.ReportFileName = App.Path + "\boent_rep.rpt"
    10. CrystalReport1.Destination = crptToWindow
    11. CrystalReport1.DiscardSavedData = True
    12.  
    13.  
    14. 'before this lines, I go thru several steps to get the formula.
    15.  
    16. CrystalReport1.SelectionFormula = formula 'whatever formula is
    17.  
    18. 'call the report.
    19. CrystalReport1.Action = 1

    THe viewer doesnt show at all, but Im postive the program executes all the lines. As I have said, the status property might tell me the answer but I cant find any description of what a -1 result means. Any help will be appreciated.

    Last edited by Xcoder : 09-10-2001 at 12:45 AM.

  2. #2

    Thread Starter
    Lively Member Xcoder's Avatar
    Join Date
    Jan 2004
    Posts
    120

    Re: Problem with crystal 4.6 and VB6

    *bump*
    Last edited by Xcoder : 09-10-2001 at 12:45 AM.

  3. #3

    Thread Starter
    Lively Member Xcoder's Avatar
    Join Date
    Jan 2004
    Posts
    120

    Re: Problem with crystal 4.6 and VB6

    this problem doesnt occur on every machine, in some XP and 2000 machines it worked ok, but in the machines I installed windows (98 and 2000) it was no likely to work.
    Last edited by Xcoder : 09-10-2001 at 12:45 AM.

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