Results 1 to 2 of 2

Thread: Error-handling with Crystal Reports and Stored Procs

  1. #1

    Thread Starter
    PowerPoster BruceG's Avatar
    Join Date
    May 2000
    Location
    New Jersey (USA)
    Posts
    2,657
    Note: I am posting this in both the General and Database forums.


    When I ran my Crystal Report (the source of the data is a SQL Server stored proc) out of VB, I get no results.

    OK, to see what's going on, I ran the query in SQL Server analyzer, and lo and behold, there is a bug in the s.p. that causes the s.p. from completing (turns out a division by zero error was occurring in some cases). But this is not a problem, I can fix it.

    The problem/question is that in the VB Sub that is executing my Crystal Report, there is an error-handler, so I would expect an error to be thrown if Crystal had a problem running the report. But no error is thrown; the report runs and produces 0 records (no output).

    How do I get the error to be thrown by VB?
    "It's cold gin time again ..."

    Check out my website here.

  2. #2
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Lightbulb Why not

    Execute the SP from VB in an ADO command to return the recordset.

    Test the recordset for a record count and then pass it to the report.

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