本文整理汇总了C#中ReportPrintTool.ShowPreview方法的典型用法代码示例。如果您正苦于以下问题:C# ReportPrintTool.ShowPreview方法的具体用法?C# ReportPrintTool.ShowPreview怎么用?C# ReportPrintTool.ShowPreview使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ReportPrintTool
的用法示例。
在下文中一共展示了ReportPrintTool.ShowPreview方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetData
private void GetData(DateTime _fromDate,DateTime _toDate){
try {
var DataList = from items in _OperationRepository.GetAll().ToList()
where items.Date >= _fromDate && items.Date >= _toDate
orderby items.WorkstationNo
select items;
foreach (var pcs in DataList)
{
lstProduction.Add(new HourlyIndividualProduction { EmployeeID=pcs.EmployeeID, Name=GetEmployeeNameByID(pcs.EmployeeID), WorkstationNo=pcs.WorkstationNo,OperationNo=pcs.OperationNo,OperationName=pcs.OperationName,HourNo=pcs.HourNo,Efficiency=pcs.Efficiency,EarnSAH=pcs.SAH ,PCS=pcs.Pcs,Date=pcs.Date,StyleNo=pcs.StyleNo});
}
HourlyProductionByOperation report = new HourlyProductionByOperation();
report.DataSource = lstProduction;
ReportPrintTool tool = new ReportPrintTool(report);
report.PrintingSystem.Document.AutoFitToPagesWidth = 1;
tool.ShowPreview();
}
catch(Exception ex){
}
}
示例2: btnPrintByCustomer_Click
private void btnPrintByCustomer_Click(object sender, EventArgs e)
{
CustomersBO aCustomersBO = new CustomersBO();
Customers aCustomer = new Customers();
aCustomer = aCustomersBO.Select_ByID(int.Parse(loeListCustomer.EditValue.ToString()));
this.aNewPaymentEN = this.aNewPaymentEN.SlipPaymentByCustomer(aCustomer);
try
{
if (this.aNewPaymentEN.Status_BookingR == 8 || this.aNewPaymentEN.Status_BookingR == 7)
{
frmRpt_Payment_BookingRs afrmRpt_Payment_BookingRs = new frmRpt_Payment_BookingRs(this.aNewPaymentEN);
ReportPrintTool tool = new ReportPrintTool(afrmRpt_Payment_BookingRs);
tool.ShowPreview();
}
else
{
frmRpt_Payment_BookingRsUnPay afrmRpt_Payment_BookingRs = new frmRpt_Payment_BookingRsUnPay(this.aNewPaymentEN);
ReportPrintTool tool = new ReportPrintTool(afrmRpt_Payment_BookingRs);
tool.ShowPreview();
}
}
catch (Exception ex)
{
MessageBox.Show("frmTsk_ChoosePrintType.btnPrint_Click\n" + ex.ToString(), "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
示例3: Execute
public void Execute()
{
try
{
if(Prizm.Main.Common.DateExtension.CheckDiapason(viewModel.WeldDateFrom, viewModel.WeldDateTo))
{
viewModel.Data = repo.GetPipelineElements(viewModel.WeldDateFrom, viewModel.WeldDateTo);
if(viewModel.Data == null || viewModel.Data.Rows.Count <= 0)
log.Warn("Construction report: Data Table for Weld by Date report is NULL or empty");
var report = new WeldDateXtraReport();
report.DataSource = viewModel.WeldDateReportDataList;
report.FootersVisibility = viewModel.IsFooterVisible;
var tool = new ReportPrintTool(report);
tool.AutoShowParametersPanel = false;
tool.ShowPreview();
RefreshVisualStateEvent();
}
else
{
notify.ShowInfo(Program.LanguageManager.GetString(StringResources.Message_FailureReportDate),
Program.LanguageManager.GetString(StringResources.Message_FailureReportDateHeader));
log.Warn("Date limits not valid!" + "Diapason: start date= "
+ viewModel.WeldDateFrom.ToString() + " end date= " + viewModel.WeldDateTo.ToString());
}
}
catch(RepositoryException ex)
{
log.Warn(this.GetType().Name + " | " + ex.ToString());
notify.ShowWarning(Program.LanguageManager.GetString(StringResources.Notification_Error_Db_Message),
Program.LanguageManager.GetString(StringResources.Notification_Error_Db_Header));
}
}
示例4: Execute
public void Execute()
{
if (Prizm.Main.Common.DateExtension.CheckDiapason(viewModel.StartDate, viewModel.EndDate))
{
try
{
data = repo.GetPipesFromInspection(viewModel.StartDate, viewModel.EndDate);
IncomingReportsXtraReport report = new IncomingReportsXtraReport();
SetDataSortByColumn("number");
data.TranslateStatus<PartInspectionStatus>(SQLProvider.TableNameForInspectionReport, SQLProvider.ColumnNameForInspectionStatus, viewModel.localizedInspectionStatus);
report.DataSource = data;
report.FootersVisibility = viewModel.IsFooterVisible;
report.CreateDocument();
var tool = new ReportPrintTool(report);
tool.AutoShowParametersPanel = false;
tool.ShowPreview();
}
catch (RepositoryException ex)
{
log.Error(string.Concat(ex.InnerException.Message, ex.Message));
notify.ShowFailure(ex.InnerException.Message, ex.Message);
}
}
else
{
notify.ShowInfo(Program.LanguageManager.GetString(StringResources.Message_FailureReportDate),
Program.LanguageManager.GetString(StringResources.Message_FailureReportDateHeader));
log.Warn("Date limits not valid!" + "Diapason: start date= "
+ viewModel.StartDate.ToString() + " end date= " + viewModel.EndDate.ToString());
}
}
示例5: frmPrintBarcode
public frmPrintBarcode(frmPrintBarcode _barcode) {
try
{
InitializeComponent();
splashScreenManager1.ShowWaitForm();
this.pBarocde = _barcode;
sBundleTicket report = new sBundleTicket();
rptBarcodeList s = new rptBarcodeList();
OprationBarcodeList list = new OprationBarcodeList();
//report.SetDataSource(list.StickerBarcodeList(pBarocde.Options, pBarocde.CutNo, pBarocde.From, pBarocde.To));
//this.crystalReportViewer1.ReportSource = report;
BarcodeLabel lbl = new BarcodeLabel();
lbl.DataSource = list.StickerBarcodeList(pBarocde.Options, pBarocde.CutNo, pBarocde.From, pBarocde.To);
ReportPrintTool tool = new ReportPrintTool(lbl);
tool.ShowPreview();
splashScreenManager1.CloseWaitForm();
}catch(Exception ex)
{
MessageBox.Show(ex.Message);
Debug.WriteLine(ex.Message);
}
}
示例6: DoPrint
public static void DoPrint(string pono,bool t)
{
var dm = new PoDataManager();
var rpt = new RptPO();
if (t)
{
rpt.Watermark.Text = "Internal Copy";
}
else
{
rpt.Watermark.Text = "Supplier Copy";
dm.UpdatePrint(pono);
}
rpt.Watermark.TextDirection = DirectionMode.ForwardDiagonal;
rpt.Watermark.Font = new Font(rpt.Watermark.Font.FontFamily, 50);
rpt.Watermark.ForeColor = Color.Gray;
rpt.Watermark.TextTransparency = 150;
rpt.Watermark.ShowBehind = false;
rpt.Company = Utils.Companyname;
var ds = dm.DoPrint(pono);
rpt.DataSource = ds;
ReportPrintTool printTool = new ReportPrintTool(rpt);
// printTool.ShowPreviewDialog();
printTool.ShowPreview();
// rpt.Print();
}
示例7: Execute
public void Execute()
{
try
{
viewModel.Data = repo.GetPipelineElements(
viewModel.PipeNumber,
viewModel.CheckedPipeTypes.Select<PipeMillSizeType, string>(x => x.Type).ToArray<string>());
if(viewModel.Data == null || viewModel.Data.Rows.Count <= 0)
log.Warn(string.Format("Data Table for Pipe Report (pipe #{0}) report is NULL or empty", viewModel.PipeNumber));
var report = new PipeConstructionXtraReport();
report.DataSource = viewModel.PipeReportDataList;
report.FootersVisibility = viewModel.IsFooterVisible;
var tool = new ReportPrintTool(report);
tool.AutoShowParametersPanel = false;
tool.ShowPreview();
RefreshVisualStateEvent();
}
catch(RepositoryException ex)
{
log.Warn(this.GetType().Name + " | " + ex.ToString());
notify.ShowWarning(Program.LanguageManager.GetString(StringResources.Notification_Error_Db_Message),
Program.LanguageManager.GetString(StringResources.Notification_Error_Db_Header));
}
}
示例8: btnPrint_Click
private void btnPrint_Click(object sender, EventArgs e)
{
// List<sp_BookingExt_GetAllBooking_Result> aListAllBookingEN = new List<sp_BookingExt_GetAllBooking_Result>();
frmRpt_Revenues aReport = new frmRpt_Revenues(aListAllBookingEN, From,To,
SumServiceHalls1_NotTax, SumServiceHalls2_NotTax, SumServiceHalls3_NotTax,
SumServiceRooms1_NotTax, SumServiceRooms2_NotTax, SumServiceRooms3_NotTax);
ReportPrintTool tool = new ReportPrintTool(aReport);
tool.ShowPreview();
}
示例9: ReportClick
private void ReportClick(object sender, EventArgs e)
{
ArrayList v_arr_list = new ArrayList();
v_arr_list.Add(new iParameter("iP_tieu_de_bao_cao", "BAO CAO DANH MUC MON HOC"));
v_arr_list.Add(new iParameter("iP_trung_tam", "TO HOP GIAO DUC TOPICA"));
v_arr_list.Add(new iParameter("iP_date_time", "Hà Nội, ngày 23 tháng 7 năm 2015"));
BKI_QLTTQuocAnh.BaoCao.RPT_XtraReport v_xr = new BKI_QLTTQuocAnh.BaoCao.RPT_XtraReport(m_ds, m_grv, v_arr_list, System.Drawing.Printing.PaperKind.A4, true);
ReportPrintTool v_xrpt = new ReportPrintTool(v_xr);
v_xrpt.ShowPreview();
}
示例10: btnPrint_Click
private void btnPrint_Click(object sender, EventArgs e)
{
if (LUEItems.EditValue == null)
{
return;
}
DataSources.dsTinyData.ProductsRow row = (DataSources.dsTinyData.ProductsRow)((DataRowView)LUEItems.GetSelectedDataRow()).Row;
XrepBarcode rep = new XrepBarcode(row.ProductNumber, row.SellPrice.ToString());
// Create a Print Tool and show the Print Preview form.
ReportPrintTool printTool = new ReportPrintTool(rep);
printTool.ShowPreview();
}
示例11: btnPrintPerformance_Click
private void btnPrintPerformance_Click(object sender, EventArgs e)
{
try
{
frmRpt_Performance_Rooms afrmRpt_Performance_Rooms = new frmRpt_Performance_Rooms(dtpFrom.DateTime, dtpTo.DateTime, 1);// 1 = IDLang
ReportPrintTool tool = new ReportPrintTool(afrmRpt_Performance_Rooms);
tool.ShowPreview();
}catch(Exception ex)
{
MessageBox.Show("frmTsk_CalculationEfficiency.btnPrintPerformance_Click\n" + ex.ToString());
}
}
示例12: button1_Click
private void button1_Click(object sender, EventArgs e)
{
var Buf = new List<string>();
foreach (string item in listBox1.Items)
{
Buf.Add(item);
}
var r = new XtraReport1();
r.AddLabel(Buf, new Rectangle(0,0,630,23));
var printTool = new ReportPrintTool(r);
printTool.ShowPreview();
}
示例13: button3_Click
private void button3_Click(object sender, EventArgs e)
{
var rpt = new ReportPrintTool(new zayvkaReport1()
{
DataSource = new BindingSource()
{
DataSource = GetZakaz()
}
});
rpt.Report.CreateDocument(false);
rpt.ShowPreview();
}
示例14: DoPrint
public static void DoPrint(string tranid)
{
var dm = new ItemMoveDataManager();
var rpt = new Reports.RptItemMove { Company = Utils.Companyname , Header = "Item Transfer"};
var ds = dm.RptItemMove(tranid, Utils.Company);
rpt.DataSource = ds;
ReportPrintTool printTool = new ReportPrintTool(rpt);
printTool.ShowPreview();
}
示例15: buttonPrint_Click
public void buttonPrint_Click(object sender, EventArgs e)
{
var rpt = new ReportPrintTool(new RegistrationReport()
{
DataSource = new BindingSource()
{
DataSource = GetSportsmens()
}
});
rpt.Report.CreateDocument(false);
rpt.ShowPreview();
}