Пример #1
0
        private DataTable DealTOCViewEX(OnlineResultEx objOnlineEx)
        {
            DataTable dtTOC = new DataTable("ds2");

            dtTOC.Columns.Add("TestNum", typeof(String));
            dtTOC.Columns.Add("TestDate", typeof(String));
            dtTOC.Columns.Add("DeviceName", typeof(String));
            dtTOC.Columns.Add("TestOperate", typeof(String));
            dtTOC.Columns.Add("ChannelSum", typeof(String));
            dtTOC.Columns.Add("TestTimes", typeof(String));
            DataRow dr = dtTOC.NewRow();

            dr["TestNum"]     = objOnlineEx.m_strTestNum;
            dr["TestDate"]    = objOnlineEx.m_strTestDate;
            dr["DeviceName"]  = objOnlineEx.m_strDeviceName;
            dr["TestOperate"] = objOnlineEx.m_strTestOperate;
            dr["ChannelSum"]  = objOnlineEx.m_strChannelSum;
            dr["TestTimes"]   = objOnlineEx.m_strTestTimes;
            dtTOC.Rows.Add(dr);
            return(dtTOC);
        }
Пример #2
0
        private void ViewReport(string strTOCValue, string strICValue, string strTime, OnlineResultEx objOnlineEx)
        {
            try
            {
                this.m_reHList.Reset();
                this.m_reHList.LocalReport.ReportEmbeddedResource = "TOCTest.rdlc.rdOnlineReport.rdlc";
                this.m_reHList.LocalReport.DataSources.Clear();
                this.m_reHList.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSetOnline", DealTOCViewEX(objOnlineEx)));
                this.m_reHList.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSetTOCOnline", DealTOCView(strTOCValue, strICValue, strTime)));

                this.m_reHList.RefreshReport();
                //// 将显示 mode切换到print布局 mode
                this.m_reHList.SetDisplayMode(DisplayMode.Normal);
                // 将缩放 modesetting为百分比
                this.m_reHList.ZoomMode = ZoomMode.Percent;

                // 设为 100%
                this.m_reHList.ZoomPercent = 75;
            }
            catch (Exception ex)
            {
                utils.loghelp.log.Error(ex.Message, ex);
            }
        }