Showing conditional lines in report

  • Thread starter jpgoossen via AccessMonster.com
  • Start date
J

jpgoossen via AccessMonster.com

Hi,

I am working on an application that records employees hour sheets. Hours
worked, sick days, hours taken off on personal leave. I have created reports
where those hours are added per employee over a given period of time. Weekly,
monthly or any given date range.
In the details area I have some conditional lines in the report.
Think around the lines of: If numer of hours worked < standard hours per week,
calculate number and show message on line. These lines are situated below the
actual hours worked and other totals line.

The problem I have is that for the three lines that may contain messages,
some people will show up in the report with 0 message lines, some with one of
two, some with three. For I have just left a space in the detail section for
those lines. If they are valid, they show up, if not, the space is left blank.
I want however to make the reservation of these lines conditional. If there
is nothing to report, I just want to go on to the next employee, instad of
seeing three blank lines.
I cannot seem to figure out how to get actual conditional lines into my
report. Making the printing of data on those lines conditional is easy.
Skipping the blank line however, is not.

Thanks in advance,

Patrick
 
F

fredg

Hi,

I am working on an application that records employees hour sheets. Hours
worked, sick days, hours taken off on personal leave. I have created reports
where those hours are added per employee over a given period of time. Weekly,
monthly or any given date range.
In the details area I have some conditional lines in the report.
Think around the lines of: If numer of hours worked < standard hours per week,
calculate number and show message on line. These lines are situated below the
actual hours worked and other totals line.

The problem I have is that for the three lines that may contain messages,
some people will show up in the report with 0 message lines, some with one of
two, some with three. For I have just left a space in the detail section for
those lines. If they are valid, they show up, if not, the space is left blank.
I want however to make the reservation of these lines conditional. If there
is nothing to report, I just want to go on to the next employee, instad of
seeing three blank lines.
I cannot seem to figure out how to get actual conditional lines into my
report. Making the printing of data on those lines conditional is easy.
Skipping the blank line however, is not.

Thanks in advance,

Patrick

Code whatever section's format event (that the lines are in) something
along the order of:

Me.Line1.Visible = Not IsNull([SomeCongtrol])

Repeat for each additional line.
 
J

jpgoossen via AccessMonster.com

Fred,

I am sorry, must be a bit dense here, but I just do not understand what you
are trying to tell me to do. have this Footer section of one of the groups.
I set aside three lines which each have some text in it, that only appear
when a condition is met (a value is not empty or zero). I still have to
create the space in that part of the report to place those lines right? While
my wish is to only enter the lines into the report -and that INCLUDES the
space they need- if any or all of the conditions are met. If not the lines
should just be skipped and NO WHITE SPACE should be left open. So, the next
section should -in a sense- move up to meet the last actually printed line.

I cannot seem to find where you would want me to use the code you entered
below. Not even sure if Line1 is an actual built in function or just a
placeholder for whatever name I would give the different lines>

TIA,

Patrick
[quoted text clipped - 21 lines]

Code whatever section's format event (that the lines are in) something
along the order of:

Me.Line1.Visible = Not IsNull([SomeCongtrol])

Repeat for each additional line.
 
F

fredg

Fred,

I am sorry, must be a bit dense here, but I just do not understand what you
are trying to tell me to do. have this Footer section of one of the groups.
I set aside three lines which each have some text in it, that only appear
when a condition is met (a value is not empty or zero). I still have to
create the space in that part of the report to place those lines right? While
my wish is to only enter the lines into the report -and that INCLUDES the
space they need- if any or all of the conditions are met. If not the lines
should just be skipped and NO WHITE SPACE should be left open. So, the next
section should -in a sense- move up to meet the last actually printed line.

I cannot seem to find where you would want me to use the code you entered
below. Not even sure if Line1 is an actual built in function or just a
placeholder for whatever name I would give the different lines>

TIA,

Patrick
[quoted text clipped - 21 lines]

Code whatever section's format event (that the lines are in) something
along the order of:

Me.Line1.Visible = Not IsNull([SomeCongtrol])

Repeat for each additional line.
..
I read your original message of having lines as literally ______ lines
with some text above it.
It seems you meant a line of text ... without the line _________.


Let's start all over again

Forget about Line1 etc. (and yes you always have to substitute your
actual control names), as well as the coding I gave you.

Set the CanShrink property of each of the 3 control's to Yes.
Also set the Group Footer Can Shrink property to Yes.
As long as there is NO OTHER control on that same line, the white
space in the Group Footer will move up if the control is Null.
 
J

jpgoossen via AccessMonster.com

Fred,

You are absolutely right! Three seconds after reading your message, made the
changes, works like I charm. I should have probabaly gotten myself a book
about Access first, before starting on a project like this. Enthousiastically,
but clueless, I guess:)

Thanks a lot,

Patrick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top