7 Replies Latest reply on Nov 25, 2009 12:52 PM by philmodjunk

    Found count problem in browse and preview mode

    techccaq

      Title

      Found count problem in browse and preview mode

      Post

      Hello,

       

      I have a report that shows over 250 contacts.

       

      I have two tables.  One called "customers" and the other is "customers_related".  Some customers have some customers_related linked between them.

       

      My problem is when my report is in browse mode, I can't only see the first 230 count.  The other count show "?" until the end.  Of course, my report show the name of customers and it show correctly but I can't see the number of count.

       

      In preview mode, I see only the first 228 contacts.

       

      do you have any idea what is the problem for that?

        • 1. Re: Found count problem in browse and preview mode
          philmodjunk
            

          What table is your report based on. (What table occurrence is named in Layout Setup...?)

           

          What kind of "count" is this? Is this a calculation field? A summary field? In which table is it defined?

           

          What part of the layout is it found in? Fields in the header can display data differently depending on whether you are in browse or preview mode. In preview mode, you will see data from the first record. In browse, you will see data from the current record.

          • 2. Re: Found count problem in browse and preview mode
            techccaq
              

            It's quite hard to explain.

             

            To answer you first question, here is the relationships:

             

            customers -> order_Activities -> Order_lines -> Activities

             

            customers -> customers_related-> order_lines_replicator ->Activities_replicator

             

            So, my information come from order_lines_replicator.  The order_lines and Order_lines_Replicator contains same informations.  I create a duplicate tables (Oder_lines) and (Order_lines_replicator).

             

             

            Second Answer :

            My report have a sub-summary sorted by(Activities_name).

            So each customers of customers_related that have this particular "activites_name" sort in my report.

             

            I have a count row : Calculation field =

            Case(

            GetNthRecord(activities_name; Get(RecordNumber)) ≠ GetNthRecord(activities_name; Get(RecordNumber) - 1);

            1;

            GetNthRecord(Count_row_activities_name; Get(RecordNumber) - 1) + 1

            )

             

            I found this script on the web.

             

            For the third question,

            So, may be I don't understand what you mean but I could see all the contacts that have the particular "activities_name".  Unfortunately, the ony problem I have is that it doesn't display the good number before each line.

             

            My reports looks like :

             

            Golf

            Customers = 333

             

            ...

                   Customers Name     Compny

            229  Palmer, Lisa            ABC Inc 

            230  Palmer, Robert        ABC Inc

             ?    Parris, Lisa             DEF Inc

             ?    Parris, Marc            DEF Inc

            • 3. Re: Found count problem in browse and preview mode
              philmodjunk
                

              A question mark is Filemaker's way of telling you "I can't correctly display this value".

              The two most common causes are:

              1. a calculation expression that includes division by zero
              2. fields that are too narrow to display the number

              1. doesn't seem to be the issue. 2 might. Try clicking into the field and see if a value appears here. You may need to make your field wide enough to display a larger number here.

               

              • 4. Re: Found count problem in browse and preview mode
                techccaq
                  

                OK, I changer your second option.

                 

                Golf

                Customers = 333

                 

                ...

                       Customers Name     Compny

                229  Palmer, Lisa            ABC Inc 

                230  Palmer, Robert        ABC Inc

                 ?    Parris, Lisa             DEF Inc   If I click on the "?", I could see 231.

                 ?    Parris, Marc            DEF Inc   I can't click on the "?".

                • 5. Re: Found count problem in browse and preview mode
                  philmodjunk
                    

                  Strange, if you can click into one such field, you should be able to click into the other as well. These are records listed in the body correct? In layout mode, you see a single row of fields where your report lists:

                  229  Palmer, Lisa            ABC Inc 

                  230  Palmer, Robert        ABC Inc

                   ?    Parris, Lisa             DEF Inc   If I click on the "?", I could see 231.

                   ?    Parris, Marc            DEF Inc   I can't click on the "?".

                   

                  Correct?

                   

                  When you see 231, do you just see 231 or does the value appear to be on a second line with the first line blank?

                  Is your calculation set to return a result of type "number"?

                  How have you defined the field: Count_row_activities_name?

                  • 6. Re: Found count problem in browse and preview mode
                    techccaq
                      

                    Yes,


                    I have a Header, Sub Summary (page break before each occurence), body, Sub Summary(Restart page numbers after each occurence) again and Footer.

                    All the records show in body part.

                     

                    In Layout mode, I see only one row with the name of my field.

                     

                    When you see 231, do you just see 231 or does the value appear to be on a second line with the first line blank?

                    I could only see 231 if I click on the field that suppose to have 231.  If i don't click on it, the report show "?" for the number 231.  The next one, I mean 232, show also "?".

                     

                    Is your calculation set to return a result of type "number"?
                    Return result as type text.
                     

                    How have you defined the field: Count_row_activities_name?
                    Case(
                    GetNthRecord(activities_name; Get(RecordNumber)) ≠ GetNthRecord(activities_name; Get(RecordNumber) - 1);1;
                    GetNthRecord(Count_row_activities_name; Get(RecordNumber) - 1) + 1
                    )

                    As I preivously said, I found this script on the web.

                     

                    I coudn't make a new calculation field that count row, with summary field because of this.
                    My order_lines_replicator, as is a duplicate of order_lines, in the manage database in filemaker, I could only see order_lines.  So, as I am in table order_lines, when I create a summary field, I could only see the activities_name field in the context of my customers and not from my customers_related.


                    • 7. Re: Found count problem in browse and preview mode
                      philmodjunk
                        

                      So this is the calculation for a field named Count_row_activities_name? You may have posted the calculation before but you haven't identified the name of the field for this calculation before. That makes this a recursive calculation.

                       

                      Case(
                      GetNthRecord(activities_name; Get(RecordNumber)) ≠ GetNthRecord(activities_name; Get(RecordNumber) - 1);1;
                      GetNthRecord(Count_row_activities_name; Get(RecordNumber) - 1) + 1
                      )

                       

                      I applied this calculation to a test file and got it to work as I think it was intended to work. This must be an unstored calculation so check the storage options for this field and make sure this option was selected.

                       

                      Using Fruits for my "activities names" in a sample file (with the above calculation unstored), I got this result in Browse and preview Modes:

                       

                      Apple 1

                      Apple 2

                      Orange 1

                      Orange 2

                      Plum 1

                      Plum 2

                      Plum 3

                       

                      Is this the type of result you expect? This calculation won't return a meaningful result unless you have multiple records with the same value in Activities_Name, you've sorted your records by that field and your calculation is set as unstored.