[クリスタルレポート]PUSHとPULLモード


HTML:
"C#" AutoEventWireup="true" CodeBehind="PurInvoiceRpt.aspx.cs" Inherits="DzPlatForm.ERP.FIN.PurInvoiceRpt" %>

"CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" namespace="CrystalDecisions.Web" tagprefix="CR" %>



<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>title>
head>
<body>
    <form id="form1" runat="server">
        <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" 
            AutoDataBind="True" GroupTreeImagesFolderUrl="" Height="50px" 
            ReportSourceID="CrystalReportSource1" ToolbarImagesFolderUrl="" 
            ToolPanelWidth="200px" Width="903px" ToolPanelView="None"  />
        <CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
"..\..\Report\PurInvoice.rpt">
            --%>
        CR:CrystalReportSource>

    form>
body>
html>

CS:
 DataSet ds = new DataSet();
            ds = SqlHelper.ExecuteDataset(db.StringConnection(), CommandType.StoredProcedure, "DZ_PurInvoice", parms);
            //push  
            if (ds != null)
            {

                CrystalDecisions.CrystalReports.Engine.ReportDocument doc = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
                string reportPath = Server.MapPath("..\\..\\Report\\PurInvoice.rpt");
                doc.Load(reportPath);
                doc.SetDataSource(ds.Tables[0].DefaultView);
                CrystalReportViewer1.Width = 1200;
                CrystalReportViewer1.ID = TA001+TA002;
                CrystalReportViewer1.ReportSource = doc;


            }
            else
            {
                JScript.Alert(" ", this.Page);
            }

            //pull  
            //CrystalReportSource1.ReportDocument.SetDatabaseLogon("sa", "Supper99", "192.168.1.99", "ZM");
            //CrystalReportSource1.ReportDocument.SetParameterValue("@TA001", TA001);
            //CrystalReportSource1.ReportDocument.SetParameterValue("@TA002", TA002);
            //CrystalReportSource1.DataBind();