Q:

Hide blank column in Crystal Report

I need to hide an empty columns and fill the gap with next field in crystal report.
col1 col2 col3
val1 val2 val3

I used the suppress option with if isnull({val2}) true else false - If val2 is empty, it displays:
col1      col3
val1      val3

How can I hide the blank space in crystal report or in an action using MVC and C#? 
col1 col3
val1 val3

A:

Well, I find an answer for that. You can write an action in your controller has the following code
ReportClass rpt;

rpt.ReportDefinition.ReportObjects["col2"].ObjectFormat.EnableSuppress = true;
rpt.ReportDefinition.ReportObjects["col3"].Left = rpt.ReportDefinition.ReportObjects["col2"].Left;

