Results 1 to 4 of 4
  1. #1
    joanne2468 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jul 2013
    Location
    Kansas
    Posts
    9

    Dynamic Report

    I am a basic Access 2010 user and am not familiar with VBA but I try my best to figure things out. My problem is I have a crosstab query that has columns that will change. I created a report and used the following SQL code to include all possible fields for columns in my report. The problem is the report has too much information. Is there away that I could create a dynamic report that will leave null values off of the report and the labels for the fields will change with the changes in the cross tab query.

    I apologize if I didn't explain this in a way that is understandable. Here is the SQL code:

    TRANSFORM Sum(QryExhibitOnebeforeTotals.ALLOCATED_COST) AS SumOfALLOCATED_COST
    SELECT QryExhibitOnebeforeTotals.PROP_UNIT, QryExhibitOnebeforeTotals.ASSET_CLASS, QryExhibitOnebeforeTotals.Property_Unit.DESCRIPTIO N, Sum(QryExhibitOnebeforeTotals.ALLOCATED_COST) AS [Total Of ALLOCATED_COST]
    FROM QryExhibitOnebeforeTotals
    GROUP BY QryExhibitOnebeforeTotals.PROP_UNIT, QryExhibitOnebeforeTotals.ASSET_CLASS, QryExhibitOnebeforeTotals.Property_Unit.DESCRIPTIO N
    PIVOT QryExhibitOnebeforeTotals.LIFE


    IN (0000,0100,0300,0500,0600,0700,0900,1000,1200,1500 ,2000,2750,3150,3900,4000);

    Thank you for your help.

    Joanne

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    You can use VBA code to modify the report. Review:

    http://www.blueclaw-db.com/report_dy...stab_field.htm
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    joanne2468 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jul 2013
    Location
    Kansas
    Posts
    9
    Quote Originally Posted by June7 View Post
    You can use VBA code to modify the report. Review:

    http://www.blueclaw-db.com/report_dy...stab_field.htm

    Thank you for your help. I looked at the article but couldn't make sense of how to do this.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    Sorry, VBA is probably the only way to accomplish what you want. Either by writing data to a 'temp' table that has fields for all possible data that could result in columns or by modifying the report.

    If the blueclaw article is not clear enough, google 'Access report dynamic crosstab'.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Dynamic Report Header
    By brad in forum Reports
    Replies: 4
    Last Post: 04-15-2013, 02:30 PM
  2. Dynamic Label in report
    By lugnutmonkey in forum Reports
    Replies: 1
    Last Post: 02-27-2013, 03:19 PM
  3. Dynamic Labels on Report
    By Jester0001 in forum Programming
    Replies: 5
    Last Post: 04-02-2012, 04:37 PM
  4. Dynamic Report Caption
    By Crypto in forum Reports
    Replies: 3
    Last Post: 11-17-2010, 03:17 PM
  5. Dynamic Report
    By vCallNSPF in forum Reports
    Replies: 0
    Last Post: 12-08-2009, 04:19 PM

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