Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2008
    Posts
    2

    Getting Reports to not display lines based on blank table data

    Hope someone can help. I'm a non-programming noob.



    I've a table that contains details about components a client wants priced (component name, length, width, detail1, quantity of detail1, detail2, quantity of detail2)

    Sometimes the client will require 1 detail, sometimes 2, sometimes none.

    I've created a report that takes the data from this table and displays it in the following layout as well as performing claculations based on the data entered in the table (essentially the report is the Estimate I want to hand out to the client);

    (component name) of size (length) x (width)mm. = £##.##
    (quantity of detail1) x (detail1)
    (quantity of detail2) x (detail2)

    This works, and displays, fine when each component has two details, however when only one, or no details are required (and the table cells have therefore been left blank) then there are lines with " x " only showing.

    How can I get the report to do something like "If cell = blank, then don't print (quantity) x (detail)"?

    Thanks in advance

  2. #2
    jya is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2007
    Location
    Chicagoland
    Posts
    109
    Not sure how you have this set up. Is the information displayed on separate lines? Perhaps you could use an IIF statement.

    IIF(IsNull([detail]),"",[quantity] x [detail])

  3. #3
    Join Date
    Oct 2008
    Posts
    2
    Thanks jya,

    That worked a treat! The text between the two blank fields has successfully disappeared. However if I enter something in "detail2", and leave "detail1" blank I get a blank line of text where detail1 would be entered if it had a value.

    Is there a way I can format my report so that space is not reserved for a blank entry, and any subsequent data "jumps up" into the next available blank space?

  4. #4
    jya is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2007
    Location
    Chicagoland
    Posts
    109
    Formatting is not really my strong point, but perhaps you could try something like this. Put all of your information in a single field.

    =IIF(isempty([detail1]),null,[quantity1] x [detail1] & Chr(13) & Chr(10)) & IIF(isempty([detail2]),null,[quantity2] x [detail2])

    I'm assuming that you used two separate fields. I don't know how to remove the extra line using two separate fields. Using the 'Chr(13) & Chr(10)', you can insert a carriage return between entries. I've never actually tried to do what your doing. Let me know if this helps.

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

Similar Threads

  1. Replies: 1
    Last Post: 09-05-2008, 12:07 PM
  2. Open a table in a From based on a filter
    By turbobeagle in forum Forms
    Replies: 1
    Last Post: 01-11-2008, 12:27 PM
  3. How to display data from another record
    By rodrigo in forum Access
    Replies: 1
    Last Post: 07-24-2006, 07:29 PM
  4. Replies: 1
    Last Post: 03-02-2006, 06:17 AM
  5. Data Not Showing in Reports
    By Delin in forum Reports
    Replies: 1
    Last Post: 01-26-2006, 08:53 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