Reports with cross tab queries

  • Thread starter Thread starter Malcolm Christopher
  • Start date Start date
M

Malcolm Christopher

Hi

This is a repost - I have just brought it to the front in
the hope that someone new has had a similar problem and
solved it.

Original message:

I have built up a report which uses a sub report
containing a cross tab query to allow for a variable
number of column names depending on when the report is run.

The alias table shows all the level (page) numbers and the
corresponding set of column titles for all the levels.

The xtab query when viewed on its own has all the relevant
data for the required levels.

However when the report is viewed, some of the levels (Not
all) are displayed over the top of each other i.e. page 2
displays level 2 and level 3 data over the top of each
other, with the headings for level 3.

On searching the coding for the report, I have found the
following code:

Option Compare Database

Private Sub Detail_Format(Cancel As Integer, FormatCount
As Integer)
Me.MoveLayout = False
End Sub

Private Sub Report_NoData(Cancel As Integer)
Cancel = -1
MsgBox "No data found for selected Project in the time
period."
End Sub

I was told that the 'Me.MoveLayout = False' line could
cause a problem but changing the "False" to "True", or
deleting the line all together only seems to make it worse.

I should point out that using Access reporting is only a
small part of my work, so I am really a novice.

Hope this is relatively clear, and can anyone suggest
anything?

Thanks in advance.

Malcolm
 
I don't expect anyone can help too thoroughly since we don't know
-why you have MoveLayout = False in your code
-what you mean by "make it worse"
-which report the code is running (main or a subreport)
 
Hi Duane

Thanks for taking the time to reply.

I am happy to report that the coding I mentioned had
nothing to do with the fault and it was a fairly
elementary mistake in the "grouping" settings that was the
problem (it was moving in 2s instead of 1 page at a
time). I think I was looking too hard at it instead of
going back to basics.

I believe that the MoveLayout = False code is in the main
report to allow a row title and the sub-totals aquired
from an included query report to appear on the same line.
Removing it puts them on separate lines - hence looking
worse.

Thanks once again for your attention.

Malc
 
Back
Top