Skip to main content
Solved

Filter data in selection menu in report designer

  • 5 February 2023
  • 3 replies
  • 447 views

Is there a way to filter the fields in a drop down list for a parameter in report designer to only show for a particular value  (e.g., only list invoices for a particular customer rather than all customers)?   We don’t want to use “Additional Sort and Filters” or filter the column since we want the viewer to get to the data without having to add filters.   

Only want Customer 1 invoices listed in drop down for Reference Number.

Thank you!

3 replies

Userlevel 5
Badge +3

Hi,

The way Acumatica solves this issue is by designing a DAC specific to the report. The DAC contains all the fields with the required filters. In Acumatica the DACs are usually suffixed with “ReportParameters.”

 

Userlevel 3
Badge

Haven’t done a lot of reports in Acumatica.  I see this in the DAC for Customer ID:

We limit which customers are the choices that users can choose:

 

And then since the customer is one of the choices in the report parameters, want to only have the invoices for the specific customer in the Reference Number list.  Do I use ARInvoice.CustomerIDReportParameters in the Data Field?   Thank you.

Userlevel 4
Badge

Hi Team,

I’m also trying to achieve the same concept like Acumatica Customized Report Parameters, but its not working as expected. I tried to create Virtual DAC for Report parameter, to filter the Purchase Order Number based on Project ID. Below is my DAC and Report screenshot for your reference. Please let me know, what I’m doing wrong.

 

using System;
using PX.Data;
using PX.Data.BQL;
using PX.Data.ReferentialIntegrity.Attributes;
using PX.Objects.AR;
using PX.Objects.SO;
using PX.Objects.PO;
using PX.Objects.PM;
using PX.Objects.GL;
using static PX.Objects.SO.DAC.ReportParameters.BlanketSODetailsReportParameters;
using BarBendingIntegration;

namespace YTLCRT.YTLCRT.DAC
{
    [PXVirtual]
    [PXCacheName("LA Project Report Parameters")]
    public class LAProjectReportParameters : IBqlTable
    {
        public abstract class projectID : BqlType<IBqlInt, int>.Field<projectID>
        {
        }

        public abstract class orderType : BqlType<IBqlString, string>.Field<orderType>
        {
        }

        public abstract class orderNbr : BqlType<IBqlString, string>.Field<orderNbr>
        {
        }
        [ActiveProject]
        public virtual int? ProjectID { get; set; }

        [PXString(2, IsKey = true, IsFixed = true)]
        [PXSelector(
            typeof(Search<LAReportFilter.orderType>))]
        public virtual string OrderType { get; set; }

        [PXString(15, IsKey = true, IsUnicode = true)]
        [PXSelector(typeof(Search2<POOrder.orderNbr, LeftJoinSingleTable
     <PMProject, On<KeysRelation<Field<POOrder.projectID>.IsRelatedTo<PMProject.contractID>.
         AsSimpleKey.WithTablesOf<PMProject, POOrder>, PMProject, POOrder>.
         And<Where<MatchUserFor<PMProject>>>>>,
     Where<POOrder.orderType, Equal<Current<orderType>>,
         And<POOrder.projectID, Equal<Current<projectID>>>>,
     OrderBy<Desc<SOOrder.orderNbr>>>), Filterable = true)]

        public virtual string OrderNbr { get; set; }
    }

}
 

Regards,

Ramya

 

Reply