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, ...
Unanswered

SSRS Report on Estimates

(0) ShareShare
ReportReport
Posted on by 390

Hey team,

I'm making a SSRS report on the estimates for a project for different customers. I have a requirement where on my dialog form of the report if the user selects ReportLevel = "Estimate" then display the report this way:

EstimateVIew.png

When ReportLevel = "Project"

ProjectView.png

When ResportLevel = "Customer"( the sum of all types of costs for all the projects for 1st customer should be shown)

customerview1.png

In case of the customer view I'm having a problem. I have to display the total of fees,3rd party cost,Production Insurance, CSS cost for all the projects under that customer. I'm not getting it how can I do it. I'm getting it same way as the above two conditions. Please help me with this. My code:

[SRSReportParameterAttribute(classstr(ProjectEstimateContract))]
class ProjectEstimateDP extends SRSReportDataProviderBase
{
   ProjectEstimatesTmp projectEstimatesTmp;
    int counter1 = 0;
    TransDate _tempdate,_tempdate1;

       
        [SRSReportDataSetAttribute(tableStr(ProjectEstimatesTmp))]
    public ProjectEstimatesTmp getProjectEstimatesTmp()
    {
        select * from projectEstimatesTmp;
        return projectEstimatesTmp;
    }

    public void processReport()
    {
       
        ProjectEstimates projectestimates;
        ProjectEstimateContract contract;
        EstimateThirdPartyCostStages thirdPartyCostStages;
        CustTable custable;
        ProjectEstimatesTmpClass estimatetmpclass = new ProjectEstimatesTmpClass();
        ProjId projId;
        ProjTable projTable;
        ReportLevel reportlevel;
        TransDate fromdate,todate,startedate,startthirdpartydate;
        FeeStages feestage;
       
        real thirdpartycost,ecost,prodinsurance,csslevy;

        contract = this.parmDataContract() as ProjectEstimateContract;
        projId = contract.parmProjId();
        fromdate = contract.parmProjFromDate();
        todate = contract.parmProjToDate();
        reportlevel = contract.parmReportLevel();

   
        while select projectestimates
            where projectestimates.ProjId == projId
        {        
            startedate = EstimateStartDate::find(projectestimates.RecId,EstimateStages::Stage1,EstimateSection::EFee).StartDate;
            startthirdpartydate = EstimateStartDate::find(projectestimates.RecId,EstimateStages::Stage1,EstimateSection::ThirdPartyCosts).StartDate;
          
            if(counter1 == 0)
            {
                _tempdate = startedate;
                _tempdate1 = startthirdpartydate;
                counter1  ;
            }
            int   pass =  (mthOfYr(startedate) - mthOfYr(_tempdate));
            int pass2 = (mthOfYr(startthirdpartydate) - mthOfYr(_tempdate1));

           
                ecost = estimatetmpclass.getTotalEFees(projectestimates.RecId,startenginedate,fromdate,todate,pass);
                thirdpartycost = estimatetmpclass.getthirdpartycost(projectestimates.RecId,startthirdpartydate,fromdate,todate,pass2);
                prodinsurance = estimatetmpclass.getproductionInsurance(thirdpartycost,projectestimates.ProdInsurance);
                csslevy = estimatetmpclass.getCSSLevy(enginecost,thirdpartycost,prodinsurance,projectestimates.CCSLevy);

                if(reportlevel == ReportLevel::Customer)
                {

                    projectEstimatesTmp.CustAccountNumber = contract.parmCustomerCode();
                    select firstonly projtable where projTable.ProjId == contract.parmProjId();
                    projectEstimatesTmp.CustName = projTable.custName();
                    projectEstimatesTmp.PotentialFee = ecost;
                    projectEstimatesTmp.thirdPartyCostTotal = thirdpartycost;
                    projectEstimatesTmp.IsProdInsurance = projectestimates.IsProdInsurance;
                    if(   projectEstimatesTmp.IsProdInsurance)
                    {
                        projectEstimatesTmp.ProdInsurance = prodinsurance;
                    }
                    else
                    {
                        projectEstimatesTmp.ProdInsurance = 0;
                    }
              
                    projectEstimatesTmp.IsCCSLevy = projectestimates.IsCCSLevy;
                    if(projectEstimatesTmp.IsCCSLevy)
                    {
                        projectEstimatesTmp.CCSLevy = csslevy;
                    }

                    else
                    {
                        projectEstimatesTmp.CCSLevy = 0;
                    }
                    projectEstimatesTmp.InvestmentEstimate = projectestimates.InvestmentEstimate;
                    projectEstimatesTmp.Total = ecost  thirdpartycost   prodinsurance   csslevy;

                    projectEstimatesTmp.insert();
                }

                else
                if(reportlevel == TEGReportLevel::Project)
                {
                    projectEstimatesTmp.ProjId = projectestimates.ProjId;
                    projectEstimatesTmp.PotentialFee = ecost;
                    projectEstimatesTmp.CustAccountNumber = contract.parmCustomerCode();
                    select firstonly projtable where projTable.ProjId == contract.parmProjId();
                    projectEstimatesTmp.CustName = projTable.custName();
                    projectEstimatesTmp.ProjName = projTable.Name;
                    projectEstimatesTmp.thirdPartyCostTotal = thirdpartycost;
          
                    projectEstimatesTmp.IsProdInsurance = projectestimates.IsProdInsurance;
                    if(   projectEstimatesTmp.IsProdInsurance)
                    {
                        projectEstimatesTmp.ProdInsurance = prodinsurance;
                    }
                    else
                    {
                        projectEstimatesTmp.ProdInsurance = 0;
                    }
              
                    projectEstimatesTmp.IsCCSLevy = projectestimates.IsCCSLevy;
                    if(projectEstimatesTmp.IsCCSLevy)
                    {
                        projectEstimatesTmp.CCSLevy = csslevy;
                    }

                    else
                    {
                        projectEstimatesTmp.CCSLevy = 0;
                    }
                    projectEstimatesTmp.InvestmentEstimate = projectestimates.InvestmentEstimate;
                    projectEstimatesTmp.Total = e  thirdpartycost   prodinsurance   csslevy;

                    projectEstimatesTmp.insert();
        
                }
                else
                {
                    projectEstimatesTmp.ProjId = projectestimates.ProjId;
                    projectEstimatesTmp.EstimateCode = projectestimates.EstimateCode;
                    projectEstimatesTmp.EstimateName = projectestimates.Name;
                    projectEstimatesTmp.PotentialFee = ecost;
                    projectEstimatesTmp.CustAccountNumber = contract.parmCustomerCode();
                    select firstonly projtable where projTable.ProjId == contract.parmProjId();
                    projectEstimatesTmp.CustName = projTable.custName();
                    projectEstimatesTmp.ProjName = projTable.Name;
                    projectEstimatesTmp.thirdPartyCostTotal = thirdpartycost;
          
                    projectEstimatesTmp.IsProdInsurance = projectestimates.IsProdInsurance;
                    if(   projectEstimatesTmp.IsProdInsurance)
                    {
                        projectEstimatesTmp.ProdInsurance = prodinsurance;
                    }
                    else
                    {
                        projectEstimatesTmp.ProdInsurance = 0;
                    }
              
                    projectEstimatesTmp.IsCCSLevy = projectestimates.IsCCSLevy;
                    if(projectEstimatesTmp.IsCCSLevy)
                    {
                        projectEstimatesTmp.CCSLevy = csslevy;
                    }

                    else
                    {
                        projectEstimatesTmp.CCSLevy = 0;
                    }
                    projectEstimatesTmp.InvestmentEstimate = projectestimates.InvestmentEstimate;
                    projectEstimatesTmp.Total = ecost  thirdpartycost   prodinsurance   csslevy;

                    projectEstimatesTmp.insert();
                }
            }
        
        }

}

I have the same question (0)
  • huijij Profile Picture
    19,811 on at

    HI skd

    Have you solved your problem?

    IF not Whether to get the error message?

    regards

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

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 254 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans