web
You’re offline. This is a read only version of the page.
close
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

error when i add tow Multi-Select Lookup for SSRS Report Dialog

(0) ShareShare
ReportReport
Posted on by 2,050

Greeting everyone 

here i add tow  Multi-Select Lookup for SSRS Report Dialog

and those take from companyInfo table and dimensionFinancialTag table 

and those doesn't have relation between them

but when i try to call report i got this error 

pastedimage1618408967312v1.png

and this is my code

pastedimage1618409173906v2.png

[SysEntryPointAttribute]
public void processReport()
{
    CompanyInfo companyInfo;
    DimensionFinancialTag   dimensionFinancialTag;
    Query                   query;
    QueryRun                queryRun;
    ListIterator            companyListIterator,branchListIterator;
    QueryBuildDataSource    qbdsCompany,qbdsbranch;

    PayrollPayPeriodRecId           payrollPayPeriodRecId,payrollPayPeriodRecIdscound;


    TotalSalaryByBranchContract  totalSalaryByBranchContract;

    this.insertTmpBranch();

    contract = this.parmDataContract() as TotalSalaryByBranchContract;

    payrollPayPeriodRecId=contract.parmPayrollPayPeriodRecId();
    payrollPayPeriodRecIdscound=contract.parmpayrollPayPeriodRecIdScound();


    companyListIterator = new ListIterator(contract.parmSalaryTotalcompany());

    branchListIterator = new ListIterator(contract.parmSalaryTotalbranch());


    qbdsCompany = query.dataSourceTable(tableNum(CompanyInfo));
    qbdsbranch = query.dataSourceTable(tableNum(DimensionFinancialTag));
    
    while(companyListIterator.more())
    {
        qbdsCompany.addRange(
            fieldNum(CompanyInfo, DataArea)).value(companyListIterator.value());
        companyListIterator.next();
    }
    
    
    while(branchListIterator.more())
    {
        qbdsbranch.addRange(
            fieldNum(DimensionFinancialTag, Value)).value(branchListIterator.value());
        branchListIterator.next();
    }
    

    queryRun = new QueryRun(query);

    while(queryRun.next())
    {
        companyInfo = queryRun.get(tableNum(companyInfo));
        dimensionFinancialTag = queryRun.get(tableNum(dimensionFinancialTag));
        this.populateTmpTable(companyInfo.DataArea,dimensionFinancialTag.Value,payrollPayPeriodRecId,payrollPayPeriodRecIdscound);
    }






}

I have the same question (0)
  • Suggested answer
    ergun sahin Profile Picture
    8,826 Moderator on at

    You defined the query but did not assign anything. So its null, dont have any datasource etc.. It's very normal that you get a error.

  • mohammed.mqi Profile Picture
    2,050 on at

    thanks for replay

    how assign tow Multi-Select to query?

  • mohammed.mqi Profile Picture
    2,050 on at

    how solve that problem ?!

  • Suggested answer
    ergun sahin Profile Picture
    8,826 Moderator on at

    There are multiple errors in the code. I do not understand exactly what are you doing, but I will try to be as helpful as I can.
    First, let's discuss whether you need a query or not. If you do not want to add different ranges in the two tables mentioned, you already have values, in the Iterator, call your method. Maybe something like this;

    while(companyListIterator.more())
    {
        while(branchListIterator.more())
        {
            this.populateTmpTable(companyListIterator.value(),branchListIterator.value(),payrollPayPeriodRecId,payrollPayPeriodRecIdscound);
            branchListIterator.next();
        }
        companyListIterator.next();
    }

    Since the two tables are not related, it does not make much sense to use a query, but if you say "I will use it",  then you should either assign a new query with an existing query or create a query from scratch by making a new query and adding datasoruce to it.

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 559 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans
Liquid error: parsing "/globalsearch/?q=xiara++spls" - Nested quantifier +.