PdcOverview.GetMaterialPrognosis: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
Created page with "== Declaration == PurchaseInvoices as PdcPurchaseInvoices == Description == == Notes == == Code example == <source lang="vb"> </source> == Availability =="
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Declaration ==
== Declaration ==
PurchaseInvoices as [[PdcPurchaseInvoices]]
GetMaterialPrognosis() as string


== Description ==
== Description ==
 
Generates the calculationoverview "Material Prognosis" and returns the created tablename.


== Notes ==
== Notes ==
 
Before generation of the overview, you can change all overview settings by writing them directly in ConfigDB.


== Code example ==
== Code example ==


<source lang="vb">
<source lang="vb">
Dim aView
Dim aTableName
dim aQuery
set aView = pdc.overview
aTableName = aview.GetMaterialPrognosis
msgbox aTableName
set Qry = pdc.Database.OpenQuery(1) '1 = database
Qry.SQL = "SELECT * FROM " & aTableName
if Qry.Execute then
  if Qry.RecordCount > 0 then
    msgbox Qry.RecordCount
  else
    msgbox "no records"
  end if
else
  msgbox pdc.LastError
end if


</source>
</source>


== Availability ==
== Availability ==
Available since October 2019 (From version 5.5)

Latest revision as of 06:45, 7 October 2019

Declaration

GetMaterialPrognosis() as string

Description

Generates the calculationoverview "Material Prognosis" and returns the created tablename.

Notes

Before generation of the overview, you can change all overview settings by writing them directly in ConfigDB.

Code example

Dim aView
Dim aTableName
dim aQuery

set aView = pdc.overview
aTableName = aview.GetMaterialPrognosis

msgbox aTableName

set Qry = pdc.Database.OpenQuery(1) '1 = database
Qry.SQL = "SELECT * FROM " & aTableName
if Qry.Execute then
  if Qry.RecordCount > 0 then
     msgbox Qry.RecordCount
   else
     msgbox "no records"
   end if
else
   msgbox pdc.LastError
end if

Availability

Available since October 2019 (From version 5.5)