IT Community - Software Programming, Web Development and Technical Support

Crystal Report Viewer

This is a discussion on Crystal Report Viewer within the Ruby forums, part of the Web Development category; I have written an application in ROR, and have now come to the reporting piece. Reports will be written in ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > Ruby

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 10-12-2007, 11:23 PM
S.Vinothkumar S.Vinothkumar is offline
D-Web Genius
 
Join Date: May 2007
Posts: 1,061
S.Vinothkumar is on a distinguished road
Question Crystal Report Viewer

I have written an application in ROR, and have now come to the reporting piece. Reports will be written in Crystal and I'm wondering if ROR will allow me to utilize the Crystal Reports Viewer. Has anyone had any experience with this? Any opinions or advice always appreciated!

Thank you!
__________________
S.VinothkumaR
Behind me is infinite power,
Before me is Endless Possibility,
Around me is Boundless Opportunity,
Why should I fear!
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-15-2007, 10:43 PM
krishnakumar krishnakumar is offline
D-Web Analyst
 
Join Date: May 2007
Posts: 206
krishnakumar is on a distinguished road
Smile Re: Crystal Report Viewer

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.
__________________
Krishnakumar.S
Beware of Everything -that is un true; stick to the Truth shall succeed slowly but steadily
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-15-2007, 11:29 PM
amansundar amansundar is offline
D-Web Analyst
 
Join Date: May 2007
Posts: 320
amansundar is on a distinguished road
Default Re: Crystal Report Viewer

My reports use xml schemas (xsd) and they get fed at runtime using .net dataset. I know this is possible in .net but how is it possible in ROR? How is the xml data fed to these reports in Ruby. Plus what about the report viewer?
__________________
cheers
Aman
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 10-16-2007, 04:35 AM
krishnakumar krishnakumar is offline
D-Web Analyst
 
Join Date: May 2007
Posts: 206
krishnakumar is on a distinguished road
Smile Re: Crystal Report Viewer

If you're using RoR, the part that gets the data should be a method in the model/ directory. For instance:
Code:
class MyData < ActiveRecord::Base
   def self.getmydata(key)
       find(:all, :conditions => ["field1 = ?", key])
   end
end
Then, your controller class would look something like this:

Code:
class mycontroller < ActionController
   def xml_output
       id = params[:id]
       @data = MyData.getmydata(id)
   end
end
and your view template for xml_output.rhtml could look something like this,

Code:
<data>
    <% for item in @data %>
    <item>
        <id><%= item.id %></id>
        <name><%= h(item.name) %></name>
        <desc><%= h(item.desc) %></desc>
    </item>
    <% end %>
</data>
__________________
Krishnakumar.S
Beware of Everything -that is un true; stick to the Truth shall succeed slowly but steadily
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal Report Issues Sundaram ASP and ASP.NET Programming 0 03-10-2008 01:53 AM
crystal reports dips ASP and ASP.NET Programming 0 10-07-2007 05:00 AM
Export to Excel option is not working in Crystal Report with service pack 2 tsureshk ASP and ASP.NET Programming 1 10-06-2007 02:57 AM
Implementing Crystal Report in Web Application oxygen C# Programming 0 07-15-2007 10:40 PM
Crystal Report in Vb.net ewriter VB.NET Programming 1 04-24-2007 07:01 AM


All times are GMT -7. The time now is 09:28 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0