Report formatted with names&addresses
Report formatted with names&addresses
Hello, I'm newish to building databases. I've got a database with first names, surnames, addresses and other data for a couple of hundred people. I'm trying to build a report in the form
Edith Wharton
34, First Avenue
Jamesville
CA 234323
USA
Henry James
Green Mansions
Hope Street
Broad Green
Manchester
Lancashire
M21 1AA
UK
.....
I'm using the Sun Report Builder on OO 3.01, on WinXP. I'm part way there, BUT:
(1) I need to do something (with concatenation I guess) to get the first and second names arranged with just one space between them.
(2) There are several fields for different parts of the address, and the report has blank lines when an address field is empty. Can I get round that?
Any pointers would be appreciated.
Edith Wharton
34, First Avenue
Jamesville
CA 234323
USA
Henry James
Green Mansions
Hope Street
Broad Green
Manchester
Lancashire
M21 1AA
UK
.....
I'm using the Sun Report Builder on OO 3.01, on WinXP. I'm part way there, BUT:
(1) I need to do something (with concatenation I guess) to get the first and second names arranged with just one space between them.
(2) There are several fields for different parts of the address, and the report has blank lines when an address field is empty. Can I get round that?
Any pointers would be appreciated.
OOo 3.0.X on Ms Windows XP
Re: Report formatted with names&addresses
If you don't mind using Writer, you can do what you describe in Mail Merge from your database very easily. You can also suppress blank lines.
This is a good tutorial: FSM Mail merge Tutorial
This is a good tutorial: FSM Mail merge Tutorial
Ubuntu 14.10 Utopic Unicorn, LibreOffice Version: 4.3.3.2
Gurkha Welfare Trust
Gurkha Welfare Trust
Re: Report formatted with names&addresses
I thought it would be neater and easier for the end-user to have reports built into Base, so that there's just one Base file to deal with.TheGurkha wrote:If you don't mind using Writer, you can do what you describe in Mail Merge from your database very easily. You can also suppress blank lines.
OOo 3.0.X on Ms Windows XP
Re: Report formatted with names&addresses
OK, well hopefully someone will be through here soon with a Base-centric solution for you.
Ubuntu 14.10 Utopic Unicorn, LibreOffice Version: 4.3.3.2
Gurkha Welfare Trust
Gurkha Welfare Trust
Re: Report formatted with names&addresses
(1) I need to do something (with concatenation I guess) to get the first and second names arranged with just one space between them.
Code: Select all
SELECT "FistName" ||' '|| "LastName" AS "Name" FROM "Table1"
For hiding empty fields, insert into fields which can be empty, into Conditional Print expression property, on General property tab:(2) There are several fields for different parts of the address, and the report has blank lines when an address field is empty. Can I get round that?
Code: Select all
NOT(ISBLANK([Fieldname]))
Conditional Print Expression: A conditional print expression allows the user to specify whether an element or section should or should not be visible when executing the report. If the print expression evaluates to true, then the element will be printed in the report. The syntax is the same as for functions.
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
Hungarian forum co-admin
Re: Report formatted with names&addresses
Thanks for pointing me to the report builder doc wiki - I hadn't found that, I was using the SRB User Guide which has less detail.
Haven't got it to work yet. When I put NOT(ISBLANK(Address3)) into the conditional print expression box, it prevents that field from being printed even when it is not blank. But more important...
...because each field in my report is a box in a fixed location, I don't see how I can prevent blank fields from leaving a gap in the formatted address, like this
name
street
Perhaps I need the <<fieldname>> [new paragraph] <<fieldname>>... structure provided by mailmerge.
Haven't got it to work yet. When I put NOT(ISBLANK(Address3)) into the conditional print expression box, it prevents that field from being printed even when it is not blank. But more important...
...because each field in my report is a box in a fixed location, I don't see how I can prevent blank fields from leaving a gap in the formatted address, like this
name
street
. gap where in other addresses a suburb etc. may appearcity
Perhaps I need the <<fieldname>> [new paragraph] <<fieldname>>... structure provided by mailmerge.
OOo 3.0.X on Ms Windows XP
Re: Report formatted with names&addresses
I think it is not possible in SRB, you can not move dynamically fields, and not see any solution, in planned SRB features.
You can issue an enhancement, [Tutorial] Reporting bugs or suggestions, put RPT into subject.
You can issue an enhancement, [Tutorial] Reporting bugs or suggestions, put RPT into subject.
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
Hungarian forum co-admin
Re: Report formatted with names&addresses
OK, thanks for this answer. It seems that Base does not do what I need. I could get it via mail merge using Writer. But I think mail merge is more complicated in OpenOffice than in MS Word (which needs fewer clicks, and hides blank fields automatically, without having to insert special code). So I will stick with the system as I inherited it, holding data in Excel and extracting it via mail-merge using Word.r4zoli wrote:I think it is not possible in SRB, you can not move dynamically fields, and not see any solution, in planned SRB features.
It would have been nice to abandon MS Office and use OO instead. Maybe some time in the future.
OOo 3.0.X on Ms Windows XP
-
- Posts: 3
- Joined: Wed Oct 28, 2009 7:40 pm
Re: Report formatted with names&addresses
Hello:r4zoli wrote:(1) I need to do something (with concatenation I guess) to get the first and second names arranged with just one space between them.Code: Select all
SELECT "FistName" ||' '|| "LastName" AS "Name" FROM "Table1"
(2) There are several fields for different parts of the address, and the report has blank lines when an address field is empty. Can I get round that?
My english is very poor, sorry.
I'm trying to do this, but I have a problem. I try to concatenate date fields a query. The data appear, but in american format, when it is in spanish format.
For example: I want to appear
John was born on November 5
So I wrote:
Code: Select all
SELECT "FistName" ||' '|| "was born on "||' '|| "BirthDate" AS "Text1" FROM "Table1"
John was born on 2009-11-5
Can anyone help me? Thanks.
OpenOffice 2.4.1 on Ubuntu 8.10
Re: Report formatted with names&addresses
You might split your date into three parts and join them together again. For possible function names see HSQLDB SQL syntax. An example is: . You might also try to change the date format of the date field in the table.
Code: Select all
MONTHNAME(date) || ' ' || DAY(date) || ' ' || YEAR(date)
It's Microsoft marketing that tells you computers are qualified for non-technicians
W11 22H2 (build 22621), LO 7.4.2.3(x64)
W11 22H2 (build 22621), LO 7.4.2.3(x64)
Re: Report formatted with names&addresses
fmartagong:
You asked:
http://wiki.services.openoffice.org/wik ... _Functions
So, since you want the date to only show a MONTH and a Day of the Month . . . you could use: 'MONTH d' . . . ( what is between the single quotes is the the format to display the date ) . . . for example:
I hope this helps, please be sure to let me / us know.
Sliderule
You asked:
Another way to do this, is to 'format' the date the way you want, with the SQL function TO_CHAR . . . you can read about it at:fmartagong wrote: For example: I want to appear
John was born on November 5
http://wiki.services.openoffice.org/wik ... _Functions
So, since you want the date to only show a MONTH and a Day of the Month . . . you could use: 'MONTH d' . . . ( what is between the single quotes is the the format to display the date ) . . . for example:
Code: Select all
SELECT "FistName" || ' was born on ' || TO_CHAR("BirthDate", 'MONTH d') AS "Text1" FROM "Table1"
Sliderule
-
- Posts: 3
- Joined: Wed Oct 28, 2009 7:40 pm
Re: Report formatted with names&addresses
Yes, it's help me. Thanks.Sliderule wrote:
So, since you want the date to only show a MONTH and a Day of the Month . . . you could use: 'MONTH d' . . . ( what is between the single quotes is the the format to display the date ) . . . for example:
I hope this helps, please be sure to let me / us know.Code: Select all
SELECT "FistName" || ' was born on ' || TO_CHAR("BirthDate", 'MONTH d') AS "Text1" FROM "Table1"
OpenOffice 2.4.1 on Ubuntu 8.10