Crystal, thou hast been slain!

Finally! I can now say that Crystal Reports is actually doable. In my blog in the past, I've recorded small victories getting CR to work with Java... The odd thing about CR though is that every time we get one thing working, the next day a new, bigger wall hits us and makes it look like the way we're trying to get CR to work will not work. In fact, I think I've switched the way we are attacking CR maybe 3-4 times in the last 2 months as new roadblocks came up or I just understood the various API's they provide a bit better. My main gripe is that the company that makes Crystal Reports provides very little useful documentation about Java integration and most of what they do provide (including that which comes bundled with the software) is outdated - it's based on CR9. We're using CR10 because we are using custom XML datasources that don't use ODBC (instead it's just xml and xsd files) These files are constructed on the fly and then a report is tweaked (also on the fly) so the urls it requests data for will point to the right file. The resulting report is exported to pdf, word, excel, etc. and sent back encrypted and attached to a message to a Swing application over the network to the requesting customer. Getting the URL rewriting with their new native (non-ADO -- which didn't handle data typing correctly) XML driver to work was a major pain... There is NO documentation for it at all.

Ok, </rant>... Honestly, I'm just thrilled that it works now. I just need a handful of weeks to document, clean the code and do some testing...

On another note, jME 0.8 came out this Monday and is full of lots of bug fixes and a few cool new features (including the Cloth and Swing stuff I mentioned earlier in my blog.) Check it out!

6 comments:

Maitreyi said...

Hi Joshua,
Came across your blog while being stuck with Crystal Reports. If you have cracked how to go about displaying a Crystal Report created using Native XML driver from java, will you kindly share it ?

Thanks,
Maitreyi

Renanse said...

Displaying how? You can have Crystal export it to a number of formats and open those. That's usually your best bet. Yes, I was able to get the Native XML driver to work, but as I mentioned, I did it by manipulating Crystal quite a bit.

elmo said...

You said The resulting report is exported to pdf, word, excel, etc. and sent back encrypted and attached to a message - how did you do that? I only saw a way to export to view it on client side, but where is the export file located on the server?

Renanse said...

The Java API for Crystal has options for running the report as to what format it will export to. The file is generated on the Server to a file you specify. It's been months since I looked at the code but if you are intested I will pull up the exact code.

Anonymous said...

Hi renanse, yes, I'm interested in the code - can you post it here, or do you want to email it? Thank you in advance :-) Elmo

richard said...

I'm also interested in getting the Native XML Driver to work. I understand that it's lack of documentation on this issue, but Joshua took great efforts to work it out. I also posted my question in Business Objects' forum (http://support.businessobjects.com/forums/
message.asp?fid=76&sk=5&ps=25&pn=1&mid=141887) but get no reply yet. It would be nice if Joshua can kindly share the solution.