Adding a Table Diagram to a Reort.

louisa

Registered User.
Local time
Today, 16:32
Joined
Jan 27, 2010
Messages
262
Hi Everyone,

I am trying to add a table to a report to display data taken from a table itself.
The table will need to have 3 Columns, i can draw this quite easily with rectangles and lines but on generating this report for each customer some will display more data than other customers so i would need the table itself to expand/reduce to the amount of data it would pull from the table. Does anyone no an easy way of doing this?

Many thanks
Louisa
 
You can do this programmatically or using creative lines. For the vba side, there is sample code out there so use your favorite search engine to start there.

To use creative lines, I will attempt to explain by setting up lines around the table. You essentially want to create a box ... in 3 parts, the top with some sides (your choice on length), the sides, and the bottom with some sides (your choice on length.

First, make sure you have the report header/footer displayed. In the header, make your horizontal line and then some side lines. If you put static information in the top of the box (such as column names) extend your sides so they go below the labels. If none, then make very small sides.

Second, create the middle of the border in the detail section. Fill your detail section with the corresponding verticle lines that line up with the sides you created in the header.

Finally, in the report footer, extend the sides and create your horizontal line. This will give the perception that there is a continuous border. Add any additional verticle seperators in the same fashion.

I've attached a screenshot of a report (design mode) that I've used this trick on. This particular one is a subreport that is set 'to grow' in the report. I've pushed out the margins and moved it a bit so you could see all of the lines. I've also highlighted the horizontal seperator in the details section to simulate the row seperator.

HTH,
-dK
 

Attachments

  • ReportBorder.JPG
    ReportBorder.JPG
    61.1 KB · Views: 126

Users who are viewing this thread

Back
Top Bottom