Esempio n. 1
0
    /// <summary>
    /// 引导单批量打印
    /// </summary>
    private void BuildIntroductionListReport()
    {
        WebReport1.ReportFile = Server.MapPath("IntroductionListReport.frx");
        DateTime?RegisterDate = null;

        if (!String.IsNullOrWhiteSpace(Request.Params["RegisterDate"]))
        {
            RegisterDate = Convert.ToDateTime(Request.Params["RegisterDate"]);
        }
        String DeptName = HttpUtility.UrlDecode(Request.Params["DeptName"]);
        List <RegistrationViewEntity> Registrations = m_Registration.GetRegistrationForReport(RegisterDate, DeptName);
        //Registrations.Add(Registration);
        List <Package>   Packages   = new List <Package>();
        List <GroupItem> GroupItems = new List <GroupItem>();

        foreach (RegistrationViewEntity Registration in Registrations)
        {
            Packages.AddRange(GetPackageItems(Registration.RegisterNo, Registration.PackageID.Value));
            GroupItems.AddRange(GetGroupItems(Registration.RegisterNo, Registration.PackageID.Value));
        }
        //List<Package> Packages = GetPackageItems(Registration.PackageID.Value);
        //List<GroupItem> GroupItems = GetGroupItems(Registration.PackageID.Value);
        WebReport1.Report.RegisterData(Registrations, "Registration");
        WebReport1.Report.RegisterData(Packages, "Packages");
        WebReport1.Report.RegisterData(GroupItems, "ItemGroups");
        WebReport1.Prepare();
    }
Esempio n. 2
0
 protected void doReport(string reportpath)
 {
     WebReport1.Width      = 1290;
     WebReport1.Height     = 600;
     WebReport1.ReportFile = @reportpath;
     WebReport1.Prepare();
 }
Esempio n. 3
0
    private void BuildIntroductionsReport()
    {
        List <String> List = (List <String>)Session["Registrations"];

        if (List == null)
        {
            return;
        }
        WebReport1.ReportFile = Server.MapPath("IntroductionListReport.frx");
        List <RegistrationViewEntity> Registrations = new List <RegistrationViewEntity>();

        foreach (String RegisterNo in List)
        {
            Registrations.Add(m_Registration.GetRegistration(RegisterNo));
        }
        List <Package>   Packages   = new List <Package>();
        List <GroupItem> GroupItems = new List <GroupItem>();

        foreach (RegistrationViewEntity Registration in Registrations)
        {
            Packages.AddRange(m_ReportUtil.GetPackageItems(Registration.RegisterNo, Registration.PackageID.Value));
            GroupItems.AddRange(m_ReportUtil.GetGroupItems(Registration.RegisterNo, Registration.PackageID.Value));
        }
        WebReport1.Report.RegisterData(Registrations, "Registration");
        WebReport1.Report.RegisterData(Packages, "Packages");
        WebReport1.Report.RegisterData(GroupItems, "ItemGroups");
        WebReport1.Prepare();
        Session.Remove("Registrations");
    }
Esempio n. 4
0
        /* 用该方法需要在 WebConfig里增加以下代码
         * <assemblies>
         *  <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
         * </assemblies>
         */

        private void Method1()
        {
            WebReport1.ReportFile  = @"BatchPurchase.frx";
            WebReport1.RtfAutoSize = true;
            WebReport1.AutoHeight  = true;
            WebReport1.AutoWidth   = true;
            WebReport1.Prepare();
        }
Esempio n. 5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Version.Text = "ver." + Config.Version;
     if (WebReport1.ReportFile == String.Empty)
     {
         if (LeftMenu.Items.Count > 0)
         {
             MenuItem item = LeftMenu.Items[0].ChildItems[0];
             item.Selected         = true;
             WebReport1.ReportFile = item.Value;
             WebReport1.Prepare();
         }
     }
 }
Esempio n. 6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Session["CurrLoginUser"] != null)
         {
             WebReport1.ReportFile = @".\\Report\\赵重路日运行报表.frx";
             WebReport1.Prepare();
         }
         else
         {
             Response.Write("<script>alert('请登录!');window.location.href='../web/login.html'</script>");
         }
     }
 }
Esempio n. 7
0
    /// <summary>
    /// 个人体检引导单打印
    /// </summary>
    /// <param name="RegisterNo"></param>
    private void BuildIntroductionReport(String RegisterNo)
    {
        WebReport1.ReportFile = Server.MapPath("IntroductionReport.frx");
        RegistrationViewEntity        Registration  = m_Registration.GetRegistration(RegisterNo);
        List <RegistrationViewEntity> Registrations = new List <RegistrationViewEntity>();

        Registrations.Add(Registration);
        List <Package>   Packages   = m_ReportUtil.GetPackageItems(RegisterNo, Registration.PackageID.Value);
        List <GroupItem> GroupItems = m_ReportUtil.GetGroupItems(RegisterNo, Registration.PackageID.Value);

        WebReport1.Report.RegisterData(Registrations, "Registration");
        WebReport1.Report.RegisterData(Packages, "Packages");
        WebReport1.Report.RegisterData(GroupItems, "ItemGroups");
        WebReport1.Prepare();
    }
Esempio n. 8
0
    //科室医生工作量查询
    public void BuildSearch_workload_checkItem()
    {
        Report a = new Report();

        a.Load(Server.MapPath("workload_checkItem.frx"));


        Maticsoft.BLL.Search.Search bll = new Maticsoft.BLL.Search.Search();

        string sqlw = " 1=1 ";

        if (Request.Params["DeptID"] != "")
        {
            sqlw += string.Format("  And A.DeptID = '{0}' ", Request.Params["DeptID"]);
        }

        if (Request.Params["CheckDoctor"] != "")
        {
            sqlw += string.Format("  And B.CheckDoctor= '{0}' ", Request.Params["CheckDoctor"]);
        }

        if (Request.Params["StartDate"] != "")
        {
            sqlw += string.Format(" And  A.CheckDate>='{0}' ", Convert.ToDateTime(Request.Params["StartDate"]));
        }

        if (Request.Params["EndDate"] != "")
        {
            sqlw += string.Format("  And A.CheckDate<'{0}' ", Convert.ToDateTime(Request.Params["EndDate"]).AddDays(1));
        }

        DataSet ds = bll.GetList_workload_checkItem(sqlw);

        a.SetParameterValue("CheckDoctor", Request.Params["CheckDoctor"]);

        a.SetParameterValue("DeptName", Request.Params["DeptName"]);
        a.SetParameterValue("StartDate", Request.Params["StartDate"]);
        a.SetParameterValue("EndDate", Request.Params["EndDate"]);
        a.RegisterData(ds.Tables[0], "workload_checkItem");
        WebReport1.Report = a;

        WebReport1.Prepare();
    }
Esempio n. 9
0
    /// <summary>
    /// 体检报告打印
    /// </summary>
    /// <param name="RegisterNo"></param>
    private void BuildCheckReport(String RegisterNo)
    {
        WebReport1.ReportFile = Server.MapPath("CheckReport.frx");
        //WebReport1.Report.RegisterData(GetBarCodes(RegisterNo), "BarCodes");
        RegistrationViewEntity        Registration  = m_Registration.GetRegistration(RegisterNo);
        List <RegistrationViewEntity> Registrations = new List <RegistrationViewEntity>();

        Registrations.Add(Registration);
        List <GroupItemResult> GroupItemResults = m_ReportUtil.GetGroupResults(RegisterNo);
        List <ItemResult>      ItemResults      = new List <ItemResult>();

        foreach (GroupItemResult GroupResult in GroupItemResults)
        {
            ItemResults.AddRange(m_ReportUtil.GetItemResults(RegisterNo, GroupResult.GroupID));
        }
        WebReport1.Report.RegisterData(Registrations, "Registration");
        WebReport1.Report.RegisterData(GroupItemResults, "ItemGroupResult");
        WebReport1.Report.RegisterData(ItemResults, "ItemResult");
        WebReport1.Prepare();
    }
Esempio n. 10
0
    /// <summary>
    /// 体检单位-体检结果综述(汇总)
    /// </summary>
    /// <param name="RegisterNo"></param>
    public void BuildUnit_jieguozhongshu()
    {
        Report a = new Report();

        a.Load(Server.MapPath("unit_Jieguozhongshu.frx"));

        Maticsoft.BLL.BaseInfo.BaseInfo bll = new Maticsoft.BLL.BaseInfo.BaseInfo();

        string sqlw = " 1=1 ";

        if (Request.Params["DeptName"] != "")
        {
            sqlw += string.Format("  And DeptName like '{0}%' ", Request.Params["DeptName"]);
        }


        if (Request.Params["StartDate"] != "")
        {
            sqlw += string.Format(" And  RegisterDate>='{0}' ", Convert.ToDateTime(Request.Params["StartDate"]));
        }

        if (Request.Params["EndDate"] != "")
        {
            sqlw += string.Format("  And RegisterDate<'{0}' ", Convert.ToDateTime(Request.Params["EndDate"]).AddDays(1));
        }


        DataTable dt = bll.GetList_Table("registrationview", sqlw).Tables[0];

        a.SetParameterValue("RowsCunt", dt.Rows.Count);

        a.RegisterData(dt, "Main");

        WebReport1.Report = a;
        WebReport1.Prepare();
    }
Esempio n. 11
0
    /// <summary>
    /// 引导单批量打印
    /// </summary>
    private void BuildIntroductionListReport()
    {
        WebReport1.ReportFile = Server.MapPath("IntroductionListReport.frx");
        DateTime StartDate = DateTime.Now.Date;
        DateTime EndDate   = DateTime.Now.Date;

        if (!String.IsNullOrWhiteSpace(Request.Params["StartDate"]))
        {
            StartDate = Convert.ToDateTime(Request.Params["StartDate"]);
        }
        if (!String.IsNullOrWhiteSpace(Request.Params["EndDate"]))
        {
            EndDate = Convert.ToDateTime(Request.Params["EndDate"]);
        }
        String DeptName    = HttpUtility.UrlDecode(Request.Params["DeptName"]);
        int    RecordCount = 0;
        List <RegistrationViewEntity> Registrations = m_Registration.GetGroupRegistrations(1, 1000,
                                                                                           StartDate, EndDate, DeptName, out RecordCount);
        //Registrations.Add(Registration);
        List <Package>   Packages   = new List <Package>();
        List <GroupItem> GroupItems = new List <GroupItem>();

        foreach (RegistrationViewEntity Registration in Registrations)
        {
            Packages.AddRange(m_ReportUtil.GetPackageItems(Registration.RegisterNo, Registration.PackageID.Value));
            GroupItems.AddRange(m_ReportUtil.GetGroupItems(Registration.RegisterNo, Registration.PackageID.Value));
        }
        //List<Package> Packages = GetPackageItems(Registration.PackageID.Value);
        //List<GroupItem> GroupItems = GetGroupItems(Registration.PackageID.Value);
        WebReport1.Report.RegisterData(Registrations, "Registration");
        WebReport1.Report.RegisterData(Packages, "Packages");
        WebReport1.Report.RegisterData(GroupItems, "ItemGroups");
        WebReport1.Prepare();
        //WebReport1.Report.PrintSettings.ShowDialog = false;
        //WebReport1.Report.Print();
    }
Esempio n. 12
0
 protected void LeftMenu_MenuItemClick(object sender, MenuEventArgs e)
 {
     WebReport1.ReportFile = e.Item.Value;
     WebReport1.Prepare();
 }
Esempio n. 13
0
    //组合查询
    public void BuildSearch_Composed()
    {
        Report a = new Report();

        a.Load(Server.MapPath("Search_Composed.frx"));


        Maticsoft.BLL.Search.Search bll = new Maticsoft.BLL.Search.Search();

        bool   blDate = true;
        string sqlw   = " 1=1 ";

        if (Request.Params["RegisterNo"] != "")
        {
            sqlw  += string.Format("  And RegisterNo like '%{0}%' ", Request.Params["RegisterNo"]);
            blDate = false;
        }

        if (Request.Params["DeptName"] != "")
        {
            sqlw  += string.Format("  And DeptName like '%{0}%' ", Request.Params["DeptName"]);
            blDate = false;
        }
        if (Request.Params["Name"] != "")
        {
            sqlw  += string.Format("  And Name like '%{0}%' ", Request.Params["Name"]);
            blDate = false;
        }

        if (Request.Params["IdNumber"] != "")
        {
            sqlw  += string.Format("  And IdNumber like '{0}%' ", Request.Params["IdNumber"]);
            blDate = false;
        }
        if (Request.Params["OverallDoctor"] != "")
        {
            sqlw  += string.Format("  And OverallDoctor like '{0}%' ", Request.Params["OverallDoctor"]);
            blDate = false;
        }

        if (blDate)
        {
            if (Request.Params["StartDate"] != "")
            {
                sqlw += string.Format(" And  RegisterDate>='{0}' ", Convert.ToDateTime(Request.Params["StartDate"]));
            }

            if (Request.Params["EndDate"] != "")
            {
                sqlw += string.Format("  And RegisterDate<'{0}' ", Convert.ToDateTime(Request.Params["EndDate"]).AddDays(1));
            }
        }

        sqlw += " order by RegisterNo Desc";

        DataSet ds = bll.GetList_Composed(sqlw);

        a.SetParameterValue("RegisterNo", Request.Params["RegisterNo"]);
        a.SetParameterValue("DeptName", Request.Params["DeptName"]);
        a.SetParameterValue("Name", Request.Params["Name"]);
        a.SetParameterValue("IdNumber", Request.Params["IdNumber"]);

        a.SetParameterValue("pOverallDoctor", Request.Params["OverallDoctor"]);
        a.SetParameterValue("StartDate", Request.Params["StartDate"]);
        a.SetParameterValue("EndDate", Request.Params["EndDate"]);
        a.RegisterData(ds.Tables[0], "View_Search_Composed");
        WebReport1.Report = a;
        //WebReport1.Report.RegisterData(ds.Tables[0], "View_Search_Composed");
        //WebReport1.Report.SetParameterValue("registerNo", Request.Params["RegisterNo"].ToString());
        // WebReport1.Report.SetParameterValue("pOverallDoctor", "wsw");

        WebReport1.Prepare();
    }
Esempio n. 14
0
    /// <summary>
    /// 体检单位-体检疾病统计表(汇总)
    /// </summary>
    /// <param name="RegisterNo"></param>
    public void BuildUnit_Disease_sum()
    {
        Report a = new Report();

        a.Load(Server.MapPath("unit_disease_sum.frx"));

        Maticsoft.BLL.UnitReport.UnitReport bll = new Maticsoft.BLL.UnitReport.UnitReport();

        string sqlw = " 1=1 ";

        if (Request.Params["DeptName"] != "")
        {
            sqlw += string.Format("  And DeptName like '{0}%' ", Request.Params["DeptName"]);
        }


        if (Request.Params["StartDate"] != "")
        {
            sqlw += string.Format(" And  RegisterDate>='{0}' ", Convert.ToDateTime(Request.Params["StartDate"]));
        }

        if (Request.Params["EndDate"] != "")
        {
            sqlw += string.Format("  And RegisterDate<'{0}' ", Convert.ToDateTime(Request.Params["EndDate"]).AddDays(1));
        }


        DataTable dt1 = bll.GetUnitDiseasesumMain(sqlw).Tables[0];
        DataTable dt2 = bll.GetUnitDiseasesumSub(sqlw).Tables[0];

        dt2.Columns.Add(new DataColumn("DeptName", typeof(string)));
        dt2.Columns.Add(new DataColumn("NanNum", typeof(int)));
        dt2.Columns.Add(new DataColumn("NvNum", typeof(int)));
        dt2.Columns.Add(new DataColumn("RenNum", typeof(int)));
        dt2.Columns.Add(new DataColumn("Bili", typeof(string)));

        if (dt1.Rows.Count > 0)
        {
            for (int i = 0; i < dt2.Rows.Count; i++)
            {
                dt2.Rows[i]["DeptName"] = dt1.Rows[0]["DeptName"];
                dt2.Rows[i]["NanNum"]   = dt1.Rows[0]["NanNum"];
                dt2.Rows[i]["NvNum"]    = dt1.Rows[0]["NvNum"];
                dt2.Rows[i]["RenNum"]   = Convert.ToInt32(dt1.Rows[0]["NvNum"]) + Convert.ToInt32(dt1.Rows[0]["NanNum"]);

                if (Convert.ToInt32(dt2.Rows[i]["num"]) != 0)
                {
                    dt2.Rows[i]["Bili"] = (Convert.ToInt32(dt2.Rows[i]["num"]) / Convert.ToDecimal(dt2.Rows[i]["RenNum"]) * 100).ToString("##.##") + '%';
                }
                else
                {
                    dt2.Rows[i]["Bili"] = "";
                }
            }
        }
        a.SetParameterValue("dates", Request.Params["StartDate"]);

        a.SetParameterValue("dateE", Request.Params["EndDate"]);

        a.RegisterData(dt2, "disease");

        WebReport1.Report = a;
        WebReport1.Prepare();
    }