Soussan DAS Computer Consultants


Our Team
Solutions
Projects
Clients
Contact
Cool Stuff
KeyholeKeyboardLaptop ComputerComputer Chip
 


Tool to auto run and export Crystal Reports

I've been writing crystal reports since it was owned by Seagate Software. As in "Over 1400 of them". I think Crystal Reports 6 from around 1997 was my introduction into this programming language (and make no mistake, it has a full run-time programming language under the hood) and I've found very few instances where a report can't be created directly in crystal.

One project in particular now has over 1000 individual Crystal Report .RPT files!

Regenerating all the reports on a new dataset the first year involved opening each of them, refreshing, and saving them - tedious and time consuming. That first year I think we only had 500 or so reports, so refreshing by hand was only half as time consuming <grin>.

Quote
Click Here for Press Release


Automate it!

That first year refreshing the reports when the dataset changed was a royal pain. I often tell people that if you have a dull and repetitive task you would like automated, have me do that repetitive task - I'll go so crazy doing the same thing over and over again that I'll automate the process just so I don't have to do it anymore.


Which I did that second year. I did it by writing code in Microsoft Access 2003 to interface with the Crystal Reports DLL files, open, refresh, and export them directly. And do this for all the reports in the report directory. It took about an hour to do 1000 reports, all at the push of a button!

And then reality stepped in

Microsoft stopped writing security updates for Office 2003. My client needed to be HIPAA compliant, so running software that isn't supported was not an option for them.

The short story: I tried a bunch of different things to interface Office 2010 with the older version of Crystal, and nothing worked.

The folks at SAP (who as of this writing own Crystal Reports, but it has been in many hands - Seagate Software, Crystal Decision, and Business Objects have all owned Crystal Reports at one time or another) were quite helpful - they have a solution that involves a product called SAP Crystal Server they said I could configure to do everything I needed at a cost of $2,500 a license.

One for me, one for my client - that is $5000. And that is before it is installed and configured.

There has to be a better way ...

After digging in and concluding I couldn't interface Access 2010 with my version of Crystal Reports directly, I instead decided to write a stand-alone export program in Visual Studio. Which I did!

With that working, my project is now fully running on a supported Microsoft platform - Windows 7 (32 or 64 bit) and Office 2010 - so my client is happy. And at the push of a button, ~1000 crystal report .RPT files are automatically loaded, refreshed, and exported to whatever format they want (currently PDF and RTF, but the tool supports CSV, XLS, and many others).

The tool has both a GUI mode and a stand-alone run from the EXE mode. Give it the input RPT file, the output file to generate, and the format - and in a few seconds your output is generated and ready for you. Automate it with a batch file and scheduled task if you wish.

Here are a couple of teaser shots - the GUI mode:

Automatic Crystal Report Export to PDF file

How you run it from the command line:

Automatic PDF export Crystal Report

And what the output looks like in PDF format:

Crystal Report Export to PDF Example

So David, why are you writing this?

I find many times when I solve a problem for myself or a client that other people / companies have the exact same problem.

If you happened to find this article and have a problem that is similar, perhaps we should talk. If the tool doesn't do exactly what you want, I've been writing software since 1976 ... it is a passion, as is solving problems.

Right now, I'm measuring the interest that others might have in my releasing such a tool commercially.

And I can assure you it would cost a whole lot less than the $2500 SAP wants for Crystal Server! In all fairness, it probably doesn't do everything Crystal Server does - but if it already does or I can make it do what you need, then this could be the beginning of a beautiful friendship.

I can be reached at the contact link top left of this page.

Thanks for stopping by!

David Soussan
(C) 2014-2016 DAS Computer Consultants, LTD. All Rights Reserved.

 

Footer