Jump to content

Recommended Posts

Hi Guys, 


I'm back, with some final (hopefully) questions on Reporting. Assuming the Data looks like this:  


I can create Reports from the Item, Type, etc that's easy. 

What I'm struggling with is the following: 

1. Making a Report which is sorted by Type, but only where the Qty is above 0. So where Bread, Cheese and Crackers would be excluded.


2. Making a Report which shows the 'top 10' owned, and 'bottom 5' owned - based on qty field.


3. Making a Report which shows me the 'best' month (a) per product and [which month did I have the most of all items] and (b) the same in year. 


I'd appreciate any help or advice :)









Link to post
Share on other sites
Posted (edited)
5 hours ago, Neil Scrivener said:

1. Making a Report which is sorted by Type, but only where the Qty is above 0.

Assuming that quantity cannot be negative, the only way that a quantity of a group can be 0 is if all the quantities in the group are 0. So simply start by performing a find for quantity > 0.


5 hours ago, Neil Scrivener said:

2. Making a Report which shows the 'top 10' owned,

I assume you mean the top 10 types by quantity? For this, you will need to first sort your records by Type and then omit any records after the 10th group. This can be done quickly using an adaptation of a method called Fast Summaries by Mikhail Edoshin.

Your table needs to have 2 summary fields: sTotal for totaling the quantity and sCount that counts some field that cannot be empty (e.g. ItemID).

Start by finding the items iyou want to report on and sorting them by Type, reordered by sTotal, descending. This groups the items by type and places the groups with the highest quantities at the top of the report.

Then make your script do:

Go to Record/Request/Page [ First ]
  Set Variable [ $i; Value:$i + 1 ]
  Set Variable [ $nextRecord; Value:Get ( RecordNumber ) + GetSummary ( Items::sCount ; Items::Type) ]
  Exit Loop If [ $nextRecord > Get ( FoundCount ) or $i > 10 ]
  Go to Record/Request/Page [ $nextRecord ] [ No dialog ]
End Loop
If [ $i > 10 ]
  Omit Multiple Records [ Get ( FoundCount ) - Get ( RecordNumber ) + 1 ][ No dialog ]
End If


I am afraid I did not understand #3. It sounds like there are several questions in there and each deserves its own thread.


Edited by comment
Link to post
Share on other sites

Thanks for this will give a go. 

Should I be creating a Script to run the Find, so that if additional value are created - or that the Find gets reset, it can be re-instated? 

Or is it the case that once Find has been activated, it's 'locked in'? 

Link to post
Share on other sites

I am not sure I understand the question. You said you wanted to produce a report. A script that produces a report will normally start by establishing a found set of the records to report on. 


Link to post
Share on other sites

Thanks for this, I've ran into two problems: 

The first is that when using Find, inserting >18 I'm getting a message saying "No records match this criteria". However >0 works perfectly. Why is this? 

The second is that I have a nicely laid out report when sorted by Type. I have a sub-summary with with Type heading, and then the Body contains the vegitables and quantities. When performing a Find (as per the working one, above), my lovely titles and headings are vanishing, and I'm getting hard and fast data. I guess this is because Find it showing 'Body' only - but when creating a Report (say a paper of PDF), I'd want to perform the Find, and then keep the nicities of my Header, Sub-Summary, Footer etc.... How would I do that? 





Link to post
Share on other sites

Sub-summary parts appear only when records are sorted by the associated break field. After performing a find, records are unsorted.


Link to post
Share on other sites

Got it! Thanks. 

For anyone else reading who experiences the same issues - I believe you need to: 

1. Perform the Find in your Criteria

2. Sort Records 

I'm going to make a script that does this, and then when clicked takes you to the Print option - which should package everything nicely up :)

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Similar Content

    • By dancer5678
      I am using Filemaker Server 18 on Windows Server 2012 R2
      Been using it for years with no issues
      Currently when I log in to the console it is very sluggish.
      When I get to the Dashboard it shows No databases, then it auto refreshes and the database list appears.
      Within 15 seconds of scrolling the database list to open files the screen refreshes. This situations is happening over and over in a loop.
      Any Thoughts on what is causing this issue?
    • By stevaroni
      I get an error 3 when using a script to Export Records via WebDirect. Using FileMaker Server 18 and have tried both Safari and Chrome both with same results. I have tried using the temporary path, desktop path, and documents path. I have tried using with the automatically open and not. I have tried writing a tab delimited and comma delimited file. Does anyone have ideas I haven't yet tried?
    • By cheerfulzebra
      Hi All
      I am hoping some one can help!
      I have a table called TPM, in that table is a field "Next Due Date" Which is auto generated by creating a new record. You input the date you did the service and then it adds 3 months to that date and that appears in the Next Due Date Field.. All working...
      What I am trying to do is when the database loads it runs a script to see if there are any outstanding TPM Services to do...
      Here is the script
      Show Customer Dialog
      Message: If ( TPM::TPM Next Due Date < Get (CurrentDate ) ; "You have outstanding TPM services" ; "You have no outstanding services")
      I thought it would be that simple. So I created a TPM Due date Less that Current date and ran the script...."You have outstanding TPM Services"...GREAT! Then I deleted that record and ran the script again...""You have outstanding TPM Services" Oh!!! That isnt true!
    • By Kitesurfer
      Can someone please explain why Leftwords function is not properly working when importing an excell sheet.
      For example the name John Doe LeftWords ( Client ; 1 ) should show "John" only.
      When typing John Doe it works fine but not when importing ????
      Looking forward to a reply.
      Kind regards
    • By Pio Soto
      My issue is that my customer layout has a script trigger on LayOutEnter that sorts my customers portal list by "Active" customers,
      but when I do a go to related record from another table say from quotes or any other the customer layout does not load that customer
      or show my related customer because the OnLayoutEnter script trigger changes it, I would like it to go to the related customer and also sort it by "Active"
      on the list.
      Hope someone can help me with this.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.