Skip to content

Commit

Permalink
fix : ACI0104992
Browse files Browse the repository at this point in the history
  • Loading branch information
delahaye-4D committed Nov 12, 2024
1 parent 22c21aa commit ec4e691
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 13 deletions.
47 changes: 46 additions & 1 deletion Project/Sources/Methods/db_Get_field_list.4dm
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,51 @@ End if

// ----------------------------------------------------
If ($table_id#0)

//todo: object field path using extra external file #DD
GET FIELD TITLES:C804((Table:C252($table_id))->; $_field_names; $_field_id)


//#ACI0104992 -- BEGIN

If (boo_useVirtualStructure)

GET FIELD TITLES:C804((Table:C252($table_id))->; $_field_names; $_field_id)

Else

var $count_fields; $int : Integer
var $bool; $is_invisible; $in_design : Boolean


$in_design:=((Process info:C1843(Current process:C322).type)<0)

ARRAY TEXT:C222($_field_names; 0)
ARRAY LONGINT:C221($_field_id; 0)

$count_fields:=Last field number:C255($table_id)

For ($j; 1; $count_fields; 1)

If (Is field number valid:C1000($table_id; $j))

GET FIELD PROPERTIES:C258($table_id; $j; $int; $int; $bool; $bool; $is_invisible)

If (Not:C34($is_invisible) | $in_design)

APPEND TO ARRAY:C911($_field_names; Field name:C257($table_id; $j))
APPEND TO ARRAY:C911($_field_id; $j)

End if

End if

End for


End if

//#ACI0104992 -- END


For ($i; 1; Size of array:C274($_field_id); 1)

Expand Down Expand Up @@ -206,6 +249,8 @@ If ($table_id#0)

End if
End for


End if

// ----------------------------------------------------
Expand Down
16 changes: 11 additions & 5 deletions Project/Sources/Methods/db_INIT_STRUCTURE.4dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,16 @@ If (Asserted:C1132($count_parameters>=0; "Missing parameter"))
COMPILER_db

//#ACI0097715 [
PROCESS PROPERTIES:C336(Current process:C322; $text; $int; $int; $int; $int; $origin)
$in_design:=($origin<0) // Main process or design process
//_O_PROCESS PROPERTIES(Current process; $text; $int; $int; $int; $int; $origin)
//$in_design:=($origin<0) // Main process or design process
//]

//#ACI0104992 -- BEGIN
$origin:=Process info:C1843(Current process:C322).type

$in_design:=($origin<0) // Main process or design process
//#ACI0104992 -- END

Else

ABORT:C156
Expand All @@ -78,7 +84,7 @@ End if
// Loads the complete structure definition
// Report_structureDefinition{0} stores the table names (index is the table ID)
// Report_structureDefinition{1-n} stores the field names (index is the field ID)
$count_tables:=Get last table number:C254
$count_tables:=Last table number:C254

ARRAY TEXT:C222(report_structureDefinition; $count_tables; 0)
ARRAY TEXT:C222(report_structureDefinition{0}; $count_tables)
Expand All @@ -89,7 +95,7 @@ For ($i; 1; $count_tables; 1)

report_structureDefinition{0}{$i}:=Table name:C256($i)

$count_fields:=Get last field number:C255($i)
$count_fields:=Last field number:C255($i)

ARRAY TEXT:C222(report_structureDefinition{$i}; $count_fields)

Expand Down Expand Up @@ -161,7 +167,7 @@ For ($i; 1; $size; 1)

If ($table_id#0) //#ACI0094098

$count_fields:=Get last field number:C255($table_id)
$count_fields:=Last field number:C255($table_id)

$table:=Table:C252($table_id)

Expand Down
13 changes: 6 additions & 7 deletions Project/Sources/Methods/report_CREATE_AREA.4dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
//
// ----------------------------------------------------
// Declarations
C_POINTER:C301($1)
_O_C_POINTER:C301($1)

C_BLOB:C604($Blb_buffer)
C_LONGINT:C283($Lon_area; $Lon_parameters; $Lon_tableNumber)
C_POINTER:C301($Ptr_container)
_O_C_BLOB:C604($Blb_buffer)
_O_C_LONGINT:C283($Lon_area; $Lon_parameters; $Lon_tableNumber)
_O_C_POINTER:C301($Ptr_container)

If (False:C215)
C_POINTER:C301(report_CREATE_AREA; $1)
_O_C_POINTER:C301(report_CREATE_AREA; $1)
End if

// ----------------------------------------------------
Expand Down Expand Up @@ -86,7 +86,6 @@ If ($Lon_tableNumber#0) //There is at least one table

SET BLOB SIZE:C606($Blb_buffer; 0)

//If (<>withFeature111172)
If (Form_C_UseVirtualStructure=0)
// we need to reinit the structure as we are not using the virtual structure in this special case: NQR + design mode.
boo_useVirtualStructure:=False:C215
Expand All @@ -95,7 +94,7 @@ If ($Lon_tableNumber#0) //There is at least one table

End if

//End if


End if

Expand Down

0 comments on commit ec4e691

Please sign in to comment.