Note: This page includes content based on the F1 documentation for Centura development. It may be partially converted to support APF development, but should be regarded to be of uncertain actuality. It is provided as is. Eventually, it should be replaced by documentation available from within Visual Studio.
SalNumber DataSourcePrint(SalNumber nWhat, SalNumber nhWndTable)
Applications and the framework call the DataSourcePrint method to print the information in a data source. This method will be overridden.
Name | Description |
---|---|
SalNumber nWhat | Standard method parameter. Possible values are Const.METHOD_Inquire, Const.METHOD_Execute, Const.METHOD_GetType. |
SalNumber nhWndTable | Unused. The framework ignores the value of this parameter. |
When nWhat = Const.METHOD_Inquire: the return value is TRUE if the data source can
be printed, FALSE otherwise.
When nWhat = Const.METHOD_Execute: the return value
is TRUE if the data source was successfully printed, FALSE otherwise.
When
nWhat = Const.METHOD_GetType, the return value is Const.CHILDTYPE_SourceMethod.
The framework provides an implementation of DataSourcePrint that prints the
table contents for table data sources, and forwards the print request to the
logical parent for other data sources.
Applications may override the DataSourcePrint method to perform some other
operation, e.g. ordering an Info Services report.
DataSourcePrint is called automatically by the framework when a data source
receives the PM_RequestForPrint message.
Function: DataSourcePrint
Description:
Actions
Select Case nWhat
Case METHOD_Inquire
Return SalTblAnyRows( i_hWndFrame, ROW_Selected, 0 )
Case METHOD_GetType
Return CHILDTYPE_SourceMethod
Case METHOD_Execute
Set nRow = TBL_MinRow
Set nContext = SalTblQueryContext( i_hWndSelf )
While SalTblFindNextRow( i_hWndSelf, nRow, ROW_Selected, 0 )
Call SalTblSetContext( i_hWndSelf, nRow )
Set lsInstanceAttr[i] = InfoService.ItemValueCreate( 'RESULT_KEY', SalNumberToStrX( i_hWndSelf.colResultKey, 0 ) )
Set i = i + 1
Call SalTblSetContext( i_hWndSelf, nContext )
Return InfoService.ReportListPrint( InfoService.ItemValueCreate( 'OUTPUT', 'DIALOG' ), lsInstanceAttr )