Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Pull .rpt from database Post Reply Post New Topic
Author Message
rushelp
Newbie
Newbie


Joined: 25 Jun 2012
Online Status: Offline
Posts: 19
Quote rushelp Replybullet Topic: Pull .rpt from database
    Posted: 10 Jul 2012 at 6:48am
Is there anyway to save my crystal report files to database(SQL Server) and then pull it from database to show it in the crystal report viewer?

Edited by rushelp - 10 Jul 2012 at 6:54am
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 10 Jul 2012 at 7:16am
Not without saving it as a .rpt file and then loading it.
 
-Dell
IP IP Logged
rushelp
Newbie
Newbie


Joined: 25 Jun 2012
Online Status: Offline
Posts: 19
Quote rushelp Replybullet Posted: 10 Jul 2012 at 7:26am
Any examples by any chance? I couldn't find any.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 10 Jul 2012 at 8:39am

Assuming you're working in VisualStudio and not in Java, I would do something like the following:

1. Create a FileStream

2.  Stream the contents of the db field containing the report out to a .rpt file.
 
3.  Create a ReportDocument.
 
4.  Use ReportDocument.Load to load the file you just saved.
 
5.  Set the ReportSource of the viewer to the ReportDocument.
 
6.  View the report.
 
-Dell
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.