尝试将水晶报表上显示的报表导出为PDF文件

时间:2020-03-19 12:51:45

标签: c# pdf crystal-reports export criteria

我的报告数据根据用户选择的标准而变化吗?

private void ToPDFfile()
{
    ReportDocument cryRpt = new ReportDocument();
    cryRpt.Load("Here i want to set crystal report path"); // here I want to select my crystal report path

    crystalReportViewer1.ReportSource = cryRpt;
    crystalReportViewer1.Refresh();
    cryRpt.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, 
         @"D:\ASD.pdf"); // this is where i want to save my pdf
        MessageBox.Show("Exported Successful");       
}

这是我的代码,当我为包含固定数据的报告设置路径时可以使用,但是我想从Crystal报告中转换数据。

0 个答案:

没有答案
相关问题