How to use Crystal Reports without a tightly-linked DB connection?

前端 未结 2 1051
悲&欢浪女
悲&欢浪女 2020-12-19 15:16

I\'m learning to use Crystal Reports (with VB 2005).

Most of what I\'ve seen so far involves slurping data directly from a database, which is fine if that\'s all you

2条回答
  •  天涯浪人
    2020-12-19 16:18

    I'm loading the report by filename and it is working perfect:

    //........
    
    ReportDocument StockObjectsReport;
    
    string reportPath = Server.MapPath("StockObjectsReport.rpt");
    
    StockObjectsReport.Load(reportPath);
    
    StockObjectsReport.SetDataSource(stockValues);
    
    //Export PDF To Disk
    
    string filePath = Server.MapPath("StockObjectsReport.pdf");
    
    StockObjectsReport.ExportToDisk(ExportFormatType.PortableDocFormat, filePath);
    

提交回复
热议问题