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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

To add records to include in report .

(1) ShareShare
ReportReport
Posted on by 1,836
I have created the report which is having only controller class and data provider class , now the report runs directly showing all the reocrds but  data is also correct but i need to show the dialogue which show the reocrds to include and so i can filter the records with project id . can any one help me on this . 
my code is below .
I have the same question (0)
  • Dineshkarlekar Profile Picture
    1,836 on at
    To add records to include in report .
    here is my code for controller and data provider , please suggest me what changes i need to made to show records to include . 
    class DTProjectContractReportController	 extends SrsReportRunController
    {
         ProjTable                 dataTableOne;
    
        protected void PrePromptModifyContract()
        {
            super();
            if ( this.parmArgs() && this.parmArgs().record())
            {
                 dataTableOne = this.parmArgs().record();    
            }
        }
    
        static void main(Args args)
        {
            ProjTable 						           dataTableOne;
            DTProjectContractReportController	  	   ssrsController;
            datatableone   = args.record() as  ProjTable;
            ssrsController = new  DTProjectContractReportController();
            ssrsController.parmArgs(args);
    
            ssrsController.parmReportName(ssrsReportStr(DTProjListInvoiceTable_ProjectValue,Report));
            ssrsController.parmShowDialog(false);
            ssrsController.parmLoadFromSysLastValue(false);
            ssrsController.startOperation();
        }
    
    }
    class DTProjectContractReportDP	extends SRSReportDataProviderBase
    {
        DTProjectContractTableTmp           DTProjectContractTableTmp;
        PSAProjProposalProj                 pSAProjProposalProj;
        ProjInvoiceJour                     projInvoiceJour;
        ProjTable                           projTable, projTable1;
        projUnpostedTransView              projUnpostedTransView;
        str                                 name;
        ProjId                              projId;
     
    
        [SrsReportDataSetAttribute(tableStr('DTProjectContractTableTmp'))]
        public DTProjectContractTableTmp GetDTProjectContractTableTmp()
        {
            select * from DTProjectContractTableTmp;
            return		  DTProjectContractTableTmp;
        }
    
        Public void processReport()
        {
            Query							 q;
            QueryRun					     qr;
            QueryBuildDataSource		     qbdsobjProjTable;
            QueryBuildDataSource			 qbdsobjDirPartyTable;
            QueryBuildDataSource			 qbdsobjLogisticsPostalAddress;
            QueryBuildRange					 qbr;
           
            
     
            DTProjectContractTableTmp.clear();
    
            q= new Query();
    
            qbdsobjProjTable = q.addDataSource(tableNum(ProjTable));
           
            qr=new QueryRun(q);
    
            while(qr.next())
            {
              
                projTable = qr.get(tableNum(ProjTable));
    
       
              while  select * from projTable 
               
                {
                    name = projTable::find(projTable.ProjId).Name;
                    projId = projTable.ProjId;
     
                    DTProjectContractTableTmp.clear();
                    DTProjectContractTableTmp.ProjId         = projId;
                    DTProjectContractTableTmp.Name           = name;
                    DTProjectContractTableTmp.DTProjectValue = projTable.DTProjectValue;
    
                    select  sum(InvoiceAmount) from projInvoiceJour
                            join pSAProjProposalProj group by PROJID
                               where pSAProjProposalProj.PROJPROPOSALID == projInvoiceJour.PROPOSALID
                                &&  pSAProjProposalProj.PROJID == projId;
    
                    DTProjectContractTableTmp.InvoiceAmount	 = projInvoiceJour.InvoiceAmount;
    
                    select sum(Amount) from projUnpostedTransView 
                         where projUnpostedTransView.LinePropertyId == 'Billable'
                          && projUnpostedTransView.ProjId == projId;
                
                        DTProjectContractTableTmp.BillableAmt = projUnpostedTransView.Amount;
                                  
                    select sum(Amount) from projUnpostedTransView 
                         where projUnpostedTransView.LinePropertyId == 'Non-Bill'
                          && projUnpostedTransView.ProjId == projId;
                           
                        DTProjectContractTableTmp.NonBillAmt = projUnpostedTransView.Amount;
                               
                    DTProjectContractTableTmp.insert();
                }
                
            }
    
        }
    
    }
    thanks ,
    Regards,
    Dinesh
  • Suggested answer
    Layan Jwei Profile Picture
    8,097 Super User 2025 Season 2 on at
    To add records to include in report .
    Hi Dinesh,
     
    In your controller class, you've put parmShowDialog(false) -- so first you need to show the dialog.
    Secondly, in the report dataSet, make sure that the dynamic filter property is set to yes.
     
    Let us know if it works.
     
    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. You can do this by ticking the box "Does this answer your question"
  • Dineshkarlekar Profile Picture
    1,836 on at
    To add records to include in report .
    dyanmic filter property is set to true, 
    dialog is opening but not showing records to include , what else i have to change , can you plz guide me on this .
  • Suggested answer
    Layan Jwei Profile Picture
    8,097 Super User 2025 Season 2 on at
    To add records to include in report .
    Hi Dinesh,

    Did you make dynamic filters "true" just now? if yes, expand the parameters node and see what's inside

    then right click on the dataSet and click Restore (i think parameters should be updated and will show the dynamic parameter), then deploy the report and check again

    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. You can do this by ticking the box "Does this answer your question"
  • Dineshkarlekar Profile Picture
    1,836 on at
    To add records to include in report .
     No  dynamic filters was set to "True" before . i have not change any thing in report 
    Do i need to change anything in controller class.
     
    thanks,
    Regards,
    Dinesh
  • Suggested answer
    Martin Dráb Profile Picture
    237,693 Most Valuable Professional on at
    To add records to include in report .
    They key thing you're missing is having your RDP class decorated with SRSReportQueryAttribute.
  • Suggested answer
    Layan Jwei Profile Picture
    8,097 Super User 2025 Season 2 on at
    To add records to include in report .
    Hi Dinesh,

    I can also see that your RDP class doesn't have this attribute [SRSReportQueryAttribute(queryStr(YourQueryName))]
    If you don't have a query or there is no standard one you can use, then maybe you need to create a new one. I think you need one for ProjTable. Then build the project and deploy.

    After that, maybe try again and right click on the dataSet and click restore, and maybe right click on the DTProjListInvoiceTable and click restore. You should see that the parameters nodes have sth new. Then deploy and build again

    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. You can do this by ticking the box "Does this answer your question"
  • Suggested answer
    Waed Ayyad Profile Picture
    9,023 Super User 2025 Season 2 on at
    To add records to include in report .
     
    Add this attribute to your DP class SRSReportQueryAttribute(queryStr(YourQueryName))] and make sure your DataSource has the Dynamics Filter is set to true.

     
     
     
    Thank you,
    Waed Ayyad
    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
    To add records to include in report .
    thanks for reply,
    but i dont have any query for this report , how can i achive that .
     
    thanks ,
    Regards,
    Dinesh.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 683 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 563 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 398 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans