[Solved] Auto Sizing Results

Getting your data onto paper - or the web - Discussing the reports features of Base

[Solved] Auto Sizing Results

Postby JAGS » Sun Dec 08, 2013 8:48 pm

I have 2 fields "First Name" and "Last Name". As we know names are all different lengths. What I am trying to accomplish is to have the results in my report display with appropriate spacing between the names.

What I am getting is:

Mothers Name: firstname lastname

And what I would like to get is:

Mothers Name: firstname lastname

How do I control this so when the report runs it applies correct space between the two fields in regards to the number of characters in the names. One mothers name might be Meg while anothers name might be Margaret. If I set field size too small it cuts off part of the name but if I set it too big then it creates too much space between names. Is there a way to have this size accordingly automatically?

Thanks!

JAGS
Last edited by Hagar Delest on Sun Dec 15, 2013 12:58 pm, edited 1 time in total.
Reason: tagged [Solved].
Open Office 4.0 on Windows 7 - 64 Bit
JAGS
 
Posts: 10
Joined: Sun Dec 08, 2013 8:37 pm

Re: Auto Sizing Results

Postby JAGS » Sun Dec 08, 2013 9:07 pm

This forum did not show what I am getting results correctly - I have many spaces between first and last name.
Open Office 4.0 on Windows 7 - 64 Bit
JAGS
 
Posts: 10
Joined: Sun Dec 08, 2013 8:37 pm

Re: Auto Sizing Results

Postby RoryOF » Sun Dec 08, 2013 9:18 pm

JAGS wrote:This forum did not show what I am getting results correctly - I have many spaces between first and last name.


When you need to display that sort of formatting, use the Code button on the Post a Reply or Full Menu screens. or surround your formatted string with
Code: Select all   Expand viewCollapse view
[code] Formatted string     [/code]
if using the quick reply window
Apache OpenOffice 4.1.7 on Xubuntu 18.04.4 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 30418
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Auto Sizing Results

Postby Sliderule » Sun Dec 08, 2013 9:27 pm

Your report, should NOT take the data directly as defined in your table. Instead, it should be either from a Query, or, a View . . . and . . . that Query or View will 'calculate' the name for you, including the space.

For example:

Code: Select all   Expand viewCollapse view
"First Name" || ' ' ||  "Last Name"

The above, will take, whatever text is in the field "First Name", concatenate ( || ) one space ( ' ' ) . . . that is . . . one single quote, a space, one single quote . . . followed by "Last Name". :super: You can assign, in the Query or View, a column name of "Mother Name" . . . or . . . whatever else you desire, and, use that calculated output in your report.

I hope this helps, please be sure to let me / us know.

Sliderule

Thanks to ad [Solved] in your 1st post Subject (edit buton top right) if this isue has been resolved.
User avatar
Sliderule
Volunteer
 
Posts: 1206
Joined: Thu Nov 29, 2007 9:46 am

Re: Auto Sizing Results

Postby JAGS » Sun Dec 08, 2013 9:42 pm

I added the report builder extension and am building this in design view. Is this what I should be doing? or are you saying I need to be doing this someplace else. I am sorry I am a bit of a newbie to this and am confused.

Thanks
Open Office 4.0 on Windows 7 - 64 Bit
JAGS
 
Posts: 10
Joined: Sun Dec 08, 2013 8:37 pm

Re: Auto Sizing Results

Postby Sliderule » Sun Dec 08, 2013 9:48 pm

What I am saying is . . . your report . . . should use either a Query, or, a View as the data source. And, that Query or View will 'calculate' the data by combining the "First Name", a space, and, "Last Name" for you . . . therefore . . . the report writer . . . displays that calculated field.

The calculated field . . . may have a length of UP to the maximum length of "First Name" + 1 + maximum length of "Last Name".

I hope this helps, please be sure to let me / us know.

Sliderule

Thanks to add [Solved] in your 1st post Subject (edit buton top right) if this isue has ben resolved.
User avatar
Sliderule
Volunteer
 
Posts: 1206
Joined: Thu Nov 29, 2007 9:46 am

Re: Auto Sizing Results

Postby JAGS » Sun Dec 08, 2013 9:54 pm

So how do I change my reports source to a query from a table?
Open Office 4.0 on Windows 7 - 64 Bit
JAGS
 
Posts: 10
Joined: Sun Dec 08, 2013 8:37 pm

Re: Auto Sizing Results

Postby Sliderule » Sun Dec 08, 2013 10:04 pm

JAGS wrote:So how do I change my reports source to a query from a table?

If you have an existing report . . . created using the Oracle Report Writer . . .

  1. Create and save your Query or View . . . with whatever name you want
  2. Open your Report in Edit mode
  3. Open the Report Navigator . . . Press F5 . . . or . . . from the Menu: View -> Report Navigator
  4. At the top of the Navigator Window . . . click on Report
  5. In the Data tab that, choose your data source . . . whether a Query or a View
  6. Place the fields you want on the report.
I hope this helps, please be sure to let me /us know.

Sliderule

Thanks to ad [Solved] in your 1st post Subject (edit buton top right) if this isue has ben resolved.
User avatar
Sliderule
Volunteer
 
Posts: 1206
Joined: Thu Nov 29, 2007 9:46 am

Re: Auto Sizing Results

Postby JAGS » Sun Dec 08, 2013 10:10 pm

Ok I have created my query and changed my source to it. How do I add this formula you have given to create a result on the report? Do I add a text box?

I am sorry I am such a newbie - I am trying to do this for a non-profit organization for their membership report. I appreciate your patience.
Open Office 4.0 on Windows 7 - 64 Bit
JAGS
 
Posts: 10
Joined: Sun Dec 08, 2013 8:37 pm

Re: Auto Sizing Results

Postby Sliderule » Sun Dec 08, 2013 10:20 pm

JAGS wrote:Ok I have created my query and changed my source to it. How do I add this formula you have given to create a result on the report? Do I add a text box?

Just to be clear . . . well . . . at least as clear as mud . . . the Query you have created, it includes the new 'calculated' field of:

Code: Select all   Expand viewCollapse view
"First Name" || ' ' ||  "Last Name"

right? And, you have assigned a NAME to it . . . for example: "Mother Name" . . . or whatever. And, the 'calculated' output might be 'Margaret Jags', or, 'Meg Jags' . . . as per your example. :super:

The next step is, to REMOVE from your report . . . like you described in your first here . . .

Mothers Name: firstname lastname

So, instead, your revised report . . . take the 'calculated' value, from the Query, for column "Mother Name":

Mothers Name: "Mother Name"

I hope this helps, please be sure to let me / us know.

Sliderule

Thanks to ad [Solved] in your 1st post Subject (edit buton top right) if this isue has ben resolved.
User avatar
Sliderule
Volunteer
 
Posts: 1206
Joined: Thu Nov 29, 2007 9:46 am

Re: Auto Sizing Results

Postby JAGS » Sun Dec 08, 2013 10:30 pm

WOW I am getting it - Thank You So Much

One other question - can I build my report off of multiple sources or just one?
Open Office 4.0 on Windows 7 - 64 Bit
JAGS
 
Posts: 10
Joined: Sun Dec 08, 2013 8:37 pm

Re: Auto Sizing Results

Postby Sliderule » Sun Dec 08, 2013 10:42 pm

JAGS wrote:One other question - can I build my report off of multiple sources or just one?

Just one source . . . that can be either:

  1. Table
  2. View
  3. Query
  4. Select statement . . . raw SQL code
Now, just as an FYI . . . if necessary, in your Select statement ( Query / View ) . . . you could . . . use a UNION clause . . . where it will 'combine' various query output . . . into one RESULT SET . Therefore, the RESULT SET will, contain the same data type for each column. For example, a column that is an INTEGER, canNOT have some INTEGERS and some DATES . It ( the resulting column ) must be 'consistent' data type. :ugeek:

Sliderule

Thanks to ad [Solved] in your 1st post Subject (edit buton top right) if this isue has ben resolved.
User avatar
Sliderule
Volunteer
 
Posts: 1206
Joined: Thu Nov 29, 2007 9:46 am


Return to Reporting

Who is online

Users browsing this forum: No registered users and 1 guest