Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Report Data Set Erro in SSRS report when RDP class is running for all the records.

Posted on by 185

I have a report and a condition that when there is no parameter the report should run for all the records, so when my report is running it is taking a long time and giving dataset report error.  here is my code, can I write it in a more efficient way?

else if(!_FromDate  && !_ToDate)
            {
                while select QuotationId, CustAccount, XYZProjId, XYZJobNumber, QuotationStatus , WorkerSalesResponsible, XYZAttention, Estimate, XYZProjName, XYZQuoteActive, XYZBuilder, XYZInvestor, XYZReason, ABCInternalDescription, XYZSpecifier, XYZAccessRestrictions from salesQuotationTableHeader
                {
                    this.insertSalesQuotationHeader();
 
                    while select QuotationId, JobNumber, CustAccount, QuotationStatus, WorkerSalesResponsible, Contactpersonid  from xyzSalesQuotationCustomers
                        //where dfsmSalesQuotationCustomers.QuotationId == quotationInternalBuff
                         Join  XYZProjId, XYZAttention, Estimate, XYZProjName, XYZQuoteActive , XYZBuilder, XYZInvestor, XYZReason, ABCInternalDescription, XYZSpecifier,XYZAccessRestrictions from salesQuotationTable
                            where  xyzSalesQuotationCustomers.QuotationId == salesQuotationTable.QuotationId
          
                    {
                        
                        this.insertSalesQuotationTmp();
                    }
                }
            }
  • Suggested answer
    Leo Chen Profile Picture
    Leo Chen on at
    RE: Report Data Set Erro in SSRS report when RDP class is running for all the records.

    If possible, do not use nested while which will introduce bad performance when there are huge amount of records. Try to create a external static view outside which will join the 2 tables; or even only while loop the sub table which is xyzSalesQuotationCustomers in your case order by QuotationId, and in the body of the while loop, just detect if the QuotationId is changed, just initialize the sales quotationheader which should be your  this.insertSalesQuotationHeader();

  • bilal170795 Profile Picture
    bilal170795 185 on at
    RE: Report Data Set Erro in SSRS report when RDP class is running for all the records.

    I tried to use a view for the nested while loop but I think I am doing something wrong in my code

    else if(!_FromDate  && !_ToDate)

               {

                   while select QuotationId, CustAccount, DFSMProjId, DFSMJobNumber, QuotationStatus , WorkerSalesResponsible, DFSMAttention, Estimate,                                     DFSMProjName, DFSMQuoteActive, DFSMBuilder, DFSMInvestor, DFSMReason, PSAInternalDescription, DFSMSpecifier,                                                         DFSMAccessRestrictions from salesQuotationTableHeader

                   {

                       this.insertSalesQuotationHeader();

                       while select * from salesQuotView

                       {

                           this.insertSalesQuotationTmp();

                       }

                   }

               }

  • udaY-ch Profile Picture
    udaY-ch 4,624 on at
    RE: Report Data Set Erro in SSRS report when RDP class is running for all the records.

    Hi,

    Did you try writing single while loop? seems you can get most of the fields in single while loop just by referring your field list for header and line.

    Based on the unique field. You can insert the header once and process lines and when unique record changes again insert header.

    Uday

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