Microsoft Access Report - report

I have 2 tables: Customer and Sales. The customer table has:
Customer Number
Customer Name
Customer Location
The sales table has:
Customer Number
Sales Date
Sales Amount
I created the relationship between the tables based on customer number. I can do a query that links up the data from each table.
What I have not been able to do is to summarize my Access report.
I only want Customer Number, Customer Name and Customer Location to show up once and I want each Sales Date and Sales Amount to show up associated with that customer.
Right now, when I do my report, Customer Number, Customer Name and Customer Location gets repeated for each sale.
For instance, if Customer A has 3 sales, Customer A shows up 3 times. I want Customer A to show up once, with the 3 sales listed individually underneath Customer A.
I can summarize it by Customer Number (using a group, I think), but Customer Name and Customer Location still show up multiple times.
I appreciate any advice.

You need to put all fields that you want to show up once in the group header.

Related

GSuite AppMaker - Populate datasource with distinct values from another table

I have a simple gsuite app with two data sources. One is a students datasource which stores student name, id, and demographic info. The other is a record of the attendance for the current day and contains name, date, and present (boolean column). Each student is unique and maps to one or more rows in the attendance datasource.
The goal is to be able to pre load the table with a set of students from the students table, leaving the date and present blank. THen the user can go down the table checking the boxes for who is in attendance on that day.
Is there a simple way to pre-load a set of records in the Attendance table based on the students table? Any good examples with explanation?
EDIT:
Here's what a data model might look like:
Students: FirstName:string LastName:string Status:string SiteName:string
Attendance: FirstName:string LastName:string Date:date Present:bool
The Students datasource would contain one record per FirstName, LastName. The Attendance datasource would contain multiple records per student, corresponding to each day that attendance data was captured.
Ideally, when displaying the Attendance table widget, I would pre-populate the table with a list of students for one Site. I already have a date-picker widget that updates all the date column values.

Woocommerce - how to match orders and items back to customers

I've been provided with a Woocommerce SQL dump (don't have access to that platform anymore as it was shut down), and need to identify their most valuable customers and what they bought, i.e.
Customer X spent the most at $X, and the last purchase item was 'Red umbrella'
Customer Y spent next most at $Y etc
I can see a wp_users table which has the customer data, a wp_woocommerce_order_items table which has the items data.
My question is - where can I find revenue data, and how can I link these tables (which IDs in each table correspond to which other ID in other tables?) - in particular how do I link customers, to orders, to items?
Thanks a lot
Look for the table wp_postmeta in that table, the field _customer_user will hold the id of the customer who placed that order post_id field in that same table.

How to know what record I am in? Dynamics AX7

Here is the scenario:
In the Sales and marketing > Sales orders > All sales orders
I entered the lines by double-clicking the Sales order number
by doing that I am entering the lines of the sales order.
Now in my lines, there is a button there where I will use to add a syntax where I will insert fields in my newly created table.
I would like to know how can I know what record I am in (before entering the lines/before double-clicking the sales order number). I need to know what Sales order number I'm in as I enter the lines of the record.
In every form the current record of a specific FormDataSource has the same name of the FormDataSource. For example in the SalesTableListPage form the only datasource is called "SalesTable", so the current sales order record is identified in your code with the salesTable identifier.
Every record is extended from [Common]. There you have field TableId. You can get table name with [tableId2name].
You can inspect fields with DictTable and field* methods.

How to get the lowest price of products?

Table structure
The above Table have 10 products with various price from 3 suppliers. I need to pick the supplier who can give the lowest price.
Just i tried with MS Access 2013. I unable to get the lowest price. Your valuable guidance is much appreciate one.
SID = Supplier ID
PCODE = Product Code
Thank you very much for your time
I assume cheapest means lowest per-ml price per item
So do the following:
create a query#1 that includes the product, supplier, whatever other
fields you want in the final answer, and a calculated field of the
per-ml price.
create an aggregate query #2 on query#1, which groups by product and gives the min per_ml_price. Now you have a "table" with the cheapest price for each product.
Lastly, you want to find the data that matches the lowest price. (Inner-)Join query#2 and query#1, and output the fields you want (product, supplier, etc.)

Crystal reports, get sum for specific reocrds

In Short:
I need to get a total for customer groups + the credits - the debits in a specific date range.
In Detail:
I'm creating an invoice report for customer orders. Each Customer belongs to a group, and I need to group the invoice by customer group so I can give a total amount owed for the customer group.
So the top Group in the report is customers.group_name with the total for the group in the group header.
The second group is orders.customer_id with the total for the customer in the group header.
I have 2 parameter for the date range of orders which I use in the select expert
I have another table for credits and debits for each group.
This are the fields for the CreditDebits Table
group_name
date_
type_ (this can be either "credit" or "debit")
amount
I've linked customers.group_name with CreditsDebits.group_name in the database expert.
I also use the date range parameters for this table
Do get the credits I created a formula called "credists" like so
if {Credits_Debits.type} = "credit" then sum({Credits_Debits.amount})
But when I drop this formula on the customers.group_name header, the formula shows up as empty and the total for the group gets messed up (it becomes triple of what it should be.
What am I doing wrong?
First check Does this field CreditsDebits.group_name consists of customer name? or any different name?
Place the formula if {Credits_Debits.type} = "credit" then sum({Credits_Debits.amount}) in footer but not in header and check.

Resources