Rewrote if logic to pull table name from report header when report name exists