of_RegisterReportColumn


pfcapsrv.pbl   >   pfc_n_cst_lvsrv_datasource   >   of_RegisterReportColumn   

Full name pfc_n_cst_lvsrv_datasource.of_RegisterReportColumn
Access public
Extend of integer
Return value integer
Prototype public function integer of_RegisterReportColumn(n_ds,string,string)

Name Datatype
No Data

Name Datatype
lal_Align alignment

public function integer of_RegisterReportColumn (n_ds ads_obj, string as_columnname, string as_columnlabel);//////////////////////////////////////////////////////////////////////////////
//	Public Function:	of_RegisterReportColumn
//	Arguments:		ads_obj			The data store which holds the column information of as_columnname
//						as_ColumnName	The column in the DataWindow object to add as a column in the ListView. 
//						as_ColumnLabel	The heading for the column to display in the ListView
//	Returns:			Integer
//						The index of the column if added successfully
//						-1 if an error occurred
//	Description:	Add a column to the ListView control.  It will be displayed 
//						in Report View only.	This function overrides the real 
//						of_RegisterReportColumn to allow the column width and alignment
//						to be determined by the width of the column in the DataWindow.
//////////////////////////////////////////////////////////////////////////////
//	Rev. History:	Version
//						6.0   Initial version
//////////////////////////////////////////////////////////////////////////////
//	Copyright © 1996-1999 Sybase, Inc. and its subsidiaries.  All rights reserved.  Any distribution of the 
// PowerBuilder Foundation Classes (PFC) source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//////////////////////////////////////////////////////////////////////////////
alignment		lal_Align

// Validate required reference.
if IsNull(ads_obj) or not IsValid(ads_obj) then return -1
if IsNull(as_columnname) or (trim(as_columnname) = "") then return -1
if IsNull(as_columnlabel) or (trim(as_columnlabel) = "") then return -1

// Get the alignment of the column in the DataWindow
choose case Lower(ads_obj.Describe(as_ColumnName + ".alignment"))
	case "0"
		lal_Align = Left!
	case "1"
		lal_Align = Right!
	case "2"
		lal_Align = Center!
end choose

// Add the column to the ListView
return of_RegisterReportColumn(ads_obj, as_ColumnName, as_ColumnLabel, lal_Align)
end function

     
Name Owner
pfc_n_cst_lvsrv_datasource.of_RegisterReportColumn pfc_n_cst_lvsrv_datasource

     
Name Owner
datastore.describe datastore
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
systemfunctions.lower systemfunctions
systemfunctions.trim systemfunctions
pfc_n_cst_lvsrv_datasource.of_RegisterReportColumn pfc_n_cst_lvsrv_datasource

     
Full name
No Data

     
Name Scope
No Data