下载电子书籍吧,到GOOGLE去搜一下吧

解决方案 »

  1.   

    see:
    http://www.microsoft.com/china/community/Column/26.mspx
      

  2.   

    做水晶报表不难,就是画报表的时候麻烦些。
    给你个报表打印代码:
    // 导出报表
    private void ExportReport(string OptionStr)
    {

    string ExportPath;

    ExportPath = Request.PhysicalApplicationPath + "Exported\\";
    if (Directory.Exists(ExportPath) == false) Directory.CreateDirectory(Request.PhysicalApplicationPath + "Exported\\");    
    ReportDocument crReportDocument = (ReportDocument)Session["ReportDocument"];
    DiskFileDestinationOptions crDiskFileDestinationOptions = new DiskFileDestinationOptions();
    ExportOptions crExportOptions = crReportDocument.ExportOptions; if (OptionStr == "Portable Document (PDF)")
    {
    crDiskFileDestinationOptions.DiskFileName = ExportPath + "PortableDoc.pdf";
    crExportOptions.DestinationOptions = crDiskFileDestinationOptions;
    crExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
    crExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat; }
    else if (OptionStr == "MS Word (DOC)")
    {
    crDiskFileDestinationOptions.DiskFileName = ExportPath + "Word.doc";
    crExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
    crExportOptions.ExportFormatType = ExportFormatType.WordForWindows;
    crExportOptions.DestinationOptions = crDiskFileDestinationOptions; //--------------------------------------------------------------------
    }

    try
    {
    // Export the report
    crReportDocument.Export();
    crReportDocument.Close();
    Response.ClearContent();
    Response.ClearHeaders();
    switch(OptionStr)
    {
    case "Portable Document (PDF)":
    Response.ContentType="application/pdf";
    Response.WriteFile(ExportPath + "PortableDoc.pdf");
    break;
    case "MS Word (DOC)":
    Response.ContentType="application/msword";
    Response.WriteFile(ExportPath + "Word.doc");
    break;

    //string strFile ="report" + System.DateTime.Now.Ticks.ToString() +".xls";
    Response.Flush();
    Response.Close();
    }
    catch (Exception err)
    {
    Response.Write("<BR>");
    Response.Write(err.Message.ToString());
    }
    }
    你可以把报表导到PDF中或WORD中打印,效果不错