Hello Community,
I found out the answer for this.
Apparently the report generator tool in matlab is able to acess only global parameters and data from the base workspace.
and is not able to read local workspace data when i am inside new_function.m. Therefore i can send the struct to base workspace and then generate the report.
function new_function(struct)
    % Assign the struct to the base workspace
    assignin('base', 'struct', struct);
    % Generate the report
    report 'SAMReport_PDF_V5_0';
    % Clear the struct from the base workspace after generating the report
    evalin('base', 'clear struct');
end
