Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

report RDP how using select parameters

(0) ShareShare
ReportReport
Posted on by 2,030

Greetings everyone 

i'v created new report using RDP and now i wanna add parameter for my report which using my RDP class but i need that parameter show as Select button on report dialog

this is my class

private void insertData()
{
    HcmWorker   hcmWorker;
    CompanyInfo companyInfo;

    DirPerson   dirPerson;
    DirPartyTable   dirPartyTable;
    LogisticsElectronicAddress  logisticsElectronicAddress;
    HcmPersonIdentificationNumber   hcmPersonIdentificationNumber;
    HcmPersonPrivateDetails hcmPersonPrivateDetails;
    HcmEthnicOrigin hcmEthnicOrigin;
    HcmPersonDetails    hcmPersonDetails;
    HRMCompFixedEmpl    hRMCompFixedEmpl;
    JmgEmployee jmgEmployee;
    HcmWorkerEnrolledBenefit    hcmWorkerEnrolledBenefit;
    HcmBenefitType  hcmBenefitType;
    HcmBenefitPlan  hcmBenefitPlan;
    HcmBenefit  hcmBenefit;

    HcmEmployment   hcmEmployment;
    HcmEmploymentDetail hcmEmploymentDetail;


    HcmPositionWorkerAssignment hcmPositionWorkerAssignment;
    HcmPosition hcmPosition;
    HcmPositionDetail   hcmPositionDetail;
    PayrollPositionDetails  payrollPositionDetails;
    OMOperatingUnit oMOperatingUnit;


    HcmWorkerBankAccount    hcmWorkerBankAccount;

    while select * from hcmWorker
    {
       workerReportTB.clear();
        //PersonnelNumber
        workerReportTB.PersonnelNumber=hcmWorker.PersonnelNumber;


        //Phone
        workerReportTB.MobileEmp=hcmWorker.phone();

        select NameAlias from dirPerson
        where hcmWorker.Person==dirPerson.RecId;
        //NameAlias
        workerReportTB.NameEmp=dirPerson.NameAlias;


        select firstOnly IdentificationNumber from hcmPersonIdentificationNumber
        where dirPerson.RecId==hcmPersonIdentificationNumber.Person
        && hcmPersonIdentificationNumber.IsPrimary==true;
        // IdentificationNumber
        workerReportTB.IdEmp=hcmPersonIdentificationNumber.IdentificationNumber;


        select BirthDate from hcmPersonPrivateDetails
        where dirPerson.RecId==hcmPersonPrivateDetails.Person;
        // BirthDate
        workerReportTB.DateBirthEmp=hcmPersonPrivateDetails.BirthDate;

        select Description from HcmEthnicOrigin
        join EthnicOrigin from hcmPersonPrivateDetails
        where hcmPersonPrivateDetails.EthnicOrigin==HcmEthnicOrigin.RecId
        && hcmPersonPrivateDetails.Person==hcmWorker.Person;
        //relgion
        workerReportTB.Religon=HcmEthnicOrigin.Description;

        select MaritalStatus from hcmPersonDetails
        where dirPerson.RecId==hcmPersonDetails.Person;
        // MaritalStatus
        workerReportTB.MatiralStatuEmp=hcmPersonDetails.MaritalStatus;


        select firstOnly AccountId from hcmWorkerBankAccount
        where hcmWorker.RecId==hcmWorkerBankAccount.Worker;
        // bank account
        workerReportTB.IdBankEmp=hcmWorkerBankAccount.AccountId;


        select ProfileGroupId from jmgEmployee
        where hcmWorker.RecId==jmgEmployee.Worker;
        // ShiftEmp
        workerReportTB.ShiftEmp=jmgEmployee.ProfileGroupId;


        select ValidFrom from hcmEmployment
        where hcmWorker.RecId==hcmEmployment.Worker;
        // start work Position date
        workerReportTB.DateStartEmp=hcmEmployment.ValidFrom;


        select ValidFrom from hcmPositionWorkerAssignment
        where hcmWorker.RecId==hcmPositionWorkerAssignment.Worker;
        // WorkerAssignmentDate
        workerReportTB.DateAssingEmp=hcmPositionWorkerAssignment.ValidFrom;




        select * from hcmPositionWorkerAssignment
        where hcmWorker.RecId==hcmPositionWorkerAssignment.Worker;

        select * from hcmPosition
        where hcmPositionWorkerAssignment.Position==hcmPosition.RecId;

         // Salayry
        select firstOnly PlanId,PayRate from hRMCompFixedEmpl
        where hcmPosition.RecId==hRMCompFixedEmpl.Position;
        if(hRMCompFixedEmpl.PlanId=="A-H17%-O83")
        {
        workerReportTB.SalaryEmp=hRMCompFixedEmpl.PayRate (hRMCompFixedEmpl.PayRate*2);
        }
        else if(hRMCompFixedEmpl.PlanId=="S-H20%-O")
        {
            workerReportTB.SalaryEmp=hRMCompFixedEmpl.PayRate (hRMCompFixedEmpl.PayRate*1.2);
        }
        else if(hRMCompFixedEmpl.PlanId=="S-H20%-O20")
        {
            workerReportTB.SalaryEmp=hRMCompFixedEmpl.PayRate (hRMCompFixedEmpl.PayRate*1.4);
        }
        else if(hRMCompFixedEmpl.PlanId=="SS-H20%-O40")
        {
            workerReportTB.SalaryEmp=hRMCompFixedEmpl.PayRate (hRMCompFixedEmpl.PayRate*1.6);
        }
        else if(hRMCompFixedEmpl.PlanId=="S-H20%-O60")
        {
            workerReportTB.SalaryEmp=hRMCompFixedEmpl.PayRate (hRMCompFixedEmpl.PayRate*1.8);
        }
        else if(hRMCompFixedEmpl.PlanId=="S-H20%-O80")
        {
            workerReportTB.SalaryEmp=hRMCompFixedEmpl.PayRate (hRMCompFixedEmpl.PayRate*2);
        }
        else
        {
             workerReportTB.SalaryEmp=hRMCompFixedEmpl.PayRate (hRMCompFixedEmpl.PayRate*4);
        }

        select * from hcmPositionDetail
        where hcmPosition.RecId==hcmPositionDetail.Position;
         // Position
        workerReportTB.PositionEmp=hcmPositionDetail.description;


        select Department from hcmPositionDetail
        where hcmPositionDetail.Position==hcmPosition.RecId;

        select Name from oMOperatingUnit
        where oMOperatingUnit.RecId==hcmPositionDetail.Department;
        // DEPARTMENT
        workerReportTB.DepartmentEmp=oMOperatingUnit.Name;

        select PaidByLegalEntity from payrollPositionDetails
        where hcmPositionWorkerAssignment.Position==payrollPositionDetails.Position;


        select DataArea from companyInfo
        where payrollPositionDetails.PaidByLegalEntity==companyInfo.RecID;
        // company
        workerReportTB.CompanyEmp=companyInfo.DataArea;


        workerReportTB.insert();
    }

}

public void processReport()
{
    this.insertData();
}

is there any guide to make me using Select button to catch data depend on my RDP class

because i'm using so many tables

  • mohammed.mqi Profile Picture
    mohammed.mqi 2,030 on at
    RE: report RDP how using select parameters

    ok thanks for info but here i have many tables even i want my select can use field as parameters

    how can i use that on my RDP because it's so impossible to build my select statement by using query 

  • Blue Wang Profile Picture
    Blue Wang on at
    RE: report RDP how using select parameters

    Hi Mohammed,

    I agree to use SRSReportQueryAttribute.

    Please read this case:

    alfasith.blogspot.com/.../ssrs-reports-using-rdb-class-in-dynamic.html

  • Suggested answer
    Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,091 on at
    RE: report RDP how using select parameters

    Hi Mohammed,

    First, you need to create a query that will match your requirements for the report.

    Then you need to add attribute SRSReportQueryAttribute to your data provider class.

    After you added it, you need to go to the report and check if the property "Dynamics filters" is True for data set and refresh it. You should see the new parameter in parameters node for data set (something with DynamicsParameters)

    You can check AssetAcquisition report as an example.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,401 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans