Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2004
    Posts
    361

    Unanswered: multiple reports

    I have created a report that has about 65 dsum functions in text boxes. When the report open I get the exact same copy if I click to the next page. The only thing that is different is the report header labels aren't there. All of my dsum functions are in the detail section. None of the data is spilling over to the next sheet either. I just want the report to create one page. Where should I look to solve this problem? Thanks!

  2. #2
    Join Date
    Feb 2004
    Location
    CT,USA
    Posts
    250
    Dsum should be used in VB code not necessarily in the detail section of the form/report. I could see using it in the section summary or footer section perhaps, but I am not sure it would be valid therein.

    Perhaps your solution is to create a query that tallies your results, then use report wizard to show this data from the qry.

  3. #3
    Join Date
    Mar 2004
    Posts
    361
    excuse my typing, they are just sum functions. Like =Sum(IIf([CountClp3]=10,1,0)). Does that change anything?

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Hi

    Just to add my own opinion - it doesn't really matter where you use a DSum function (in VB or as a control Source), it should work the same.
    However, 65 Dsum functions in a report should be a warning sign that maybe things aren't quite right (I'm a big fan of DSum and it's relatives, but 65 seems rather a lot). The way to think of using DSum (and the other D... functions) is a way of calculating/ deriving figures that cannot be derived from the record source (i.e. the calculation is independant of all the rest of the data around it, hence it doesn't matter whether it is VB or the record source). If you look at the arguments of a D..function - i.e. expression, domain, (optional) criteria, it is like a SQL statement without the SQl Key words ([SELECT] expression [FROM] domain [WHERE] criteria). Therefore, you should only use it to derive a value that is impossible to derive from the data contained in the record source, otherwise you are asking Access to "execute" 66 SQL statements, not 1 (not sure if it is exactly the equivelent of executing n SQL statements, but you see my point?). Having said that, it may be appropriate to do this within this particular report - just wanted to flag this as a consideration.

    Anyhoo - to answer your question - you tried to use a page rather than report header?
    Testimonial:
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Yes - lots. Wish I could type quicker
    Testimonial:
    pootle flump
    ur codings are working excelent.

  6. #6
    Join Date
    Mar 2004
    Posts
    361
    I could use the page header if needed. I understand that the dsum function thing may not be the best method I know how to do. Is there another reason why it shows the same report on the next page?

  7. #7
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Hi

    Don't worry about Sum - I went on a long winded explanation of why so many DSums might be excessive, but if you really meant Sum then you are doing it spot on. I think I missed your point. The problem is that the report repeats for two pages not that you don't have a heading on the second page yes? Is it only one extra page or loads?
    Ok: The most likely reason that information is repeated is due to group headers - do you have a group header? if so, do you have any controls in that group header and what is the field you are grouping on? In particular, are you grouping on a field of boolean data type?
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •