Hi
I have a report (actually used as a subreport, but created as a report in its own right) which lists a set of categories and the percentage of each. These are sorted from largest to smallest. I want it to appear in columns, but if I set it as "across then down", it looks a bit silly.
I read in a different forum of using code similar to this:
Code:
Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)
rptRDWTypesYearToDate.Height = 20 / 2 * 0.25 * 1440
End Sub
Which works out the height of the report (2 is the number of columns, 20 is the number of items in total, .25 is the height (in inches) of each row and 1440 is something called twips, per inch.
But it says "Object required". Am I using the wrong code, or in the wrong place? Ultimately I want to replace 20 with Dcount [JustificationCategory] but I thought I'd get it working with a number first.
Also
I have this subreport, positioned in the header. How do I make the labels below it move up and down and the height of the header increase, depending on the size of the subreport?
Chris