C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






Load Crystal Reports from File


Posted Date: 27 Jul 2008    Resource Type: Code Snippets    Category: Crystal Reports

Posted By: David Bergman       Member Level: Bronze
Rating:     Points: 8



This code sample will show how to load a crystal report (.rpt) file that is saved on a local drive instead of embedded. The advantage to this is the program does not need to be re-compiled each time a report is modifed. Also, the .rpt can be upload from the application and stored in a database and then written to file. Do not embed the .rpt file when using this method.


using System;using CrystalDecisions.CrystalReports.Engine;using CrystalDecisions.Shared;namespace Report
{ public partial class Report : Document
{ public void ReportLoad()
{ ReportDocument reportDocument = new ReportDocument();
string filePath = "C:\Projects\Application\Report\CrystalReport.rpt"; reportDocument.Load(filePath);
crystalReportViewer.ReportSource = reportDocument;
}
}}




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Reports  .  Load from file  .  Load Crystal Reports from File  .  Crystal Reports  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: show reports (using stored procedure)
Previous Resource: Crystal report connection code sample
Return to Discussion Resource Index
Post New Resource
Category: Crystal Reports


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

teleconferencing

Contact Us    Privacy Policy    Terms Of Use