コード例 #1
0
    protected override void OnPreRenderComplete(EventArgs e)
    {
        base.OnPreRenderComplete(e);
        report = new ReportHelper(Fn.ToString(Request["url"]));
        report.Format = ReportHelper.HTMLFORMAT;
        report.AddReportParameter("IsHTMLFormat", report.IsHTMLFormat());

        for (int i = 0; i < Request.QueryString.Count; i++)
        {
            if (Fn.ToString(Request.QueryString.Keys[i]) != "url")
            {
                if (Server.UrlDecode(Fn.ToString(Request.QueryString[i])) != "")
                {
                    if (Fn.ToString(Request.QueryString.Keys[i]).Substring(0, 3) == "INT")
                    {
                        report.AddReportParameter(Fn.ToString(Request.QueryString.Keys[i]).Substring(4), Fn.ToInt(Request.QueryString[i]));
                    }
                    else if (Fn.ToString(Request.QueryString.Keys[i]).Substring(0, 3) == "CHA")
                    {
                        report.AddReportParameter(Fn.ToString(Request.QueryString.Keys[i]).Substring(4), Fn.ToString(Request.QueryString[i]));
                    }
                    else if (Fn.ToString(Request.QueryString.Keys[i]).Substring(0, 3) == "BOL")
                    {
                        report.AddReportParameter(Fn.ToString(Request.QueryString.Keys[i]).Substring(4), Fn.ToBoolean(Request.QueryString[i]));
                    }
                }
            }
        }

        report.RenderHTML();
    }