thread said:
Marshall Barton wrote:
thread said:
how should i set the values when every serial number have several
records and i want to delimit the serial number to give just the 3
records for example
Marshall Barton wrote:
thread wrote:
i'm trying to operate a report when only few records should appear]
for example if i have 10-15 records from same event
i would like to get only 3
Try setting the report's record source query Top Values
property to 3
If you want to get the top three records for each event,
then you need to use a TOP 3 subquery in the criteria.
I can not write that for you unless you provide a Copy/Paste
of your existing query, explain which field(s?) is the
primary key and how you determine the three records to be
displayed.
i will try to show you some example of
a table and how i want the information to be populated
lets say we have 3 fields
serial number,version date,comments
SR1 ver1 first develop
SR1 ver2 second develop
............................
SR1 ver100 final develop
SR2 ver1 first develop
...............................
SR2 ver100 final develop
i would like to get the top 3 records from every serial number
SR1->ver100,ver99,ver98
SR2->ver100,ver99,ver98
all the information of the records but only 3 per group
That looks like you want a single result field with the
highest three versions. BUT, you also said you want "all
the information of the records" without providing an example
of the other information or how it relates to the serial
number or version. This looks like a conflict of goals so I
really don't understand exactly what you want from this or
where this is going from here.
In order to get the "latest" (i.e. Top) versions, it is
absolutely necessary to sort the versions. That in turn
requires you to specify **exactly** how to sort the version
indentifiers. I can not extract precise information from
your generalizations, so please be very specific using your
real data.
If you try to sort versions like what you posted, you would
get
ver99. ver98, ver2, ver100, ver1
which is clearly not what you want. This means that a Text
version identifier field has to be parsed to determine the
portion that can be used to sort them the way you want. If
the version identifier is a Number type field, then say so.