web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

ID getting clear when i refresh the report page .

(1) ShareShare
ReportReport
Posted on by 1,836
I have made the report in which records to filter have production id in filter , when i refresh the page the field in records to filter get clear , it is not holding the value , can anyone please suggest me how can i hold previous filter value if the form is refresh .
 
 
thanks,
Regards,
Dinesh
I have the same question (0)
  • Waed Ayyad Profile Picture
    9,214 Super User 2026 Season 2 on at
    Hi,
     
    Do you mean SSRS report? or Form? Also, can you share your code?
     
     
    Thanks
    Waed Ayyad
  • Dineshkarlekar Profile Picture
    1,836 on at
    i have made the report using query but in records to filter the productiion id filter is getting blank , when i apply the range of production id on the query ,
    [SRSReportQueryAttribute(queryStr(DTCustomiseProductionDetailsQue))]
    class DTCustomizeProductionDetailsDP  extends SRSReportDataProviderBase
    {
        DTCustomiseProductionDetailsTmp     DTCustomiseProductionDetailsTmp;
        ProdTable                           prodTable;
        VendAccount                         vendAccount;
        InventTransOrigin                   inventTransOrigin;
        InventTrans                         inventTrans;
        SalesTable                          salestable;
        ProdCalcTrans                       prodCalcTrans;
        CustInvoiceJour                     custInvoiceJour,custInvoiceJourloc;
        CustInvoiceTrans                    custInvoiceTrans;
        str                                 name,refrence;
        ExchRate                            rate;
        AmountCur                           invamt;
        str                                 salesid,salesidstr;
        PurchQty                            qty;
        LineAmount                          lineAmount;
        container                           salesidloc;
        int                                 idx;
        SalesInvoicedQty                    invoicedQty;
    
        [SrsReportDataSetAttribute(tableStr('DTCustomiseProductionDetailsTmp'))]
        public DTCustomiseProductionDetailsTmp GetDTCustomiseProductionDetailsTmp()
        {
            select * from DTCustomiseProductionDetailsTmp;
            return		  DTCustomiseProductionDetailsTmp;
        }
    
        Public void processReport()
        {
            Query							 q;
            QueryRun					     qr;
            QueryBuildDataSource		     qbdsobjProjTable;
            QueryBuildDataSource			 qbdsobjDirPartyTable;
            QueryBuildDataSource			 qbdsobjLogisticsPostalAddress;
            QueryBuildRange					 qbr;
    
    
    
            DTCustomiseProductionDetailsTmp.clear();
    
            q = this.parmQuery();;
    
            qr = new QueryRun(q);
    
            while(qr.next())
            {
    
                prodTable = qr.get(tableNum(ProdTable));
    
                if(prodTable.DTSalesId != "")
                {
                    salesidloc = str2con(prodTable.DTSalesId, ';');
    
                    for(idx=1; idx<=conLen(salesidloc); idx++)
                    {    
                        salesidstr = '';
                        salesTable =  salesTable::find(conPeek(salesidloc, idx));
                        ////conIds +=  salesTable.RecId;
                        salesidstr =  salesTable.SalesId;
    
                        DTCustomiseProductionDetailsTmp.clear();
                        DTCustomiseProductionDetailsTmp.ProdId = prodTable.ProdId;
                        DTCustomiseProductionDetailsTmp.DisplayProductNumber = prodTable.ItemId;
                        DTCustomiseProductionDetailsTmp.ItemId = prodTable.ItemId;
                        DTCustomiseProductionDetailsTmp.QtySched = prodTable.QtySched;
                        DTCustomiseProductionDetailsTmp.RemainInventPhysical = prodTable.RemainInventPhysical;
                        DTCustomiseProductionDetailsTmp.DlvDate = prodTable.DlvDate;
                        DTCustomiseProductionDetailsTmp.ProdStatus = prodTable.ProdStatus;
                        DTCustomiseProductionDetailsTmp.BackorderStatus = prodTable.BackorderStatus;
                        DTCustomiseProductionDetailsTmp.ProdPoolId = prodTable.ProdPoolId;
                        DTCustomiseProductionDetailsTmp.ProdLocked = prodTable.ProdLocked;
                        DTCustomiseProductionDetailsTmp.ProdWHSReleasePolicy = prodTable.ProdWHSReleasePolicy;
                        DTCustomiseProductionDetailsTmp.DTSector = prodTable.DTSector;
                        DTCustomiseProductionDetailsTmp.ActualClosingDate = prodTable.RealDate;
    
                        select ReferenceId,ReferenceCategory from inventTransOrigin
                    join inventTrans
                    where inventTransOrigin.RecId == inventTrans.InventTransOrigin
                    &&    inventTransOrigin.ReferenceCategory == InventTransType::Sales
                    &&    inventTransOrigin.ReferenceId == salesTable.SalesId
                    &&    inventTrans.ItemId == prodTable.ItemId;
    
                        salesidstr = inventTransOrigin.ReferenceId;
                        refrence = enum2Str(inventTransOrigin.ReferenceCategory);
    
                        DTCustomiseProductionDetailsTmp.Refrence = refrence;
    
                        select SalesId,SalesName,SalesStatus from  salestable
                    where salestable.SalesId == salesidstr;
    
                        DTCustomiseProductionDetailsTmp.SalesId = salestable.SalesId;
                        DTCustomiseProductionDetailsTmp.SalesName = salestable.SalesName;
                        DTCustomiseProductionDetailsTmp.SalesStatus = salestable.SalesStatus;
    
                        select * from custInvoiceJour
                   where custInvoiceJour.SalesId == salesidstr;
    
                        DTCustomiseProductionDetailsTmp.InvoiceDate = custInvoiceJour.InvoiceDate;
    
                        lineAmount = 0 ;
                        invoicedQty = 0 ;
    
    
                        if(custInvoiceJour.RecId != 0)
                        {
                                    while select * from custInvoiceTrans
                            join custInvoiceJourloc
                            where custInvoiceTrans.InvoiceId == custInvoiceJourloc.InvoiceId
                            && custInvoiceTrans.InvoiceDate == custInvoiceJourloc.InvoiceDate
                            && custInvoiceTrans.numberSequenceGroup == custInvoiceJourloc.numberSequenceGroup
                            && custInvoiceTrans.SalesId == custInvoiceJour.SalesId
                            && custInvoiceTrans.ItemId == prodTable.ItemId
                            {
                                lineAmount  += custInvoiceTrans.lineAmountInclTax();
                                invoicedQty += custInvoiceTrans.Qty;
                            }
                        }
    
                        DTCustomiseProductionDetailsTmp.InvoiceAmount = lineAmount;
                        DTCustomiseProductionDetailsTmp.Qty = invoicedQty;
    
                        select * from prodCalcTrans
                  where prodCalcTrans.CalcType == itemcalctype::Production
                     && prodCalcTrans.Resource == prodTable.ItemId;
                 
                        DTCustomiseProductionDetailsTmp.EstimatedCostAmount = prodCalcTrans.CostPriceSum();
                        DTCustomiseProductionDetailsTmp.RealisedCostAmount = prodCalcTrans.realCostAmountTotal();
               
                        DTCustomiseProductionDetailsTmp.insert();
    
                    }
                }
                else
                {
                    DTCustomiseProductionDetailsTmp.clear();
                    DTCustomiseProductionDetailsTmp.ProdId = prodTable.ProdId;
                    DTCustomiseProductionDetailsTmp.DisplayProductNumber = prodTable.ItemId;
                    DTCustomiseProductionDetailsTmp.ItemId = prodTable.ItemId;
                    DTCustomiseProductionDetailsTmp.QtySched = prodTable.QtySched;
                    DTCustomiseProductionDetailsTmp.RemainInventPhysical = prodTable.RemainInventPhysical;
                    DTCustomiseProductionDetailsTmp.DlvDate = prodTable.DlvDate;
                    DTCustomiseProductionDetailsTmp.ProdStatus = prodTable.ProdStatus;
                    DTCustomiseProductionDetailsTmp.BackorderStatus = prodTable.BackorderStatus;
                    DTCustomiseProductionDetailsTmp.ProdPoolId = prodTable.ProdPoolId;
                    DTCustomiseProductionDetailsTmp.ProdLocked = prodTable.ProdLocked;
                    DTCustomiseProductionDetailsTmp.ProdWHSReleasePolicy = prodTable.ProdWHSReleasePolicy;
                    DTCustomiseProductionDetailsTmp.DTSector = prodTable.DTSector;
                    DTCustomiseProductionDetailsTmp.ActualClosingDate = prodTable.RealDate;
    
                    select ReferenceId,ReferenceCategory from inventTransOrigin
                    join inventTrans
                    where inventTransOrigin.RecId == inventTrans.InventTransOrigin
                    &&    inventTransOrigin.ReferenceCategory == InventTransType::Sales
                    &&    inventTrans.ItemId == prodTable.ItemId;
    
                    salesid = inventTransOrigin.ReferenceId;
                    refrence = enum2Str(inventTransOrigin.ReferenceCategory);
    
                    DTCustomiseProductionDetailsTmp.Refrence = refrence;
    
                    select SalesId,SalesName,SalesStatus from  salestable
                    where salestable.SalesId == salesid;
    
                    DTCustomiseProductionDetailsTmp.SalesId = salestable.SalesId;
                    DTCustomiseProductionDetailsTmp.SalesName = salestable.SalesName;
                    DTCustomiseProductionDetailsTmp.SalesStatus = salestable.SalesStatus;
    
                    select * from custInvoiceJour
                   where custInvoiceJour.SalesId == salesid;
    
                    DTCustomiseProductionDetailsTmp.InvoiceDate = custInvoiceJour.InvoiceDate;
    
                    while select * from custInvoiceTrans
                    join custInvoiceJourloc
                    where custInvoiceTrans.InvoiceId == custInvoiceJourloc.InvoiceId
                    && custInvoiceTrans.InvoiceDate == custInvoiceJourloc.InvoiceDate
                    && custInvoiceTrans.numberSequenceGroup == custInvoiceJourloc.numberSequenceGroup
                    && custInvoiceTrans.SalesId == custInvoiceJour.SalesId
                    && custInvoiceTrans.ItemId == prodTable.ItemId
                    {
                        lineAmount  += custInvoiceTrans.lineAmountInclTax();
                    }
    
                    DTCustomiseProductionDetailsTmp.InvoiceAmount = lineAmount;
    
                    select * from prodCalcTrans
                  where prodCalcTrans.CalcType == itemcalctype::Production
                     && prodCalcTrans.Resource == prodTable.ItemId;
                 
                    DTCustomiseProductionDetailsTmp.EstimatedCostAmount = prodCalcTrans.CostPriceSum();
                    DTCustomiseProductionDetailsTmp.RealisedCostAmount = prodCalcTrans.realCostAmountTotal();
               
                    DTCustomiseProductionDetailsTmp.insert();
                }
    
            }
    
        }
    
    }
  • Suggested answer
    Waed Ayyad Profile Picture
    9,214 Super User 2026 Season 2 on at
    Hi Dinesh,
     
    Ok, first of all are you sure you have data on the table? Did you try to run the Query on Runnable class to see if it returning data or not? Did you check the relationships on the Query between the Datasources? Start from here and tell me what you get.
     
    Note: You can use the following code to test your query on runnable class: (To get SQL statement and run it on SSMS)

    Query q = new Query(queryStr(YourQueryName));
    info(q.dataSourceNo(1).toString()); //Note 1 means the first DataSource on your query


    Thanks,
    Waed Ayyad
    If this helped, please mark it as "Verified" for others facing the same issue
     
     
     
  • Layan Jwei Profile Picture
    8,284 Super User 2026 Season 2 on at
    Hi Dinesh,

    can you give us more data about your query?
     
    I can see it only contains one table. However, it seems you added ProdId as a range. So did u fill a value inside this range? if yes, then what is it? as this might be the cause of the issue. 

    or did you just add it without fixing a range value? then this would mean your query is equivalent to this:
    "SELECT * FROM ProdTable" so in this case, make sure you have data in this table in the legal entity u are working with

    Also do you have any code in your controller that affects the query range?

    Thanks,
    Layan Jweihan
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future
  • Dineshkarlekar Profile Picture
    1,836 on at
    Iam getting this query in info 
     
    SELECT ActivityNumber, BackorderStatus, BOMDate, BOMId, CalcDate, CheckRoute, CollectRefLevel, CollectRefProdId, createdBy,
    createdDateTime, CurrencyCode_RU, dataAreaId, DefaultDimension, Density, Depth, DlvDate, DlvTime, DTSalesId, DTSector, 
    FinishedDate, GanttColorId, Height, InventDimId, InventRefId, InventRefTransId, InventRefType, InventTransId, ItemId,
    LatestSchedDate, LatestSchedDirection, LatestSchedTime, Name, PackedExtensions, Partition, PdsCWBatchEst, PdsCWBatchSched,
    PdsCWBatchSize, PdsCWBatchStup, PdsCWRemainInventPhysical, PlanningPriority, PmfBulkOrd, PmfCoByVarAllow, PmfConsOrdId,
    PmfReworkBatch, PmfTotalCostAllocation, PmfYieldPct, PriceGroup_RU, ProdGroupId, ProdId, ProdLocked, ProdOrigId,
    ProdPoolId, ProdPostingType, ProdPrio, ProdStatus, ProdType, ProdWHSReleasePolicy, ProfitSet, ProjCategoryId, 
    ProjCostAmount, ProjCostPrice, ProjId, ProjLinePropertyId, ProjLinkedToOrder, ProjPostingType, ProjSalesCurrencyId, 
    ProjSalesPrice, ProjSalesUnitId, ProjTaxGroupId, ProjTaxItemGroupId, ProjTransId, PropertyId, QtyCalc, QtySched,
    QtyStUp, RealDate, RecId, recVersion, RefLookUp, ReleasedDate, RemainInventPhysical, ReqPlanIdSched, ReqPOId,
    Reservation, RouteId, RouteJobs, SchedDate, SchedEnd, SchedFromTime, SchedStart, SchedStatus, SchedToTime, 
    SkipCreateBOMLines, SkipCreateRouteOperations, StUpDate, SysRowVersionNumber, Width FROM ProdTable
     
  • Dineshkarlekar Profile Picture
    1,836 on at
    here is my controller class 
    class DTCustomizeProductionDetailsController extends SrsReportRunController
    {
        PurchTable                 dataTableOne;
    
        protected void PrePromptModifyContract()
        {
            super();
            if ( this.parmArgs() && this.parmArgs().record())
            {
                dataTableOne = this.parmArgs().record();
            }
        }
    
        static void main(Args args)
        {
            PurchTable  						   dataTableOne;
            DTProjectContractReportController	   ssrsController;
            datatableone   = args.record() as  PurchTable;
            ssrsController = new  DTProjectContractReportController();
            ssrsController.parmArgs(args);
    
            ssrsController.parmReportName(ssrsReportStr(DTCustomizedProductionOrderDetails,PrecisionDesign1));
            ssrsController.parmShowDialog(true);
            ssrsController.parmLoadFromSysLastValue(false);
            ssrsController.startOperation();
        }
    
    }
     
  • Layan Jwei Profile Picture
    8,284 Super User 2026 Season 2 on at
    Hi Dinesh,

    Did you make sure you have data in this table in the legal entity u are working with?

    ​​​​​​​and are u sure you shared the correct controller code? because u have two variables with "dataTableOne" name?

    Thanks,
    ​​​​​​​Layan Jweihan

  • Dineshkarlekar Profile Picture
    1,836 on at
    i have added range but the value is blank 
  • Layan Jwei Profile Picture
    8,284 Super User 2026 Season 2 on at
    Hi Dinesh,

    Please check my previous reply

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 345 Most Valuable Professional

#2
CU10121822-0 Profile Picture

CU10121822-0 304

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 283 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans