Results 1 to 4 of 4
  1. #1
    argsemapp is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2013
    Posts
    18

    Printing a record in a report programatically


    I have a form feeding 60-field records to a report. I now need to display these records in a cleaned up way (ie skipping some fields entirely, skipping other fields if they have a value that equals 0, displaying "x" if value is below 1). They will need to be in a grid that hopefully will not be too big for the page.

    What is the best way of doing something to this effect e.g. "Drawing" a formatted table onto a report depending on your recordset?

    Thanks in advance

    FYI each record will be different so different fields will have to be excluded/included.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    Really doesn't make sense. Sounds like a non-normalized data structure.

    Provide examples of raw data and the desired output.
    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
    argsemapp is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2013
    Posts
    18
    The database has chemical compositions so there is a field for each element. For example:

    RAW DATA:
    Alloy1: [Au]=95 [Pt]=0 [Pd]=0.5 [Ag]=4.5
    Alloy2: [Au]=0 [Pt]=100 [Pd]=0 [Ag]=0

    FORMATTED (printed in automatically generated grid):
    Alloy1: "Au" = 95 "Pd"=<1.0 "Ag"=4.5 (The report skips [Pt], and prints [Pd] as <1.0%)
    Alloy2: "Pt" = 100 (report skips all other elements)

    I hope that makes sense. Basically I just want to print the fields that have a value, and skip the ones that don't.

    This is for a report that will be sent to customers so the aesthetic aspect is important. I can't have empty entries for elements in the report.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    That structure will probably require code.

    Options:

    1. programmatically build report

    2. programmatically write data to a 'temp' table

    3. concatenate the data into a single string, ignoring all the 0 values - How many element fields are there?

    4. normalize the data and use CROSSTAB query
    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. show record lines when printing report?
    By joe55555 in forum Reports
    Replies: 4
    Last Post: 11-21-2013, 05:13 AM
  2. Replies: 1
    Last Post: 05-31-2013, 11:02 AM
  3. Printing a single record in a report
    By kelann in forum Reports
    Replies: 28
    Last Post: 10-04-2012, 10:07 AM
  4. Printing report from first record works...
    By TinaCa in forum Programming
    Replies: 10
    Last Post: 01-17-2012, 10:59 AM
  5. Replies: 0
    Last Post: 05-25-2011, 06:13 AM

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