Hello,
I have build a small base in openoffice base.
I have build a querry based on 3 tables.
The problem is in report like in atachment the column "Val_fact" it repeats. I want to ask you if is there any option that on that column the value to apear only one time?
In Access when I build the report is an option so to apear one time the value from "Val_fact" column.
But I want to learn Base because is free.
Thanks a lot.
Duplicate records in report
Duplicate records in report
- Attachments
-
- EVIDENTA FURNIZORI.odb
- small base
- (50.91 KiB) Downloaded 220 times
openoffice 4.1.0 on windows 7
Re: Duplicate records in report
In the file you posted, the query SOLD FURNIZORI returns three lines. All three lines have something different from the other two.
Two lines do have the same "Val_fact". Which one of those two do you want to appear?
Two lines do have the same "Val_fact". Which one of those two do you want to appear?
OpenOffice 4.1.1 on Windows 10, HSQLDB 1.8 split database
Re: Duplicate records in report
It doesn't mather which one the ideea is to apear only once.
It can do with Base?
It can do with Base?
openoffice 4.1.0 on windows 7
Re: Duplicate records in report
Base can do it. It is more complicated than in Access. I think this query will do as you want:
I saved this query in the attached file.
Code: Select all
SELECT "FURNIZORI"."Den_fz", "FURNIZORI"."Sold_initial", "INTRARI"."Val_fact", X."Suma_platita", "FURNIZORI"."Sold_initial" + "INTRARI"."Val_fact" - X."Suma_platita" AS "Sold_fz", "INTRARI"."Nr_fact", X."Nr_chit"
FROM "INTRARI"
INNER JOIN "FURNIZORI"
ON "INTRARI"."Cod_fz" = "FURNIZORI"."Cod_fz"
INNER JOIN (SELECT a."Suma_platita", a."Nr_chit", a."Nr_fact", COUNT(*) AS "Rank"
FROM "PLATI" a
LEFT JOIN "PLATI" b
ON a."Nr_fact" = b."Nr_fact" AND a."ID" >= b."ID"
GROUP BY a."Suma_platita", a."Nr_chit", a."Nr_fact" ) X
ON X."Nr_fact" = "INTRARI"."Nr_fact" AND X."Rank" = 1- Attachments
-
- EVIDENTA FURNIZORI (2).odb
- (50.7 KiB) Downloaded 230 times
OpenOffice 4.1.1 on Windows 10, HSQLDB 1.8 split database