から値を取得するか現在の行がdatabinding
-
22-08-2019 - |
質問
を使用していDevExpress XtraReportsで住所検索ライブラリが等しく適用するその他の報告です。
いを実行ロジック当たりの行の報告書では、"描"は、連続により行ベース。具体的にはたいと思い隠バーコードデータが得られない場合には、バーコードな可能です。
現在のとなっているの
private void xrBarCode2_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
var barcode = (XRBarCode)sender;
if (barcode.Text.Trim() == "")
{
barcode.Visible = false;
lblWarning.Visible = true;
}
else
{
barcode.Visible = true;
lblWarning.Visible = false;
}
}
こんな感じで平臭います。私はアクセスの現在のデータ行はこの方法では、"リアル"オブジェクトのプロパティをもできます。何が典型的なパターンのためこの報告書発電機?私も、正しい。てみました Detail_BeforePrint
, そのなかった追加情報です。
解決
利用Detail_BeforePrintとGetCurrentColumnValue()はこのように:
private void Detail_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) {
if (string.IsNullOrEmpty(GetCurrentColumnValue("BarcodeColumnName"))) {
barcode.Visible = false;
lblWarning.Visible = true;
} else {
barcode.Visible = true;
lblWarning.Visible = false;
}
}
所属していません StackOverflow