nationOptions=crDiskFileDestinationOptions;;
} following code is similar to previous, so I want comment it again «pdf»:
{. DiskFileName=ExportPath + filename;. DestinationOptions=crDiskFileDestinationOptions;. ExportDestinationType=ExportDestinationType.DiskFile;. ExportFormatType=ExportFormatType.PortableDocFormat;;
} «doc»:
{. DiskFileName=ExportPath + filename;. ExportDestinationType=ExportDestinationType.DiskFile;. ExportFormatType=ExportFormatType.WordForWindows;. DestinationOptions=crDiskFileDestinationOptions;;
} «xls»:
{. DiskFileName=ExportPath + filename;. ExportDestinationType=ExportDestinationType.DiskFile;. ExportFormatType=ExportFormatType.Excel;. DestinationOptions=crDiskFileDestinationOptions;;
} «rpt»:
{. DiskFileName=ExportPath + filename;. ExportDestinationType =. DiskFile;. ExportFormatType=ExportFormatType.CrystalReport;. DestinationOptions=crDiskFileDestinationOptions;;
} «htm»:
{HTML40Formatopts=new HTMLFormatOptions ();. ExportDestinationType=ExportDestinationType.DiskFile;. ExportFormatType=ExportFormatType.HTML40; Formatopts.HTMLBaseFolderName=ExportPath + filename; Formatopts.HTMLFileName=«HTML40.html»; Formatopts . HTMLEnableSeparatedPages=true; Formatopts.HTMLHasPageNavigator=true; Formatopts.FirstPageNumber=1; Formatopts.LastPageNumber=3;. FormatOptions=HTML40Formatopts;;
}
}
{
/ / trying to export input report document,
/ / and if success returns true.Export (); true;
} (Exception err)
{false;
}
} bool Print ()
{
{(docCreate ())
{printDialog1=new PrintDialog (); dr=printDialog1.ShowDialog (); (dr == DialogResult.OK)
{nCopy=printDialog1.PrinterSettings.Copies;
/ / Get the number of Start PagesPage=printDialog1.PrinterSettings.FromPage;
/ / Get the number of End PageePage=printDialog1.PrinterSettings.ToPage;
/ / Get the printer namePrinterName=printDialog1.PrinterSettings.PrinterName;. PrintOptions.PrinterName=PrinterName;. PrintToPrinter (nCopy, false, sPage, ePage);
}
}
{
_appcontext.SysMsg.ReportMsg («Помилка даних», «Помилка Печатки звіту», SysMsg.Interfaces.MsgType.Error); false;
}
} (Exception ex)
{
_appcontext.SysMsg.ReportMsg (ex.Message, «Помилка Печатки звіту», SysMsg.Interfaces.MsgType.Error); false;
} true;
}
}
} avto.PluginReport.detail
{class DetailPlugin: IReport
{IAppContext _Appcontext; Form _PrintDetailPlugin; System.Windows.Controls.Button _main; System.Windows.Controls.Button CreateMenu (IAppContext _appcontext)
{
_Appcontext=_appcontext; ...