diff --git a/Project/Sources/Methods/C_Print_label.4dm b/Project/Sources/Methods/C_Print_label.4dm index 38798b6..2ad1d00 100644 --- a/Project/Sources/Methods/C_Print_label.4dm +++ b/Project/Sources/Methods/C_Print_label.4dm @@ -251,6 +251,35 @@ Case of "right";$Lon_right;\ "bottom";$Lon_bottom) +/* +calculate the default number of rows and columns +this is for when a form was specified without a .4lbp file +otherwise, the values in .4lbp should be respected +*/ + + C_TEXT:C284($Dom_buffer) + $Dom_buffer:=DOM Find XML element by ID:C1010($Dom_label;"gap") + C_LONGINT:C283($Lon_hGap;$Lon_vGap) + If (OK=1) + DOM GET XML ATTRIBUTE BY NAME:C728($Dom_buffer;"horizontal";$Lon_hGap) + DOM GET XML ATTRIBUTE BY NAME:C728($Dom_buffer;"vertical";$Lon_vGap) + End if + C_LONGINT:C283($Lon_printableHeight;$Lon_printableWidth) + GET PRINTABLE AREA:C703($Lon_printableHeight;$Lon_printableWidth) + C_LONGINT:C283($Lon_columns;$Lon_rows) + $Lon_printableWidth:=$Lon_printableWidth-$Lon_left-$Lon_right + While ($Lon_printableWidth>=$Lon_width) + $Lon_columns:=$Lon_columns+1 + $Lon_printableWidth:=$Lon_printableWidth-$Lon_width-$Lon_hGap + End while + $Lon_printableHeight:=$Lon_printableHeight-$Lon_top-$Lon_bottom + While ($Lon_printableHeight>=$Lon_height) + $Lon_rows:=$Lon_rows+1 + $Lon_printableHeight:=$Lon_printableHeight-$Lon_height-$Lon_vGap + End while + + DOM SET XML ATTRIBUTE:C866($Dom_label;"columns";$Lon_columns;"rows";$Lon_rows) + $Boo_OK:=(OK=1) //______________________________________________________ diff --git a/Project/Sources/Methods/Print_Label.4dm b/Project/Sources/Methods/Print_Label.4dm index 93d5290..0c905e1 100644 --- a/Project/Sources/Methods/Print_Label.4dm +++ b/Project/Sources/Methods/Print_Label.4dm @@ -38,57 +38,57 @@ If (False:C215) C_LONGINT:C283(Print_Label;$1) C_TEXT:C284(Print_Label;$2) C_BOOLEAN:C305(Print_Label;$3) -End if +End if // ---------------------------------------------------- // Initialisations $Lon_parameters:=Count parameters:C259 If (Asserted:C1132($Lon_parameters>=2;"Missing parameter")) - + // Required parameters $Lon_table:=$1 // No de la table $Dom_label:=$2 // Reference XML - + // Optional parameters If ($Lon_parameters>=3) - + //#redmine:18107 $Boo_preview:=$3 - - End if - + + End if + COMPILER_LABELS COMPILER_PRINT - + $Ptr_table:=Table:C252($Lon_table) - + print_ERROR:=0 - + $Txt_onErrorCall:=Method called on error:C704 - + ON ERR CALL:C155(Choose:C955(<>Boo_debug;"";"Print_CATCH_ERROR")) - + // Backup the current print settings // Must call before opening job // Need also to turn off progress in database settings GET PRINT OPTION:C734(Hide printing progress option:K47:12;$Lon_backupProgress) GET PRINT OPTION:C734(Orientation option:K47:2;$Lon_backupOrientation) - + //#ACI0099882 { // Ignore the printer margins but consider the paper's margin //SET PRINTABLE MARGIN(0;0;0;0) //} - + //#ACI0097380 // $Lon_backupCaseSensitivity:=Get database parameter(SQL engine case sensitivity) // SET DATABASE PARAMETER(SQL engine case sensitivity;0) - -Else - + +Else + ABORT:C156 - -End if + +End if // ---------------------------------------------------- // Size @@ -116,33 +116,23 @@ DOM GET XML ATTRIBUTE BY NAME:C728($Dom_buffer;"name";$Txt_form) $Boo_form:=(Length:C16($Txt_form)>0) If ($Boo_form) - - // Calculate columns & rows number according to the form dimensions - GET PRINTABLE AREA:C703($Lon_height;$Lon_width) - GET PRINT OPTION:C734(Orientation option:K47:2;$Lon_orientation) - - //#ACI0099200: test below is now commented/ - //If ($Lon_orientation=2) // Landscape - //$Lon_columns:=$Lon_width\$Lon_labelHeight - //$Lon_rows:=$Lon_height\$Lon_labelWidth - //Else - - $Lon_columns:=$Lon_width\$Lon_labelWidth - $Lon_rows:=$Lon_height\$Lon_labelHeight - - //End if - -Else - - //#ACI0099882 { - // Ignore the printer margins but consider the paper's margin + //the differentiation between form by 4lbp and "form:" should be done upstream in L_Print_label + C_LONGINT:C283($legacyMode) + GET PRINT OPTION:C734(Legacy printing layer option:K47:18;$legacyMode) + If ($legacyMode=1) + //according to ACI0099882, the printable margin should not be set to 0 for 32-bit compatible result + Else + SET PRINTABLE MARGIN:C710(0;0;0;0) + End if +Else + //#ACI0099882 { + // Ignore the printer margins but consider the paper's margin SET PRINTABLE MARGIN:C710(0;0;0;0) - //} - - DOM GET XML ATTRIBUTE BY NAME:C728($Dom_label;"columns";$Lon_columns) - DOM GET XML ATTRIBUTE BY NAME:C728($Dom_label;"rows";$Lon_rows) - -End if + //} +End if + +DOM GET XML ATTRIBUTE BY NAME:C728($Dom_label;"columns";$Lon_columns) +DOM GET XML ATTRIBUTE BY NAME:C728($Dom_label;"rows";$Lon_rows) DOM GET XML ATTRIBUTE BY NAME:C728($Dom_label;"labels-per-record";$Lon_perRecord) DOM GET XML ATTRIBUTE BY NAME:C728($Dom_label;"start";$Lon_startIndex) @@ -168,19 +158,19 @@ DOM GET XML ATTRIBUTE BY NAME:C728($Dom_buffer;"vertical";$Lon_vGap) $Dom_buffer:=DOM Find XML element by ID:C1010($Dom_label;"method") If (OK=1) - + DOM GET XML ATTRIBUTE BY NAME:C728($Dom_buffer;"evaluate-per-label";$Boo_perLabel) - + If ($Boo_perLabel) - + DOM GET XML ATTRIBUTE BY NAME:C728($Dom_buffer;"name";$Txt_labelMethod) - - Else - + + Else + DOM GET XML ATTRIBUTE BY NAME:C728($Dom_buffer;"name";$Txt_labelRecord) - - End if -End if + + End if +End if OB SET:C1220($Obj_print;\ "vertical";$Boo_vertical;\ @@ -201,203 +191,203 @@ OPEN PRINTING JOB:C995 //====================================================================== If (print_ERROR=0) - + If ($Boo_vertical) - + $Lon_vStartIndex:=Choose:C955(($Lon_startIndex%$Lon_rows)=0;$Lon_rows;$Lon_startIndex%$Lon_rows) $Lon_hStartIndex:=($Lon_startIndex\$Lon_rows)+Num:C11(0#($Lon_startIndex%$Lon_rows)) - + If ($Lon_hStartIndex>$Lon_columns)\ | ($Lon_hStartIndex<1) - + $Num_xPosition:=1 $Num_hOffset:=$Lon_leftMargin - - Else - + + Else + $Num_xPosition:=$Lon_hStartIndex $Num_hOffset:=$Lon_leftMargin+(($Num_xPosition-1)*($Lon_labelWidth+$Lon_hGap)) - - End if - + + End if + If ($Lon_vStartIndex>$Lon_rows)\ | ($Lon_vStartIndex<1) - + $Num_yPosition:=1 $Num_vOffset:=$Lon_topMargin - - Else - + + Else + $Num_yPosition:=$Lon_vStartIndex $Num_vOffset:=$Lon_topMargin+(($Num_yPosition-1)*($Lon_labelHeight+$Lon_vGap)) - - End if - - Else - + + End if + + Else + If ($Lon_columns=0) //#ACI0099724 - + $Lon_hStartIndex:=1 $Lon_vStartIndex:=1 - - Else - + + Else + $Lon_hStartIndex:=Choose:C955(($Lon_startIndex%$Lon_columns)=0;$Lon_columns;$Lon_startIndex%$Lon_columns) $Lon_vStartIndex:=($Lon_startIndex\$Lon_columns)+Num:C11(0#($Lon_startIndex%$Lon_columns)) - - End if - + + End if + If ($Lon_hStartIndex>$Lon_columns)\ | ($Lon_hStartIndex<1) - + $Num_xPosition:=1 $Num_hOffset:=$Lon_leftMargin - - Else - + + Else + $Num_xPosition:=$Lon_hStartIndex $Num_hOffset:=$Lon_leftMargin+(($Num_xPosition-1)*($Lon_labelWidth+$Lon_hGap)) - - End if - + + End if + If ($Lon_vStartIndex>$Lon_rows)\ | ($Lon_vStartIndex<1) - + $Num_yPosition:=1 $Num_vOffset:=$Lon_topMargin - - Else - + + Else + $Num_yPosition:=$Lon_vStartIndex $Num_vOffset:=$Lon_topMargin+(($Num_yPosition-1)*($Lon_labelHeight+$Lon_vGap)) - - End if - End if - + + End if + End if + $Lon_labelCount:=1 - + FIRST RECORD:C50($Ptr_table->) - + If (Length:C16($Txt_labelRecord)#0)\ & (Is record loaded:C669($Ptr_table->)) - + $Txt_onErrorMethod:=4D_NO_ERROR("ON") EXECUTE METHOD:C1007($Txt_labelRecord) 4D_NO_ERROR("OFF";$Txt_onErrorMethod) - - End if - + + End if + RELATE ONE:C42($Ptr_table->) - + If ($Boo_form) - + FORM LOAD:C1103($Ptr_table->;$Txt_form) FORM GET OBJECTS:C898($tTxt_objects;*) - - Repeat - + + Repeat + If (Length:C16($Txt_labelMethod)#0) - + $Txt_onErrorMethod:=4D_NO_ERROR("ON") EXECUTE METHOD:C1007($Txt_labelMethod) 4D_NO_ERROR("OFF";$Txt_onErrorMethod) - - End if - + + End if + If (Length:C16($Txt_labelRecord)#0) - + $Txt_onErrorMethod:=4D_NO_ERROR("ON") EXECUTE METHOD:C1007($Txt_labelRecord) 4D_NO_ERROR("OFF";$Txt_onErrorMethod) - - End if - + + End if + For ($Lon_i;1;Size of array:C274($tTxt_objects);1) - + If (OBJECT Get visible:C1075(*;$tTxt_objects{$Lon_i})) - + OBJECT GET COORDINATES:C663(*;$tTxt_objects{$Lon_i};$Lon_X;$Lon_Y;$Lon_right;$Lon_bottom) - + $Boo_printed:=Print object:C1095(*;\ $tTxt_objects{$Lon_i};\ $Lon_X+$Num_hOffset;\ $Lon_Y+$Num_vOffset;\ $Lon_right-$Lon_X;\ $Lon_bottom-$Lon_Y) - - End if - End for - + + End if + End for + OB SET:C1220($Obj_print;\ "label-count";$Lon_labelCount;\ "x";$Num_xPosition;\ "y";$Num_yPosition;\ "h-offset";$Num_hOffset;\ "v-offset";$Num_vOffset) - + $Boo_stop:=Print_Resume($Obj_print) - + If (Not:C34($Boo_stop)) - + $Num_xPosition:=OB Get:C1224($Obj_print;"x";Is real:K8:4) $Num_yPosition:=OB Get:C1224($Obj_print;"y";Is real:K8:4) $Num_hOffset:=OB Get:C1224($Obj_print;"h-offset";Is real:K8:4) $Num_vOffset:=OB Get:C1224($Obj_print;"v-offset";Is real:K8:4) - + If ($Lon_labelCount<$Lon_perRecord) - + $Lon_labelCount:=$Lon_labelCount+1 - - Else - + + Else + $Lon_labelCount:=1 NEXT RECORD:C51($Ptr_table->) - + FORM LOAD:C1103(Table:C252($Lon_table)->;$Txt_form) - + // To redraw form RELATE ONE:C42($Ptr_table->) - + If (Length:C16($Txt_labelRecord)#0) - + $Txt_onErrorMethod:=4D_NO_ERROR("ON") EXECUTE METHOD:C1007($Txt_labelRecord) 4D_NO_ERROR("OFF";$Txt_onErrorMethod) - - End if - End if - End if + + End if + End if + End if Until (End selection:C36($Ptr_table->)\ | (print_ERROR#0) | $Boo_stop) - - Else - + + Else + FORM LOAD:C1103("print") - + $Dom_objects:=DOM Find XML element by ID:C1010($Dom_label;"objects") $Lon_objectCount:=DOM Count XML elements:C726($Dom_objects;"object") - - - Repeat - + + + Repeat + If (Length:C16($Txt_labelMethod)#0) - + $Txt_onErrorMethod:=4D_NO_ERROR("ON") EXECUTE METHOD:C1007($Txt_labelMethod) 4D_NO_ERROR("OFF";$Txt_onErrorMethod) - - End if - + + End if + If (Length:C16($Txt_labelRecord)#0) - + $Txt_onErrorMethod:=4D_NO_ERROR("ON") EXECUTE METHOD:C1007($Txt_labelRecord) 4D_NO_ERROR("OFF";$Txt_onErrorMethod) - - End if - + + End if + If ($Boo_preview) // Print the label rect - + //aci0099065 : the Y doesn't have to grow for the preview //OB SET($Obj_desc;\ "x";$Num_xPosition-1.5;\ @@ -412,7 +402,7 @@ If (print_ERROR=0) "fill";"none";\ "fill-opacity";0;\ "stroke-dasharray";"1") - + OB SET:C1220($Obj_desc;\ "x";0;\ "y";0;\ @@ -426,37 +416,37 @@ If (print_ERROR=0) "fill";"none";\ "fill-opacity";0;\ "stroke-dasharray";"1") - + PRINT_OBJECT("round-rect";$Obj_desc) - + CLEAR VARIABLE:C89($Obj_desc) - - End if - + + End if + For ($Lon_i;1;$Lon_objectCount;1) - + $Dom_object:=DOM Find XML element:C864($Dom_objects;"objects/object["+String:C10($Lon_i)+"]") - + DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"type";$Txt_type) - + DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"left";$Lon_left) DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"top";$Lon_top) DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"right";$Lon_right) DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"bottom";$Lon_bottom) - + DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"fill-color";$Txt_fill) DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"fill-opacity";$Num_fillOpacity) - + DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"stroke-color";$Txt_stroke) DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"stroke-width";$Num_strokeWidth) DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"stroke-opacity";$Num_strokeOpacity) - + $Lon_width:=$Lon_right-$Lon_left $Lon_height:=$Lon_bottom-$Lon_top - + $Lon_X:=-$Lon_xOffset+$Lon_left-OB Get:C1224(<>label_params;"left";Is longint:K8:6) $Lon_Y:=-$Lon_yOffset+$Lon_top-OB Get:C1224(<>label_params;"top";Is longint:K8:6) - + OB SET:C1220($Obj_desc;\ "x";$Lon_X;\ "y";$Lon_Y;\ @@ -469,66 +459,66 @@ If (print_ERROR=0) "stroke-opacity";$Num_strokeOpacity;\ "fill";$Txt_fill;\ "fill-opacity";$Num_fillOpacity) - - Case of - + + Case of + //________________________________________ : ($Txt_type="line") - + DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"direction";$Txt_direction) OB SET:C1220($Obj_desc;\ "direction";$Txt_direction) - + PRINT_OBJECT($Txt_type;$Obj_desc) - + //________________________________________ : ($Txt_type="polyline") - + DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"data";$Txt_data) OB SET:C1220($Obj_desc;\ "data";$Txt_data) - + PRINT_OBJECT($Txt_type;$Obj_desc) - + //________________________________________ : ($Txt_type="rect")\ | ($Txt_type="round-rect") - + PRINT_OBJECT($Txt_type;$Obj_desc) - + //________________________________________ : ($Txt_type="oval") - + // ******************** //$Txt_type:="ellipse" // ******************** - + PRINT_OBJECT("ellipse";$Obj_desc) - + //________________________________________ : ($Txt_type="text") - + If (False:C215) // ****** NO BACKGROUND - + // Background, if any If (Length:C16($Txt_fill)#0)\ | (Length:C16($Txt_stroke)#0) - + PRINT_OBJECT("rect";$Obj_desc) - - End if - End if - + + End if + End if + // Text // DOM GET XML ATTRIBUTE BY NAME($Dom_object;"value";$Txt_value) // #ACI0099899 xml_GET_ATTRIBUTE_BY_NAME($Dom_object;"value";->$Txt_value) - + DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"font-name";$Txt_fontFamilly) DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"font-color";$Txt_fontColor) DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"font-size";$Lon_fontSize) DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"style";$Txt_style) DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"alignment";$Txt_alignment) - + OB SET:C1220($Obj_desc;\ "value";$Txt_value;\ "font-name";$Txt_fontFamilly;\ @@ -536,38 +526,38 @@ If (print_ERROR=0) "font-color";$Txt_fontColor;\ "style";$Txt_style;\ "alignment";$Txt_alignment) - + PRINT_OBJECT("text";$Obj_desc) - + //________________________________________ : ($Txt_type="image") - + DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"image-data";$Txt_data) DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"image-codec";$Txt_codec) DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"preserve-aspect-ratio";$Boo_preserveAspectRatio) - + If (False:C215) $Ptr_image:=OBJECT Get pointer:C1124(Object named:K67:5;Choose:C955($Boo_preserveAspectRatio;"ImageWithAspect";"Image")) $Ptr_image->:=PRINT_Get_image($Txt_data;$Txt_codec;".png") - + $Boo_printed:=Print object:C1095(*;"ImageWithAspect";$Lon_X+$Num_hOffset;$Lon_Y+$Num_vOffset;$Lon_width;$Lon_height) - - Else - + + Else + OB SET:C1220($Obj_desc;\ "image-data";$Txt_data;\ "image-codec";$Txt_codec;\ "preserve-aspect-ratio";$Boo_preserveAspectRatio;\ "stroke-width";0) - + PRINT_OBJECT("image";$Obj_desc) - End if - + End if + //________________________________________ : ($Txt_type="variable") // Field and more - + DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"field-type";$Lon_type) - + //#ACI0096880 //DOM GET XML ATTRIBUTE BY NAME($Dom_object;"value";$Txt_value) C_LONGINT:C283($Lon_table;$Lon_field) @@ -576,184 +566,184 @@ If (print_ERROR=0) //DOM GET XML ATTRIBUTE BY NAME($Dom_object;"field";$Lon_field) C_COLLECTION:C1488($c) xml_GET_ATTRIBUTE_BY_NAME($Dom_object;"table";->$Lon_table) - + If ($Lon_table#0) - + xml_GET_ATTRIBUTE_BY_NAME($Dom_object;"field";->$Lon_field) $Txt_value:=Parse formula:C1576("[:"+String:C10($Lon_table)+"]:"+String:C10($Lon_field)+"") - - Else - + + Else + xml_GET_ATTRIBUTE_BY_NAME($Dom_object;"tableList";->$Txt_buffer) - + If (Length:C16($Txt_buffer)#0) - + $c:=JSON Parse:C1218($Txt_buffer) $Lon_table:=$c[0] - + xml_GET_ATTRIBUTE_BY_NAME($Dom_object;"fieldList";->$Txt_buffer) $c:=JSON Parse:C1218($Txt_buffer) $Lon_field:=$c[0] - + $Txt_value:=Parse formula:C1576("[:"+String:C10($Lon_table)+"]:"+String:C10($Lon_field)+"") - - Else - + + Else + DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"value";$Txt_value) - - End if - End if - - Case of - + + End if + End if + + Case of + // ---------------------------------------- : ($Lon_type=Is picture:K8:10) - + DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"preserve-aspect-ratio";$Boo_preserveAspectRatio) - + OB SET:C1220($Obj_desc;\ "value";$Txt_value;\ "preserve-aspect-ratio";$Boo_preserveAspectRatio;\ "stroke-width";0) - + PRINT_OBJECT("image";$Obj_desc) - + // ---------------------------------------- - Else - + Else + If (False:C215) // ****** NO BACKGROUND - + // Background, if any If (Length:C16($Txt_fill)#0)\ | (Length:C16($Txt_stroke)#0) - + PRINT_OBJECT("rect";$Obj_desc) - - End if - End if - + + End if + End if + DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"font-name";$Txt_fontFamilly) DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"font-size";$Lon_fontSize) DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"font-color";$Txt_fontColor) DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"style";$Txt_style) DOM GET XML ATTRIBUTE BY NAME:C728($Dom_object;"alignment";$Txt_alignment) - + $Lon_fontStyle:=Plain:K14:1 $Lon_fontStyle:=Choose:C955($Txt_style="@italic@";$Lon_fontStyle | Italic:K14:3;$Lon_fontStyle) $Lon_fontStyle:=Choose:C955($Txt_style="@bold@";$Lon_fontStyle | Bold:K14:2;$Lon_fontStyle) $Lon_fontStyle:=Choose:C955($Txt_style="@underline@";$Lon_fontStyle | Underline:K14:4;$Lon_fontStyle) - - Case of - + + Case of + //…………………………………………………… : ($Txt_alignment="center") - + OBJECT SET HORIZONTAL ALIGNMENT:C706(*;"variable";Align center:K42:3) OBJECT SET HORIZONTAL ALIGNMENT:C706(*;"VariableWithStyle";Align center:K42:3) - + //…………………………………………………… : ($Txt_alignment="end") - + OBJECT SET HORIZONTAL ALIGNMENT:C706(*;"variable";Align right:K42:4) OBJECT SET HORIZONTAL ALIGNMENT:C706(*;"VariableWithStyle";Align right:K42:4) - + //…………………………………………………… - Else - + Else + OBJECT SET HORIZONTAL ALIGNMENT:C706(*;"variable";Align left:K42:2) OBJECT SET HORIZONTAL ALIGNMENT:C706(*;"VariableWithStyle";Align left:K42:2) - + //…………………………………………………… - End case - + End case + OBJECT SET FONT SIZE:C165(*;"variable";$Lon_fontSize) OBJECT SET FONT STYLE:C166(*;"variable";$Lon_fontStyle) OBJECT SET FONT:C164(*;"variable";PRINT_Font($Txt_fontFamilly)) OBJECT SET RGB COLORS:C628(*;"variable";Color_to_long($Txt_fontColor);-2) - + $Txt_buffer:=PRINT_Get_text_field($Txt_value) - + If (str_styledText($Txt_buffer)) - + (OBJECT Get pointer:C1124(Object named:K67:5;"VariableWithStyle"))->:=$Txt_buffer - + $Boo_printed:=Print object:C1095(*;\ "VariableWithStyle";\ $Lon_X+$Num_hOffset;\ $Lon_Y+$Num_vOffset;\ $Lon_width;\ $Lon_height) - - Else - + + Else + (OBJECT Get pointer:C1124(Object named:K67:5;"variable"))->:=$Txt_buffer - + $Boo_printed:=Print object:C1095(*;\ "variable";\ $Lon_X+$Num_hOffset+0.5;\ $Lon_Y+$Num_vOffset+0.5;\ $Lon_width;\ $Lon_height) - - End if - + + End if + // ---------------------------------------- - End case - + End case + //________________________________________ - End case - + End case + CLEAR VARIABLE:C89($Obj_desc) - - End for - + + End for + OB SET:C1220($Obj_print;\ "label-count";$Lon_labelCount;\ "x";$Num_xPosition;\ "y";$Num_yPosition;\ "h-offset";$Num_hOffset;\ "v-offset";$Num_vOffset) - + $Boo_stop:=Print_Resume($Obj_print) - + If (Not:C34($Boo_stop)) - + $Num_xPosition:=OB Get:C1224($Obj_print;"x";Is real:K8:4) $Num_yPosition:=OB Get:C1224($Obj_print;"y";Is real:K8:4) $Num_hOffset:=OB Get:C1224($Obj_print;"h-offset";Is real:K8:4) $Num_vOffset:=OB Get:C1224($Obj_print;"v-offset";Is real:K8:4) - + If ($Lon_labelCount<$Lon_perRecord) - + $Lon_labelCount:=$Lon_labelCount+1 - - Else - + + Else + $Lon_labelCount:=1 NEXT RECORD:C51($Ptr_table->) RELATE ONE:C42($Ptr_table->) - + If (Length:C16($Txt_labelRecord)#0) - + $Txt_onErrorMethod:=4D_NO_ERROR("ON") EXECUTE METHOD:C1007($Txt_labelRecord) 4D_NO_ERROR("OFF";$Txt_onErrorMethod) - - End if - End if - End if - + + End if + End if + End if + Until (End selection:C36($Ptr_table->)\ | (print_ERROR#0) | $Boo_stop) - - - End if - -Else - + + + End if + +Else + TRACE:C157 - -End if + +End if //====================================================================== CLOSE PRINTING JOB:C996 @@ -797,4 +787,4 @@ SET PRINTABLE MARGIN:C710(-1;-1;-1;-1) $0:=print_ERROR // ---------------------------------------------------- -// End \ No newline at end of file +// End