PdcReport.AddFilter: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
Created page with "== Declaration == AddFilter(TableName as String,Filter as String) as Boolean == Description == == Notes == With this method a filter can be added to the report, to filter d..."
 
Line 21: Line 21:


   set objReport = pdc.Reports.Open(336)
   set objReport = pdc.Reports.Open(336)
   if objReport.AddFilter("DO_CALC", "DO_ORDNR='00464'") then
   if objReport.AddFilter("DO_ORDER", "DO_ORDNR='00464'") then
     objReport.PrintToPrinter 1, ""
     objReport.PrintToPrinter 1, ""
   else
   else

Revision as of 11:49, 26 July 2013

Declaration

AddFilter(TableName as String,Filter as String) as Boolean

Description

Notes

With this method a filter can be added to the report, to filter data.

Parameters - Description
TableName - The reporttablename which has to be filtered.
Filter - The filter value like a filter in PdC.

The methode AddFilter doesn't work in combination with the Print and the Printpreview methode.

Code example

This example code opens a report with ID 336 and shows the report only for calculation "00464".

dim objReport

  set objReport = pdc.Reports.Open(336)
  if objReport.AddFilter("DO_ORDER", "DO_ORDNR='00464'") then
    objReport.PrintToPrinter 1, ""
  else
    msgbox "This is not a correct filter."
  end if

Availability

Available since February 2011 (from version 4.2).