.net – How to grow height or all fields of a “textboxes made” grid if one column’s height grows in crystal reports

crystal-reportscrystal-reports-2008crystal-reports-xinet

I am attaching an image to elaborate what i want to know
enter image description here

Crystal reports dont have any specific grid control

I have made a grid using textboxes in crystal reports 2011 for vs2010, But the problem is, if one of the column grows, i want to grow all text boxes of a row, as i have placed the grid in Details section of crystal report.
In image attached, you can see, description's height increases because extra text and "can grow" checked, i want if description increases whole row's height should be increased.

I made the columns using textboxes because if i use box or other rectangle control, it has very bad layout, i hid the textboxes right and top border, and joined all the fields together to make a row.

Thanks in advance.

Best Answer

Crystals text boxes are awful, as shown above they do not format nicely and are not consistent. The below is not a brilliant solution; but our work around the produce consistent and nicely formatted expanding tables.

Instead of using text boxes I suggest you use normal boxes and line objects (graphic objects) instead.

Use one box as the outline to your table, draw it so it is at the top of the header and extends to the bottom of the group. This will then dynamically expand and give you a consistent border.

I would then add another details section underneath the main one. Fill it with a horizontal line extending to the box. This will then rule under each detail line. You can do the same in the header.

Draw vertical lines using the line tool, connecting the top and bottom of the outer box.

When placed correctly the lines and the box will adjust vertically in respect to your data. Make sure all sections containing a horizontal line are squeezed up so there is no "whitespace" surrounding the line. You can also supress the last horizontal line if you have problems with it matching up to your footer.

Related Topic