在Acumatica 21R1中,当在报表中使用冻结过滤器时,由于平移行为的不当,可能会导致冻结过滤器失效,导致报表无法正常显示。
以下是一个示例报表,其中使用了冻结过滤器:
public class ARTotalByPeriodEnq : PXGraph
public ARTotalByPeriodEnq()
{
...
this.Filter.Cache.AllowInsert = false;
...
}
public PXAction viewDocument;
[PXUIField(DisplayName = Messages.ViewDocument, MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select)]
[PXButton(ImageKey = PX.Web.UI.Sprite.Main.View)]
public virtual IEnumerable ViewDocument(PXAdapter adapter)
{
if (this.Report.Current != null && ARBalances.Current != null && (!String.IsNullOrEmpty(ARBalances.Current.DocType) && !String.IsNullOrEmpty(ARBalances.Current.RefNbr)))
{
switch (ARBalances.Current.DocType)
{
case GL.BatchTypeCode.ARInvoice:
...
break;
case GL.BatchTypeCode.CreditMemo:
...
break;
case GL.BatchTypeCode.Payment:
case GL.BatchTypeCode.Prepayment:
case GL.BatchTypeCode.Refund:
...
break;
case GL.BatchTypeCode.Adjustment:
...
break;
case ARDocType.DebitMemo:
...
break;
case ARDocType.CashSale:
case ARDocType.CashReturn:
...
break;
default:
...
break;
}
return adapter.Get();
}
return adapter.Get();
}
...
}
为了解决这个问题,需要在报表中添加以下代码:
public PXSelect