Hot Topic (More than 10 Replies) Report Layout (Read 2440 times)
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Report Layout
Mar 26th, 2005 at 9:17pm
Print Post Print Post  
Hi -

I have a fairly simple report that lists people according to the table they are sitting at (1 through 25) and the seat within the table (1 through 10).

It looks something like this.

Reunion Seating Arrangements

Table #   Seat #   Last Name   First Name

1   1   Saepoff   Marty
1   2   Saepoff   Elsie
1   3   Lichtman   Norman
1   4   Lichtman   Marcia
1   5   Taub   Irving
1   6   Taub   Carol
1   7   Katz   Arthur
1   8   Katz   Shirley
1   9   Schwartzberg   Martin
1   10   Schwartzberg   Florence
2   1   Wachtel   Herbert
2   2   Wachtel   Lenore
2   3   Bisom   Robert
2   4   Bisom   Marilyn
2   5   Greenblatt   Stanley
2   6   Klevorick   Alan
2   7   Klevorick   Ruth
2   8   Taub   Alan
2   9   Taub   Marion
2   10   Eisen   Stuart

etc.

The first thing I must do is get rid of the repeating table #'s which makes the report very difficult to read.  I want to see the table # only when it changes (and preferably with a "line break" between the tables), such as:

Table #   Seat #   Last Name   First Name

1                  1   Saepoff   Marty
                   2   Saepoff   Elsie
                   3   Lichtman   Norman
                   4   Lichtman   Marcia
                   5   Taub   Irving
                   6   Taub   Carol
                   7   Katz   Arthur
                   8   Katz   Shirley
                   9   Schwartzberg   Martin
                 10   Schwartzberg   Florence

2                  1   Wachtel   Herbert
                   2   Wachtel   Lenore
                   3   Bisom   Robert
                   4   Bisom   Marilyn
                   5   Greenblatt   Stanley
                   6   Klevorick   Alan
                   7   Klevorick   Ruth
                   8   Taub   Alan
                   9   Taub   Marion
                 10   Eisen   Stuart

The next thing I would like to do is provide more spacing between the columns.  (I tried adding "spacers" between each layout element but that didn't seem to do anything).

Guess I can't 'display' that here because extra spaces are ignored; however, I want more space between the table and seat # and more space between the seat # and name, etc.

  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Report Layout
Reply #1 - Mar 26th, 2005 at 10:42pm
Print Post Print Post  
Hello Spencer..

This information is from my notes:  GENERIC INSTRUCTIONS TO STOP REPEATING COLUMN VALUE
-------------------------------------------------------------------------
Make a Group Header with the following elements:
Value Box bound to FirstColumn (Column value, once only at head of group)
Static Text Label for each of the remaining columns.

In the Group Body have the following elements:
Space  (Takes the place of the non-repeating, invisible column)
Value boxes for each of the remaining column elements
Value box bound to FirstColumn desired  Make this box invisible.  Set group to break on this element, value-0

----------------------------------------------------
In your example, your report would look something like this:

Group Header:
Value Box bound to Table Number
Static Text boxes for Seat Number, LastName, FirstName.

Group Body:
Space
Value boxes for Seat Number, LastName, FirstName. Table Number
Make Table Number invisible, and set Group to break on Table Number for value=0
--------------------------------------------------




  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Report Layout
Reply #2 - Mar 27th, 2005 at 5:11am
Print Post Print Post  
Hi Bob -

Well, I'm making a little progress, but no matter how I try to manipulate it, I can't seem to get it to make sense.

I did get the table #'s to stop repeating, and that's definitely a step in the right direction. But the seat # is in the column headed Table #, rather than under the heading Seat #.

I still can't seem to get the spacer's working to give me blank space between the columns and for the column data to be aligned under the correct header.

I would also like to concatenate the name to be something like, Last, First M Maiden but can't figure out how to program that.

Any additional guidance will be appreciated.
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Report Layout
Reply #3 - Mar 27th, 2005 at 5:28am
Print Post Print Post  
Quote:
I would also like to concatenate the name to be something like, Last, First M Maiden but can't figure out how to program that.
Add a Value element, unbound.  Name it FullName or somethining like that.
Go to Programming for the report and write the Concatenate program in there for that new element FullName.  Just like doing the programming for a form. 

You need to include the concatenated elements (Last, First, Maiden, etc.) on the report to be used in the programming, but just make them invisible like Derived Columns in Q&A.

Re the SPACE, have you added a SPACE element as the first element in the Group Body?  That will be taking up the space used by the Group Header value for the Table Number.

  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Report Layout
Reply #4 - Mar 27th, 2005 at 5:47am
Print Post Print Post  
OOPS!  Shocked  One more caution.  Roll Eyes

When you add elements to the Group Body, Header, etc. the editor section where you add the elements shows a box labeled Name, but is more like an element label vs. an element name. 

The added elements actually get the name LE0, LE1, LE2, etc.  They don't get the name of the bound element. 

You may need to go the the editor and change the names from LEn to the name you want to use in your formulas.   You can use the LEn names in the programming, but you will probably prefer to use the real names to make the programming easier to read.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Report Layout
Reply #5 - Mar 27th, 2005 at 2:16pm
Print Post Print Post  
Hi Bob -

Thanks for all the help.  I HAVE to do this because it is essential to my application; why YOU are sticking with it is beyond me.  lol

Seriously, I can't believe that a simple report could be so much struggle ... but at least I am getting there and, hopefully, this will give me a better foundation for working on future report needs.

Before I forget thanks, especially, for pointing out about the element names vs labels.  I was surprised when I originally had problems with concatenation because that is fairly basic for me.  I had, however, overlooked the names assigned to the elements and that was causing me a problem.

As far as space between columns go, I am forming the conclusion that I just can't do it. Apparently the HTML formatting wants to "squeeze" as much as it can.

The heading Seat #, for example appears as

Seat
#

I assume this is being done, since the highest number is only two digits and it is trying to converve space in the column.

I guess I just have to live with this and it isn't the worst thing in the world.  

There are two last things that are important to me, though, and unfortunately, I'm not overly optimistic.

First - I would like a space between the seat of one table and the seat of the next table. What I'm getting is:

                10
Table# 2     1

What I want is:

.................10   *I only used the dots to properly position the '10'}

Table #2     1

The other very important thing (and since I keep hearing that HTML doesn't recognize pages per se - I'm sweating this one) is that I don't want the tables to be split between pages. 

I'm getting, for example,  the headings and seats 1 through 8 on one page and then the next page has no headings and just seats 9 and 10.  It is important that the tables be kept together as a "whole."   (In other words, I should have 3 complete tables on the first page ... and the fourth table should start on the next page).  Any hope?
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Report Layout
Reply #6 - Mar 27th, 2005 at 6:20pm
Print Post Print Post  
Hi -

Well, one of my last two problems have been resolved.

I tried putting a 'PAGE BREAK' into my group footer and, instead of forcing a new page, it gave me the line break that I wanted between the tables.

All that is left is to figure out how to start a new group when there is not sufficient space for a group to fit on the remainder of a page.
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Report Layout
Reply #7 - Mar 27th, 2005 at 6:31pm
Print Post Print Post  
Quote:
As far as space between columns go, I am forming the conclusion that I just can't do it. Apparently the HTML formatting wants to "squeeze" as much as it can.
This should be the easiest!  Where you add StaticText and ValueBox, there are other elements to choose from.  One of them is SPACE.  After selected, it should up as a Grey colored element, named LEn with internal label saying "Space"

Each of the SPACE elements in the Group Body will take up the same width as the Label in the Group Header.  If you have multiple groups (see below), Spaces in each Group will follow the width of the columns in those Group Headers.
-----------------------------------------------------------------------

The spacing between pages will be more difficult, but in this report it sounds like you know how many lines you will have, for example, ten lines per table, so you could fit 5 tables on one page.  You can insert another element in the Group Body, a "NewLine".  You can add multiple NewLines to show up between each table to help spread the distance and help to force a Page Break where you need it. 

And this area also has a PageBreak element that you can add to force a Page Break between Groups.  Right click on the Group Header to open the Report Section Properties window.  This area is where you define how you want the variious breaks to be handled.

To help us here, maybe upload a screen shot of your report layout with the Report Section Properties showing to the left side 
« Last Edit: Mar 31st, 2005 at 12:46am by Bob_Hansen »  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Report Layout
Reply #8 - Mar 28th, 2005 at 3:19pm
Print Post Print Post  
Quote:
As far as space between columns go, I am forming the conclusion that I just can't do it. Apparently the HTML formatting wants to "squeeze" as much as it can.

The heading Seat #, for example appears as

Seat
#


Another way to do this is to set the width of the report elements to be bigger then what they need to be.  If you look in Sesame Seasons on the invoice form is a report named Invoice Columnar. This report has widths set to spread the four columns out more. To see the widths, open the report in designer and click one of the static text elements in the group header. Switch to the Look/Position tab of the Property viewer and you will see the widths. The  numbers are in pixels I believe.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Report Layout
Reply #9 - Mar 30th, 2005 at 8:49pm
Print Post Print Post  
Hi folks -

Sorry that I haven't been responding; however, I have had to contend with a broken shut-off valve that dumped water into 3 of my rooms - office included. In any event, now that I'm a little poorer, that's under control.

Thanks Ray for telling me about the column widths; that took care of spacing between columns - since I couldn't get the "spacers" to do me much good.  The heading "Seat #" now appears on one line (instead of two) the way I wanted it.

Once again, the single and biggest problem remaining is the breaking of groups.  I wasn't aware of "new line" Bob and I haven't tried it.  I am going to assume that it works; however, it would not be a viable solution for my problem, since the # of seats per table fluctuates daily.  

The seat numbers are generated by the records in my database.  When first starting to record reservations there may be only 1, 2 or 3 seats at the table. Ultimately, I strive for 10 per table; however, I may have to go up to 11 or 12. So, having to manipulate the number of lines I add and where I add them - each and every time I run the report - and possibly for as many as 25 table - just isn't the solution I need.

I guess I am just going to have to wait for the new report writer/generator (or whatever new report function they are working on) to be put into place.  I just hope that it's in sufficient time prior to my next reunion for the report to be useful to me.

Once again, folks, thanks for all the help.  Knowing about these additional "tools" will, at least, give me a little more flexibility in designing future reports, until the "real thing" comes along.  lol

One last question, though.  I've used the "line" element in the report header section (next to whatever element I put there - usually a static one) and it works just fine.  The line appears on the report UNDER the Report header.

But when I do the same thing in the group header section, a very short line appears to the right of the group header (instead of underneath it).  Any suggestions as to what I might be doing wrong?

If you still want to "see" the report and or layout, Bob, I'll be happy to make it accessible here.
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Report Layout
Reply #10 - Mar 31st, 2005 at 12:57am
Print Post Print Post  
Hmmm, I just got a radical idea Spencer.???
Not thoroughly thought out yet.  Shocked

An old Q&A trick with Derived Columns was to insert a big text string of spaces to force "dummy line breaks" to next line.  I am quite sure that you are familiar with this already.

There is a Sesame function that will allow you to count the records in the record set.  Once you know that you should be able to count lines, do some calculations, and add a last unbound Value box to insert some "dummy line breaks, to control how many lines you have on each page.  You could put this programming into the Report Programming section. 

Here is a quick pass of an approach to do the calculation, assuming 66 lines per page: 
1.  Count the number of records in group1, if less than 66 then count records in group 2, add to group totals, repeat for next group, etc. 
2.  When group total> 66 then take previous grouptotal, subtract from 66, divide the difference by the number of groups and assign a "dummy break line" qty to evenly spread out the differenc.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Report Layout
Reply #11 - Mar 31st, 2005 at 7:01pm
Print Post Print Post  
Quote:
One last question, though.  I've used the "line" element in the report header section (next to whatever element I put there - usually a static one) and it works just fine.  The line appears on the report UNDER the Report header.

But when I do the same thing in the group header section, a very short line appears to the right of the group header (instead of underneath it).  Any suggestions as to what I might be doing wrong?


The Group Header is in a table, so the line that you are adding gets it's own column in the table. What you need to do is add another group header so that the line elements line up under the static text in the first group header.

In your report click where it says "Group Header 1". In the Group Management combo box choose "Add New Group After This One". Click Perform Selected Action. Click Ok.

You will now have a second group header. In this header you will want to add line elements next to the static text headers you want to have a line under. If you do not want a line under a title put a spacer element next to it.

For Example if you have the headers.

Table #
Seat #
Last Name
First Name

and you want a line under Table # and Seat # but not under Last Name or First Name. The order of elements in your second group header would go
Line
Line
Spacer
Spacer

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Report Layout
Reply #12 - Apr 2nd, 2005 at 4:03am
Print Post Print Post  
Ray -

Thanks!  Works like a charm.  It's certainly easy enough once you know what to do.

The trick, very simply,  is  "to know what to do."  lol

Now, if I could just figure out how to get Bob's suggestion to work, to keep my groups from splitting across pages, I will have finally completed an appropriate report.
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Report Layout
Reply #13 - Apr 2nd, 2005 at 6:19pm
Print Post Print Post  
OK Spencer, just squeezed out some time for you....

I am using @text() with HTML code because that is what the report is written in.  The code for a new line in HTML is "<br>".  So I am inserting some number (vMoreLines) of new lines at the end of each group.  The idea is find the number of lines needed to fill a page and divide them evenly between the groups on the page

1.  Add a  Value Box to your Group Footer for the first Group that breaks (Tables?), LE name is "MoreLines"

2.  Add the following programming to your report:
Code
Select All
var vMoreLines as Int

vMoreLines = @ToNumber(@PromptForUserInput("How many extra spacer lines?",""))

MoreLInes = @text(vMoreLines,"<br>") 

The Prompt is only there for you to see the results.  And can maybe actually use this until you have a final working solutions.  Normally vMoreLines will be calculated based on my earlier suggestion about counting records and doing a calculation.  I may be able to get to that section later, but not right now.

Again, my thoughts on calculations:

1.  Assume page lines = 66

2.  Count lines used:
Assume Table1 = 12 lines, total lines = 12
Assume Table2 = 10 lines, total lines = 22
Assume Table3 = 18 lines, total lines = 40
Assume Table4 = 11 lines, total lines = 51
Assume Table5 = 18 lines, total lines = 69

3.  Stop counting lines since over 66.

4  So we want a page break after Table 4
Total lines to fill = Page Lines - Used lines
Total lines to fill = 66 - 51 = 15

5.  Divide lines equally between groups:
Total lines to fill per group = Total lines to fill / (Groups on this page -1):
Total lines to fill per group = 15 / (4-1) = 3 per group

6.  vMoreLines = Total lines to fill per group = Total lines to fill
vMoreLines = 3

-----------------------------------
So now we need to get the programming done to do the calculations in steps 2-5 above.

And we need to do the same calulations for next page starting the count for lines used at Table 5
Assume Table5 = 18 lines, total lines = 18
Assume Table6 = 10 lines, total lines = 28
Assume Table7 = 18 lines, total lines = 46
etc....

Could probably do all calcs in one step above and come up with multiple vMoreLines, one for each page, like vMoreLinesPage1, vMoreLinesPage2, vMoreLinesPage3,
etc. and control which ones to use based on group breaking.

We also need to control which groups this is printed after.  Note the spread was between 3 groups although we had 4 on the page.  I wanted to fill the page and have the 4th group on the bottom, that is why I divided by (groups-1).  Did not want to print the extra lines after group 4. 

Again, all of this is a theoritical approach right now, so lots of fine tuning to follow.  I expect we would use a similar approach to printing this field as used to stop printing of value in first column.



  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged