0

こんにちは、Web アプリケーションの Crystal レポートは初めてです。次のように、Web アプリケーションから Crystal レポートを呼び出しています。

  private void AbreVisorReportesDict(int iIdRatificacion)
    {
        Response.Write(
            "<script type='text/javascript'>detailedresults=window.open('http://portalrpt/reportes/default.aspx?rep=SIDRJF/Dictamen.rpt&mod=116');</script>");
    }

しかし、レポートがそのフィールドに対応するように、URL で iIdRatificacion を渡す方法がわかりません。

助けてください。

4

1 に答える 1

0

コード ビハインドでレポート ビューアー コントロールのプロパティを設定するためのより良い方法があります

その記事の例:

protected void Page_Load(オブジェクト送信者, EventArgs e)
    {
        ReportDocument CrystalReport = 新しい ReportDocument();
        CrystalReport.Load(Server.MapPath("CrystalReport.rpt"));
        CrystalReport.SetDatabaseLogon
            ("amit", "パスワード", @"AMIT\SQLEXPRESS", "TestDB");
        CrystalReportViewer1.ReportSource = CrystalReport;
    }

そのようにしたくない場合は、独自のクエリ文字列からパラメーターを読み取って、新しい文字列を形成することができます

string mod = Request.QueryString["mod"]

出力で使用します。

于 2011-12-08T20:01:57.247 に答える