Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2007

    Unanswered: Don't want every item to print in a report

    Hi all

    I have a report that produces receipts for dog show entries. In my database I have 12 different classes that can be entered but obviously not everyone enters all classes. How can I get my report(receipt) to only show those classes that a particular dog has entered. I need the 12 different classes as a dog can enter 2 classes in the same section (if that makes sense). My report also adds up the total due for the entry. At the moment the only way I can get the calculation to work is to include all the possible choices in the body of the receipt.

    So at the moment a receipt may look like this

    Fred The Dog Puppy class $10.00
    CCD class $15.00
    Best dog $5.00

    Total entry cost: $30.00

    I want the receipt to leave out those lines that are $0.00

    I'm not good with VB so please be gentle with me.

  2. #2
    Join Date
    May 2005
    Nevada, USA
    Provided Answers: 6
    It would help to know your table structure. At a guess, you should have a table with a record for each class entered, so in your example that customer would have 3 records in the table. With that design, you wouldn't have to worry about the zero lines, as they wouldn't exist.

  3. #3
    Join Date
    Apr 2004
    Kingsland, Georgia
    i'm guessing your table probably looks like dogname, classname1, classcost1,...classname12, etc. all in one table, as opposed to having a table for the dog, and a seperate one for the classes and costs assigned to each dog.

    without altering your table structures, you could try (on the report) setting the CanShrink property of each of the classname and cost textboxes to Yes, and then add some code in the Detail_OnFormat (if that's the report section they're in) event to make the classname1.visible=false if it's null, and the classcost2.visible=false if it's 0, etc.

    Best idea would be to normalize the data (redesign the table structure). Poeple on here would be more than willing to help you out with that. That would enable you to pull the data you want into the query to show on the report, without having to put in the code to make things invisible.

Posting Permissions

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