Crystal report with ruby on rails

I am also exploring on the same requirement.

Java supports generating reports with crystal reports.

For ROR applications, I hope JRUBY will give a solution for this(for accessing the jave libraries). But I am yet to try it out.

Please check JRuby and let us know whether it can be useful.

Please check JRuby and let us know whether it can be useful.

hi even i have the same requirement..

Already my application is developed in Rails its almost completed now. If i bring Jruby for this part now how to integrate this jruby part with ror part?


Crystal reports can be configured to read XML input and format it accordingly. Hence, you can use a rails handler to output your report data in XML format and that should allow crystal reports to read from it.

example of your XML_REPORT.RHTML :

<data>     <% for item in @data %>     <item>         <id><%= %></id>         <name><%= h( %></name>         <desc><%= h(item.desc) %></desc>     </item>     <% end %> </data>

Regard, Reinhart

Hi, you can also do the following in the controller action to return
the XML of the data result set:

@data = DataModel.find(:all) @data.to_xml

Good luck,


Reinhart, I'm starting a new family of Inventory related web applications and am sitting at the bottom of a high mountain hoping to hear a rumbling from the 'Report Gods' and hope this might be it? I've studied the Ruport strategy and fear it's a DEAD END as it clearly hasn't caught on and I expect it'll someday lose the attention of its progenators. Anyway, is the Crystal Reports strategy something like this: The server creates the output in an XML format and downloads it to the client machine. The client user 'fires up' his Crystal Reports' desktop application and loads a report format and then directs this formatted report to the local XML data source? I expect you laugh at my questions but as you can see, I'm at the "is it an animal, mineral or vegetable" stage of this journey. Thank you, Kathleen


I have implemented the Crystal Reports and ROR integration for my application. Please visit my blog for the steps and see whether that info is helpful.