Creating a Report with no records source

  • Thread starter Thread starter greg
  • Start date Start date
G

greg

HI All,

I am creating a report that has no record source, and there may be a better
way of doing this that I have not thought of, please let me know.

I have three unbound controls in the detail section (count, amount, date) of
a report, I have a procedure that uses some logic to changes the values of
(count, amount, date) on each loop. The problem is how do i get the report
to give me a new row to display the new values each time the values/change
or each time through the loop?

Thanks for any help

Greg
 
greg said:
I am creating a report that has no record source, and there may be a better
way of doing this that I have not thought of, please let me know.

I have three unbound controls in the detail section (count, amount, date) of
a report, I have a procedure that uses some logic to changes the values of
(count, amount, date) on each loop. The problem is how do i get the report
to give me a new row to display the new values each time the values/change
or each time through the loop?


You can not use your own loop for that kind of thing.

The code in the detail section's event should assign one set
of values and use the line:

Me.NextRecord = False

to cause the detail procedure to be started over. This way
you can have as many sets of values as you want. Just
remember to skip setting it to false when you are done with
all of your values.
 
I have been looking for this!!
I found that if you set a public counter before opening the report, you can
use it to
control your loops.
Remember - The loop where you do not include nextrecord=false is also printed.
 
I get a good preview of the report but when I print from the preview window it
shows only the last iteration.

If I go straight to print (acViewNormal)- it works fine.
How can I get this to print from the preview window??
 
Padarick said:
I get a good preview of the report but when I print from the preview window it
shows only the last iteration.

If I go straight to print (acViewNormal)- it works fine.
How can I get this to print from the preview window??


I think you can solve this problem by initializing the
module level counter in the report header section's Format
event.

However, using a counter is not a reliable way to control
report operations. The sections may be formatted many times
and in whatever order Access needs to achieve the specified
results. This is essentially uncontrolable when you
consider the interactions of CanGrow/CanShrink and the
various choices for KeepTogether. Try using a text box in
the report header instead of a variable.
 
thanks to all for your help

Greg


Marshall Barton said:
I think you can solve this problem by initializing the
module level counter in the report header section's Format
event.

However, using a counter is not a reliable way to control
report operations. The sections may be formatted many times
and in whatever order Access needs to achieve the specified
results. This is essentially uncontrolable when you
consider the interactions of CanGrow/CanShrink and the
various choices for KeepTogether. Try using a text box in
the report header instead of a variable.
 
Back
Top