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,alignment)

Name Datatype
No Data

Name Datatype
li_Width Integer

public function integer of_RegisterReportColumn (n_ds ads_obj, string as_columnname, string as_columnlabel, alignment aal_alignment);//////////////////////////////////////////////////////////////////////////////
//	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
//						aal_Alignment		The alignment of the column in the ListView 
//												(Left!, Right!, Center!, Justify!).
//	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 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.
//////////////////////////////////////////////////////////////////////////////
Integer		li_Width

// 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 width of the column in the DataWindow
li_Width = Integer(ads_obj.Describe(as_ColumnName + ".width"))

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

     
Name Owner
pfc_n_cst_lvsrv_datasource.of_RegisterReportColumn pfc_n_cst_lvsrv_datasource

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

     
Full name
No Data

     
Name Scope
No Data