JobProfitabilityDetail report for all customers for a date range using Quickbooks SDK 13.0

Viewed 50

I would like to run the JobProfitabilityDetail report for a given date range for all customers. According to the documentation, there is an Entity Filter required to run this report, but I don't see a way to set it up to get all customers in a date range.

My first attempt is to get all date ranges from the sample Company to return the report. Here is the code I used to build the request object:

IJobReportQuery JobReportQueryRq = requestMsgSet.AppendJobReportQueryRq();
JobReportQueryRq.JobReportType.SetValue(ENJobReportType.jrtJobProfitabilityDetail);
JobReportQueryRq.ORReportPeriod.ReportDateMacro.SetValue(ENReportDateMacro.rdmAll);
JobReportQueryRq.ORReportModifiedDate.ReportModifiedDateRangeMacro.SetValue(ENReportModifiedDateRangeMacro.rmdrmAll);

If I run this query, it returns the status message of:

"There is a missing element: "ReportEntityFilter"."

Which makes sense because the documentation says I need an Entity Filter. So I can add the filter. The four choices are Customer, Employee, OtherName, Vendor. The only one that makes sense is Customer which I add as:

 JobReportQueryRq.ReportEntityFilter.ORReportEntityFilter.EntityTypeFilter.SetValue(ENEntityTypeFilter.etfCustomer);

Adding this to the query, I get the status message of:

"There is a missing element: "ListID, FullName, FullNameWithChildren, or ListIDWithChildren"."

I don't see an option to get all customers. I tried a single customer to see if I could return results by adding:

JobReportQueryRq.ReportItemFilter.ORReportItemFilter.FullNameList.Add("Abercrombie, Kristy");

I got the same error about there being a missing element ListID, FullName, etc.

Any ideas about how to run this report for all customers in a date range?

0 Answers
Related