There are a lot of different APIs that you can call. I was able to create a VB ActiveX class and standard EXE that use the Crystal Reports Engine (an ActiveX DLL) and the PDF Writer software (a print driver to generate PDF files) to generate batches of reports in both XLS and PDF formats.
It wasn't hard to do once I found some sample code, but finding the right sample code was a nightmare because most of the samples used other CR APIs and the samples weren't segregated by API.
Also watch out for reports with queries. Even though it is easy to establish a databse connection for the report object at run-time, the queries seem to have the Data Source Name embedded within their definitions and seem to be tied to the specifics of the selected ODBC driver, which really limits your ability to use different DSNs to switch to different databses (e.g. DEVL, TEST, PROD). Our CR developer was using a Microsoft ODBC driver, and his queries failed when run under the oracle ODBC driver.
We have had problems with minor changes causing a report to become corrupt (requiring that it be rebuilt) and have learned to keep a copy of each version of each report as a safety precaution. Or main user of CR wants us to find a more stable product.
Also, the only way we could fix some field truncation problems (the first character was randomly missing!) was to install the Crystal Repors ODBC driver, but that meant rebuilding all the queries from scratch and putting in a registry patch that cased the join syntax to be that of ANSI SQL rather than Microsoft's ODBC-specific SQL.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.