crystal reports xi - How to load rpt file using c# in visual studio 2010? -


am using visual studio 2010 , trying load rpt file. have used following code.

reportdocument rpt = new reportdocument(); rpt.load("e:\\crystal reports docs\\crystal reports samples\\crosstab report"); 

then used isloaded() function check whether loaded.

when compile program, keeps on running.

any suggestions???

thanks in advance!!!!

here sample code how load crystal report (.rpt) file saved on local drive instead of embedded. advantage program not need re-compiled each time report modified. also, .rpt can upload application , stored in database , written file. not embed .rpt file when using 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;          }        }  } 

refer more about

http://scn.sap.com/thread/3312329

how load external crystal reports (2008) files in c#?


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -