示例#1
0
        /// <summary>
        /// Reports the drill down ledger report.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="eParam">The e parameter.</param>
        private void ReportDrillDownLedgerReport(object sender, DrilldownReportParam eParam)
        {
            try
            {
                var pageIndex = ReportSharpTool.oPreviewForm.ReportViewer.PageIndex;
                ReportTool.DrillDownReport(sender, eParam);

                //var zoom = ReportSharpTool.PreviewForm.ReportViewer.Zoom;
                //var templateFile = ReportSharpTool.ReportSlot.FilePath;
                //ReportSharpTool.ReportSlot.FilePath = ReportSharpTool.ReportFileName;
                //ReportSharpTool.ReportSlot.Document = ReportSharpTool.ReportSlot.LoadReport();

                //ReportSharpTool.RefreshInfo(ReportSharpTool.ReportSlot.Document);

                //ReportSharpTool.ReportSlot.FilePath = templateFile;
                //ReportSharpTool.ReportSlot.SaveReport(ReportSharpTool.ReportSlot.Document);
                //ReportSharpTool.ReportSlot.RenderDocument();


                //ReportSharpTool.PreviewForm.ReportViewer.Actions["RefreshReport"].ExecuteAction();

                //var reportFileName = ReportSharpTool.ReportFileName;
                //ReportSharpTool.PreviewForm.Text = ReportSharpTool.ReportTitle + @"  [" + reportFileName.Substring((reportFileName.LastIndexOf("\\", StringComparison.Ordinal) + 1),
                //                                                              ((reportFileName.Length - reportFileName.LastIndexOf("\\", StringComparison.Ordinal)) - 1)) +
                //                                                          @"] - Xem báo cáo";
                ////ReportSharpTool.PreviewForm.ReportViewer.Zoom = zoom;
                //ReportSharpTool.oPreviewForm.ReportViewer.PageIndex = pageIndex;
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show("Có lỗi xảy ra trong quá trình truy vấn dữ liệu!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
示例#2
0
 /// <summary>
 /// Reports the drill down voucher.
 /// </summary>
 /// <param name="refType">The reftype.</param>
 /// <param name="refId">The refid.</param>
 private void ReportDrillDownVoucher(string refType, string refId)
 {
     GlobalVariable.IsViewVoucher = false;
     try
     {
         var pageIndex = ReportSharpTool.oPreviewForm.ReportViewer.PageIndex;
         ReportTool.DrillDownReportVoucher(refType, refId);
         //AnhNT disable đoạn dưới để không refresh báo cáo
         //ReportSharpTool.PreviewForm.ReportViewer.Actions["RefreshReport"].ExecuteAction();
         //var reportFileName = ReportSharpTool.ReportFileName;
         //ReportSharpTool.PreviewForm.Text = ReportSharpTool.ReportTitle + @"  [" + reportFileName.Substring((reportFileName.LastIndexOf("\\", StringComparison.Ordinal) + 1),
         //                                                              ((reportFileName.Length - reportFileName.LastIndexOf("\\", StringComparison.Ordinal)) - 1)) +
         //                                                          @"] - Xem báo cáo";
         //ReportSharpTool.oPreviewForm.ReportViewer.PageIndex = pageIndex;
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show("Có lỗi xảy ra trong quá trình truy vấn dữ liệu!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }