Filemaker find latest record grouped by name in layout - date

I have a table of records with two fields: City and ImportDate
Example records:
London - 13/06/2016
Paris - 14/06/2016
Paris - 15/06/2016
London - 19/06/2016
London - 20/06/2016
New York - 13/06/2016
New York - 17/06/2016
I need to have a Filemaker layout where I display only the most recent entry for each city, so we know what imports to concentrate on as we can look down the list and see what is the oldest. In other words I want to group by City, and then display only the most recent date.
So, my layout with the above data would show:
London - 20/06/2016
New York - 17/06/2016
Paris - 15/06/2016
What's the best way to accomplish this?
Thanks.

Use a layout in list view with a sub-summary part (when sorted by City) and no body part. When asked, set the sub-summary part to print below the records it summarizes. Place the two fields in this part.
Sort your records by City and by ImportDate (ascending).

Related

IReport - multiple grouping

I need group data by 5 fields. It's ok, but I need show "Totals" in a new page after each first grouping.
Example:
Birth Nationally Car Job Name Money
1980 North American BMW Doctor Paul $1200,0
1980 North American BMW Lawyer Longman $2700,0
1980 North American Mercedes Nurse Lenna $4200,0
1980 Canadian Mercedes Police John $1300,0
1993 Italian Ferrari Pilot Marco $1500,0
I build my report in this way:
- Main report contain a subreport;
- Subreport (where the groups are):
Birth group header
Nationally group header
Car group header
et...
Car group footer
Nationally group footer
Birth group footer (here I put a SECOND SUBREPORT, that need be in a new page)
Second Subreport: contains the totals by birth, nationally and car, but only actual birth. After each Birth, I need show the sum of money. So, after 1980 would be shown:
1980
Nationally: North American Car: BMW Total: $3.900
Nationally: North American Car: Mercedes Total: $4.200
In a first moment, my subreport 2 didnt work because has no data. So I copied the original data for each object (list X that contains list X). So the subreport 1 uses list X e and pass list X to subreport 2.
But I don't know how to filter the Birth in subreport 2.
Is my solution correct? If yes, how to solve the problem of subreport 2. If no, how should I build that?
Thanks in advance.

create filter from multiple data sources

I have multiple data sources that have city, state and country information.
Example -
Source 1:
ID City State Country
12345 New York New York USA
12344 Cebu City PHL
12232 Bengaluru Karnataka IND
Source 2:
ID City State Country
12345 Dallas Texas USA
12344 London UK
I would like to create a filter to show drill down option into country, state and city using both the databases. I cannot combine the source due to few sourcing issues. Not sure if a set can be created like union of the columns from the data sources to be able to show a filter that will have values from all the data sources.
Like..
Country = USA, PHL, IND, UK and then filter state and city and so on. Can someone please advise how I can achieve this?
The city, state and country columns are dynamic in my data sources
Quote from Tableau's online help.
You can union your data to combine two or more tables by appending values (rows) from one table to another. To union your data in Tableau data source, the tables must come from the same connection.
If your data source supports union, the New Union option displays in the left pane of the data source page after you connect to your data.
It's pretty easy to do inside Tableau Desktop.
https://onlinehelp.tableau.com/current/pro/desktop/en-us/union.html

Crystal reports -Custom grouping

I have a table called Employee(EmployeeNo,name,Address).Employee number is integer. Employee numbers
prefix is changes according to employees working location. for example
EmployeeNumber - Location
12323 - London prefix "1" says that employee location is in London
24343 - Newyork prefix "2" says that employee location is in Newyork
38989 - Moscow prefix "3" says that employee location is in Moscow.
Now my problem is I don't have separate field to group employee by there location in crystal reports. so I have to get each employee's location using his employee number and group it according to that.
example
London
12323 Thomas sx
13434 Ray xx
14343 Frank uy
NewYork
24545 Alan oo
26656 Robin op
29098 Hayden lp
Moskow
35424 gustov lo
38967 Levshev ol
any idea is appreciated..
Here compulsory scenario should be "Prefix" should be first letter of the location
Use the below code in a formula
Left (<database field>,1 )
Now use the formula to group.
You should be able to group according to lcoation

How To EXPRESSION with WHERE " count Orders WHERE customer = Mr. Smith "?

I am a beginner in iReport and I cant program Java so I hope you can give me an idea.
I've already managed to make a chart that displays how often all customers have ordered in february, march,... etc.
Thats how I did it:
In category expression I have: $F{Month}
In value expression I have : $F{count(Orders)}
But I want to display how often only one customer (for example customer a) has ordered in february, march,... etc.
I have the following values which i can use:
Month, Orders and Customers(here are all customer names saved)
-------//-----------UPDATE--------------//-----------------------------------
I want to display a chart which represents the total orders per month of a customer. But iam trying to display my 3 customers (my database has only 3) in only one chart (stacked).
For example(see picture above): I want to display the total orders from Customer A (yellow) in february. And I want to display the total orders from Customer B (blue) in february and the same for customer C.
The customers should be displayed stacked (3 in every month) and every customer should have a different color plus the total orders from every customer should be displayed ...like in picture above for example:
customer A(yellow) made 3 total orders in february, Customer B(blue) made 2 total orders in february, customer C..etc.
it is very important that every month displays 3 customers...stacked.
How do I do this?
I appreciate every idea.
From what I have understood from your question, you want to show a chart which represents the total orders per month of a customer.
You need not use stacked bar graph for this purpose.
You may want to use bar graph which would serve your purpose.
If you want to see the chart per customer, create one parameter $P{customer} and pass it into your query.
Refer document iReport-Ultimate-Guide-3 on how to create parameters and to use it in queries.
e.g:
select customer,month,count(orders)
from <your table>
where customer=$P{customer}
group by month
The above approach would work if you want to see the details for only one customer.
**Here is my solution after your update.**
From your update, it seems like you want to represent the total orders per month for all the customers.And you want to use stacked chart for the same.
Then what you have done is correct but have missed to add a field to your 'Series Expression'
Add your field customer to your series expression and this will resolve your problem i.e,
Series Expression : $F{customer}
Category expression : $F{Month}
Value expression : $F{count(Orders)}
This will display the chart in the format you have specified.
Create a paramter that takes your customer name $P{customerName}
and another takes month $P{month}
pass these two paramters to your sql like that
SELECT customer_name, order_count FROM customers
bla.. bla..
WHERE customer_name=$P{customerName} and month=$P{month}
then create a chart with only one serie to show one customer as one color. Not like yours with 3 colors.
Fell free to ask for more specific detail.

Crystal Reports XI Cross tab summarised field how to stop cell rows of the same value merging?

I have created a cross tab however if I have a firstname field it merges the rows together if there are two names which are the same. How do you get it to display the names in the each row. In the example below Sarah is not displayed twice as the cells are merged together.
Firstname Lastname
Judy Collins
Sarah Dane
Smith
Joe Dine
Mary Lane
It sounds like you grouped your crosstab on the first name only. I would recommend:
Make a new Formula (Call it "FullName")
In the formula, combine the first name and last name, e.g. something like {First Name}&{Last Name}
Edit your crosstab to group by the FullName formula instead.
Does this help?
EDIT
Based on your comment, I don't think your comment is with Crystal. You need a "unique ID" of some sort, a distinct number for each person. My original suggestion was trying to use the user's full name as a unique ID, but that won't work if your dataset is big enough to include multiple people with the same name. Does your dataset have any kind of unique ID? What is this crosstab trying to display? There might be a better way.