Results 1 to 9 of 9
  1. #1
    Join Date
    Dec 2005
    Posts
    14

    Unanswered: Limiting Details Listed

    I am trying to generate a report which displays a record on each page along with a list of a set number of details for the record.

    More specifically, I am building a report to print onto pre-printed checks. The check is on the bottom portion of the sheet, and I'm using the top portion to list a summary of the line-item transactions in the check. For now, I placed the check portion on the Group Footer of the report, an invoice heading on the Page Header, and the line-items on the Details section.

    Since this report needs to fit on one page, I want to limit the number of items listed on each check (I'm using 10 as my limit for now). If there are more than 10 transactions on the database related to this check, I only want to show the first 10 and ignore any additional items.

    Is it possible to make a report display only a set number of Details for each group?

    If it helps, I'm using an Access database with tables named 'Checks' and 'Transactions'. There can be 1-to-many Transaction records for one Check. I inner-join both tables on a field called 'CheckNo'.

  2. #2
    Join Date
    Oct 2005
    Posts
    178

    Wink

    In your design view right click on the details ( left side, outside fields area)
    select format section.
    click on the icon opposite the suppress option and write and save the argument below. Change the appropriate field.

    {tblOrders.transactionNumber} > 9

    I'm hoping your transaction number starts at 1 every checks issued, otherwise you need to create an incremental variable to count the transaction and use the same formula above.

  3. #3
    Join Date
    Dec 2005
    Posts
    14
    Thanks, fredservillon, for the suggestion. Unfortunately, I do not have any kind of transaction number like this on my table.

    If absolutely necessary, however, I may be able to add such a field.

  4. #4
    Join Date
    Oct 2005
    Posts
    178
    You need some kind of counting mechanism in order to limit the lines to print, You can use a variable to increment to 10 and reset to zero when invoice or check changes. whatever is easy and confortable for you.

    Or better yet, you can create a running total of transactions and create the formula above mention that when the running count = 10 then suppress it.

    I guess there's many ways to fly a kite.
    Last edited by fredservillon; 12-10-05 at 09:16.

  5. #5
    Join Date
    Dec 2005
    Posts
    14
    Quote Originally Posted by fredservillon
    Or better yet, you can create a running total of transactions and create the formula above mention that when the running count = 10 then suppress it.
    Could you elaborate on how to use the running total method? I'm fairly new to Crystal Reports, so I'm only vaguely familiar with that concept. Would this require me to add an additional field to my database table?

  6. #6
    Join Date
    Jul 2005
    Posts
    4
    You may be able to summarize depending on the data. For running total you want to count the number of transactions off of a the account number. You want to reset the count on account numbers. Then you need to suppress the formula posted above with the running total.

  7. #7
    Join Date
    Oct 2005
    Posts
    178

    Wink

    Quote Originally Posted by Pizzor2000
    Could you elaborate on how to use the running total method? I'm fairly new to Crystal Reports, so I'm only vaguely familiar with that concept. Would this require me to add an additional field to my database table?
    No, you don't need to add another field. The concept here is to count the items when report is running through the records, and reset the count to zero when a specified group changes. This will count all the items under the check issued. Although it will count all the items, you want to only show the first 10 items, so you suppress the viewing of the items after 10 items
    To do this..
    From the Design mode Crystal Menu, Click Insert, select Runnning Total. This will give you list of fields you want to count. Select the item number field, give your running total a name for example "itemCount". Next option beow is I believe "Evaluate"- choose the option "each record".(I'm just thinking this of my head)
    Next option at the bottom is "Reset", choose "on group change of" - select the group check or invoice
    This will create a running total variable "itemCount"

    Now

    In your design view right click on the details ( left side, outside fields area)
    select format section.
    click on the icon opposite the suppress option and write and save the argument below by selecting the running total "itemcount" from the available listed fields and formulas.

    {itemCount} > 10

    If the items are actually more that 10, I'm sure you would want to know the exact items that were evaluated in the check even it's showing only 10 items right? So you can actually add a text object in one of the summary group by saying "Actual total items=" & itemCount or you can create a statement formula that if the total itemcount is greater than 10 show the statement "listing only 10 of " & itemCount and suppress the statement formula if itemCount is less that 11. Am I overwhelming you yet?
    Let me know how that work out.

    I hope this is clearer for you..
    Good Luck,


    Fred
    I hope this is clearer for you..
    Last edited by fredservillon; 12-12-05 at 01:12.

  8. #8
    Join Date
    Dec 2005
    Posts
    14
    Thanks, Fred. I tried your running total idea, and it worked beautifully.

  9. #9
    Join Date
    Oct 2005
    Posts
    178

    Smile

    Quote Originally Posted by Pizzor2000
    Thanks, Fred. I tried your running total idea, and it worked beautifully.
    I'm glad to be able to help you.

    Don't forget if your company needed logo shirts or any apparel, I am an independent rep for LogoWearDirect. I make commssion if I took the order.
    I'm starting to do this for fundraising of my kids who are active in school Activites. My straight A student high school daughter sang at EPCOT candlelight concert last week and Downtown Disney the next day. My 4th grade boy will also do the same. Just put me down in your address book for Logo Shirt rep and your private computer consultant . fred@servillon.com or 407 729 0823- cell

    http://www.servillon.com
    Last edited by fredservillon; 12-12-05 at 13:13.

Posting Permissions

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