Results 1 to 5 of 5
  1. #1
    C Muth is offline Novice
    Windows 10 Access 2007
    Join Date
    Jun 2019
    Posts
    13

    Report Pulling from Crosstab Query Fails due to Query Results Not Always Matching with Text Boxes

    Hi, I have a Report (Report1) which has a source Crosstab Query (Crosstab1) which runs from an underlying query (Query2). Query2 prompts the user to enter a date range. Report 1 has customer names across the top, months down the side and sales $s in the body + totals. Depending on the date range entered by the user in Query2, Crosstab1 will not always have all the customer names reflected in Report1.


    The result I desire is to simply have Report1 show a blank when there is no data in Crosstab1 for that customer, however still allow totals to calculate.
    I am aware of, however have limited experience with the use of Can Grow, Can Shrink. Not sure if a fix.
    Thanks

  2. #2
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    could you describe what you are trying to achieve without referencing any work you have done pelase?

    What is the report for? for example.

  3. #3
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    This is a common question and there are answers posted in lots of places. I've read them, but unfortunately have never applied the solution, which is to define the fields (make them static). Thus I can't describe the fix for you. A crosstab query isn't appropriate for your report because customers as fields is too dynamic - both in terms of count of customers with orders at any given time but also the size of the customer list itself. The reason it fails is because you're transposing row (records) data into columns (fields) but the number of fields is not static, thus sometimes there are too many fields for the report you designed. IMHO you are defeating the purpose of a report, which is to group and aggregate data but usually vertically. If a normal report has no data for Customer One they just don't show up. Why can't you just design a report based on a normal query?
    Last edited by Micron; 12-17-2019 at 01:07 PM. Reason: removed erroneous statement(s)
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    apr pillai's Avatar
    apr pillai is offline Competent Performer
    Windows 10 Access 2007
    Join Date
    May 2010
    Location
    Alappuzha, India
    Posts
    209
    I know this will involve some work to implement, but if it gives you some insight to approach your problem solving task then take a look at this link: Dynamic Report.

  5. #5
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    I'd be surprised if that approach works. There are only ever 12 months in a year, so it suits the design approach. It is not likely that there will ever be a fixed number of customers, which as far as I can tell here, are the fields, so it won't. As soon as you gain or lose a customer, there are not enough or are too many fields so you're back where you started. That's why I said it wasn't suitable for their situation.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Displaying 20 query results on 20 text boxes
    By serenechaos in forum Forms
    Replies: 9
    Last Post: 02-25-2018, 06:51 PM
  2. Replies: 11
    Last Post: 04-15-2015, 07:18 PM
  3. Replies: 4
    Last Post: 02-12-2014, 03:44 PM
  4. Query fails to find matching records
    By cowman in forum Queries
    Replies: 5
    Last Post: 03-30-2013, 04:14 PM
  5. Report Data Not Matching Query Results
    By Rawb in forum Reports
    Replies: 7
    Last Post: 10-25-2012, 01:41 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums