tbsgadi
asked on
Add Blank rows to report
Hi Experts,
I have a report grouped by Companies.
I need it to have a minimum of 3 rows per Company ie even if the the Company has only 2 rows of Data I want the report to add a blank line.
I don't want to use a subreport.
I have an idea how to do it from the query but I'd prefer to do it from the report.
I have a report grouped by Companies.
I need it to have a minimum of 3 rows per Company ie even if the the Company has only 2 rows of Data I want the report to add a blank line.
I don't want to use a subreport.
I have an idea how to do it from the query but I'd prefer to do it from the report.
Also read some comments down as perove did publish the code he used finally.
Nic;o)
Nic;o)
ASKER
Hi Nic;o) the code there doesn't work,but anyway my case is different.
Perove in the end used PageBreaks
I don't want a new page after each company.
Perove in the end used PageBreaks
I don't want a new page after each company.
OK, then it's probably easiest to force an extra row in your query.
What is the relation between your company table and the 2 or 3 row table ?
Nic;o)
What is the relation between your company table and the 2 or 3 row table ?
Nic;o)
ASKER
I think I have it,
I'm adding a textbox using Chr(13) & Chr(10) &[Company] showing only if count(*) is <2
setting line spacing etc
This seems to be the easiest way out
I'm adding a textbox using Chr(13) & Chr(10) &[Company] showing only if count(*) is <2
setting line spacing etc
This seems to be the easiest way out
When you have no (or little) space between the rows that's indeed a brilliant plan :-)
Don't forget to have the CanGrow option set to "Yes" for the field.
Nic;o)
Don't forget to have the CanGrow option set to "Yes" for the field.
Nic;o)
For future reference: See the MoveLayout, PrintSection, and NextRecord properties in the on-line help. With this properties, you can do all sorts of things, like repeating lines, dropping down the page, etc.
For example, to print your blank lines, you could have done this in the OnFormat Section of the detail:
If <some condition> then
.MoveLayout = True
.NextRecord = False
.PrintSection=True
End if
By default, Access sets all these properties to true for each section print. Changing them allows you to control the processing of the report engine in many different ways.
Jim.
For example, to print your blank lines, you could have done this in the OnFormat Section of the detail:
If <some condition> then
.MoveLayout = True
.NextRecord = False
.PrintSection=True
End if
By default, Access sets all these properties to true for each section print. Changing them allows you to control the processing of the report engine in many different ways.
Jim.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
https://www.experts-exchange.com/questions/20176960/Fixed-number-of-lines-in-report-ALWAYS.html#6459511
Nic;o)