void m_cmd_xuat_pdf_Click(object sender, EventArgs e)
{
try
{
// Check whether the ChartControl can be previewed.
if (!chartControl1.IsPrintingAvailable)
{
CHRM_BaseMessages.MsgBox_Error("The 'DevExpress.XtraPrinting' is not found");
return;
}
// Open the Preview window.
PrintableComponentLink link = new PrintableComponentLink(new PrintingSystem());
link.Component = chartControl1;
chartControl1.OptionsPrint.SizeMode = PrintSizeMode.Stretch;
//chartControl1.Legend.MaxVerticalPercentage = 100;
link.Landscape = true;
link.PaperKind = System.Drawing.Printing.PaperKind.A4;
link.ShowPreview();
// Specify the paper kind and page orientation.
//chartControl1.Legend.MaxVerticalPercentage = 100;
//chartControl1.Legend.Direction = DevExpress.XtraCharts.LegendDirection.TopToBottom;
//chartControl1.ShowPrintPreview(DevExpress.XtraCharts.Printing.PrintSizeMode.Zoom);
}
catch (Exception v_e)
{
CSystemLog_301.ExceptionHandle(v_e);
}
}