PdcProductReports.New: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 17: | Line 17: | ||
set objReport = pdc.ProductRegistration.ProductReports.New | set objReport = pdc.ProductRegistration.ProductReports.New | ||
objReport.ProductionNumber = "10200" | objReport.ProductionNumber = "10200" | ||
objReport.FinishedReport = True | |||
objReport.AllOpertionsReady = True | |||
objReport.InternalReady = True | |||
objReport.ProductFinished = True | |||
objReport.Quantity = 1 | objReport.Quantity = 1 | ||
if not objReport.Save then | if not objReport.Save then | ||
msgbox objReport.Error | msgbox objReport.Error |
Revision as of 07:35, 14 October 2014
Declaration
New as PdcProductReport
Description
Notes
This function return a new product report object. The product report object has two different reportstates, Report finished products or normal reports (of an operation). Note that reporting finished products is not fully implemented yet. It is expected in version 4.3 or onwards.
Code example
This code example creates a new finished product report for productionorder 10200.
dim objReport
set objReport = pdc.ProductRegistration.ProductReports.New
objReport.ProductionNumber = "10200"
objReport.FinishedReport = True
objReport.AllOpertionsReady = True
objReport.InternalReady = True
objReport.ProductFinished = True
objReport.Quantity = 1
if not objReport.Save then
msgbox objReport.Error
end if
This code example creates a new product report for productionorder 10200 operation line 10.
dim objReport
set objReport = pdc.ProductRegistration.ProductReports.New
objReport.ProductionNumber = "10200"
objReport.Quantity = 1
objReport.LineNumber = 10
objReport.FinishedReport = true
objReport.CurrentOperationReady = true
if not objReport.Save then
msgbox objReport.Error
end if
Availability
Available from version 4.0 onwards.