Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

using tow RDP on one report with one parameter

Posted on by 2,016

greeting everyone i'v created new custom report and it have 2 RDP  and i have 2 table mean every table take 1 dataset

so when i call my report the first table has been fill but second table didn't fill and i made both table take one parameter 

1st.JPG

i directed the parameter of dataset2 to parameter dataset1
to make them take only one parameter

pastedimage1581417877217v1.png

 

and here my code 

[SysEntryPointAttribute]
public void processReport()
{

    PayrollPayStatementBenefitLine  payrollPayStatementBenefitLine;

    PayrollPayStatementEarningLine  payrollPayStatementEarningLine;

    PayrollPayStatementLine         payrollPayStatementLine;

    PayrollPayStatement         payrollPayStatement;

    PayrollEarningCode          payrollEarningCode;

     HcmWorker   hcmWorker;

    HcmPosition hcmPosition;

    HcmPositionWorkerAssignment hcmPositionWorkerAssignment;

    //HcmWorkerRecId hcmWorkerRecId;

    PayrollPayStatementId   payrollPayStatementId;

    //int64 Idforline,PeriodX;

    str ispaypost;

    contract = this.parmDataContract() as PayStatmentRPDPContract;

    PayrollPayStatementId=contract.parmPayrollPayStatementId();


    //PeriodX=contract.parmPayPeriod();

    select * from payrollPayStatement
    where payrollPayStatement.DocumentNumber==PayrollPayStatementId;

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

             while select * from payrollPayStatementEarningLine
     where (payrollPayStatementEarningLine.PayStatement==payrollPayStatement.RecId)
     join payrollEarningCode where payrollEarningCode.RecId == payrollPayStatementEarningLine.EarningCode
     join payrollPayStatementLine where payrollPayStatementLine.RecId==payrollPayStatementEarningLine.RecId
     join hcmPosition where hcmPosition.RecId==payrollPayStatementLine.Position
     {
         payStatmentRPTemp.clear();
         //payrollPayStatementEarningLine = qRun.get(tableNum(PayrollPayStatementEarningLine));
         //payStatmentRPTemp.DocumentNumber=docpaynum;

         //payStatmentRPTemp.PostedStatus=ispaypost;
         payStatmentRPTemp.WorkerName=hcmWorker.name();
         payStatmentRPTemp.AccountingCurrencyAmount=payrollPayStatementEarningLine.AccountingCurrencyAmount;
         payStatmentRPTemp.PersonalNumber=hcmWorker.PersonnelNumber;
         payStatmentRPTemp.Position=hcmPosition.description();
         payStatmentRPTemp.AccountingDate=payrollPayStatementEarningLine.AccountingDate;
         payStatmentRPTemp.Description=payrollEarningCode.Description;
         payStatmentRPTemp.EarningCode=payrollPayStatementEarningLine.EarningCode;
         payStatmentRPTemp.Quantity=payrollPayStatementEarningLine.Quantity;
         payStatmentRPTemp.EarningRate=payrollPayStatementEarningLine.EarningRate;
         if(payrollPayStatement.PostedStatus == PayrollPayStatementPostedStatus::Posted)
         {
             payStatmentRPTemp.PostedStatus="مسودة";
         }
         payStatmentRPTemp.insert();

     }


    while select * from payrollPayStatementBenefitLine
    where payrollPayStatementBenefitLine.PayStatement==payrollPayStatement.RecId
        && payrollPayStatementBenefitLine.IsEmployer==false
    join payrollPayStatementLine where payrollPayStatementLine.RecId==payrollPayStatementBenefitLine.RecId
    join hcmPosition where hcmPosition.RecId==payrollPayStatementBenefitLine.Position
    {
        benefitDeductionLinesTemp.clear();
        benefitDeductionLinesTemp.Amount=payrollPayStatementBenefitLine.AccountingCurrencyAmount;
        benefitDeductionLinesTemp.Benefit=payrollPayStatementBenefitLine.displayBenefitPlanDescription();
        benefitDeductionLinesTemp.Position=hcmPosition::find(payrollPayStatementBenefitLine.Position).description();
        benefitDeductionLinesTemp.insert();
    }



}

but this table didn't fill (benefitDeductionLinesTemp)

and i'm sure from my select statement

what did i miss in this case 

  • Martin Dráb Profile Picture
    Martin Dráb 230,214 Most Valuable Professional on at
    RE: using tow RDP on one report with one parameter

    I would follow Sergei's suggestion and use the debugger to see what's going on in code.

  • mohammed.mqi Profile Picture
    mohammed.mqi 2,016 on at
    RE: using tow RDP on one report with one parameter

    i have only one RDP class

    and there 2 table come from that RDP class

    and in ssrs when i try to call dataset i can only call one dataset for each table

    so i call tow dataset to get each table

  • Verified answer
    Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,089 on at
    RE: using tow RDP on one report with one parameter

    Hi Mohammed,

    Have you tried to debug the code? Did you hit breakpoint inside the loop?

    You wrote that you have 2 RDP. Did you mean that you have two datasets on the report? Or you have 2 RDP classes for one SSRS report?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans