Sunday, March 11, 2012

Error 534 trying to run report

I have written a report in the Crystal IDE that runs fine. It is using OLE DB to a SQL Server database. When I then try to run that report at runtime, outside of Crystal, I get an error 534 returned. I am using the CPRE32 API and I am using version 8.5.Try looking up the error number or error description on www.google.com or on Crystal's Website: http://support.businessobjects.com/search/advsearch.asp|||I have done both of those. There is quite a bit of good information out there. But none of it so far has helped me. I recently tried switching from using P2SOLEDB.DLL to P2SSQL.DLL just to see what would happen, but I still get 534...|||Have you verified database?I usually get error 534 when database verification is needed.|||I will post this info here in hopes that it will help others who search for this problem.

The solution to my 534 problem was to use the PESetNthTableLocation API call. I had to call Crystal support to get this information.

The problem was caused by my changing database names at runtime.

I wrote all my reports to report on database "A", so to Crystal, the database "location" was "A.dbo.tablename". Then, at runtime, if the user of my application was running the reports on database "B", I was calling PESetNthTableLogOnInfo and setting the database to "B". However, according to Crystal support, sometimes that is not enough. Sometimes you also have to change the database location. So, once I called PESetNthTableLocation (setting it to "B.dbo.tablename") in addition to PESetNthTableLogOnInfo, it worked fine...

No comments:

Post a Comment