Here is a modification to your script. The first modification is gives a name to the summary table
Output Table( "My Summary" )
The second modification loops through all columns in the new table and changes any column who's name starts with "rcr%," and changes the name.
// Create a list of all of the column
colNames = Data Table( "My Summary" ) << get column names( string );
// Loop through all of the names, and when "rcr%," is found in the
// start of the column name, change the name to the column name
// starting from the 7th character in the name
For Each( {col}, colNames,
If( Contains( col, "rcr%," ) == 1,
Column( col ) << set name( Substr( col, 7 ) )
)
);
Here is the complete script
Names Default to Here( 1 );
Data Table( "DVIRCR_SumTable" ) << Summary(
Group( :prodgroup3, :subapp ),
Max( :rcr% ),
Subgroup( :date_ ),
Freq( "None" ),
Weight( "None" ),
statistics column name format( "column" ),
Link to original data table( 0 ),
Output Table( "My Summary" )
);
//rename N Rows column to Lot Count
:Name( "N Rows" ) << Set Name( "Lot Count" );
// Create a list of all of the column
colNames = Data Table( "My Summary" ) << get column names( string );
// Loop through all of the names, and when "rcr%," is found in the
// start of the column name, change the name to the column name
// starting from the 7th character in the name
For Each( {col}, colNames,
If( Contains( col, "rcr%," ) == 1,
Column( col ) << set name( Substr( col, 7 ) )
)
);
Also, please enter your JSL into discussions using the icon which displays the JSL in a format easier for the Community Members to read and understand the issue.
Jim