Ruby Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesRuby Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old October 16th, 2006, 11:57 AM
SnowWhite's Avatar
SnowWhite SnowWhite is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 79 SnowWhite User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 h 25 m 46 sec
Reputation Power: 4
ROR and 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!

Reply With Quote
  #2  
Old October 16th, 2006, 10:20 PM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Nov 2001
Location: Glendale, Los Angeles County, California, USA
Posts: 7,430 Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 4 Weeks 1 Day 21 h 41 m 55 sec
Reputation Power: 784
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.
__________________
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne

Puzzle of the Month solved by sizeablegrin, etienne141 and L7Sqr, superior C/C++ programmers of the month

Reply With Quote
  #3  
Old June 8th, 2007, 09:11 AM
i_programmer i_programmer is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2007
Posts: 1 i_programmer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 47 m 59 sec
Reputation Power: 0
ROR and Crystal Report Viewer

Quote:
Originally Posted by Scorpions4ever
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.


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?

sumeet chadddha

Reply With Quote
  #4  
Old June 8th, 2007, 05:34 PM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Nov 2001
Location: Glendale, Los Angeles County, California, USA
Posts: 7,430 Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 4 Weeks 1 Day 21 h 41 m 55 sec
Reputation Power: 784
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>

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesRuby Programming > ROR and Crystal Report Viewer?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway