rpt を開くだけの単純な .NET 4.0 アプリケーション。横向きとA4用紙を強制したいのですが、うまくいきません。
レポート デザインのページ設定からプリンターを削除しようとしましたが、うまくいきませんでした。
ソース:
private void Page_Init(object sender, EventArgs e)
{
ConfigureCrystalReports();
}
private void ConfigureCrystalReports()
{
//
ConnectionInfo myConnectionInfo = new ConnectionInfo();
//
ReportDocument rptDoc = new ReportDocument();
rptDoc.Load(Server.MapPath(Properties.Settings.Default.rptPath));
rptDoc.PrintOptions.PaperOrientation = PaperOrientation.Landscape;
rptDoc.PrintOptions.PaperSize = PaperSize.PaperA4;
//
myConnectionInfo.AllowCustomConnection = true;
myConnectionInfo.UserID = "xxxxx";
myConnectionInfo.Password = "xxxxx";
//
crViewer.ReportSource = rptDoc;
//
SetDBLogonForReport(myConnectionInfo);
}