Jump to content
Server Maintenance This Week. ×

This topic is 1434 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi Guys, 

 

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

image.png.dc41d4f3a8a2aa184d6398bfe0b01d3f.png

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 :)

 

Thanks!

N 

 

 

 

 

image.png

Link to comment
Share on other sites

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 FIRST RECORD OF EACH GROUP, USING "FAST SUMMARIES"
Go to Record/Request/Page [ First ]
Loop
  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
# OMIT EXCESS RECORDS
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 comment
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? 

Thanks!

 

 

 

Link to comment
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 comment
Share on other sites

This topic is 1434 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

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