Jump to content

  •  

Photo

Auto-sizing Portal in report


  • Please log in to reply
10 replies to this topic

#1 benwiggy  novice

benwiggy
  • Members
  • 60 posts
  • FM Application:11
  • Platform:Mac OS X Snow Leopard
  • Skill Level:Beginner
  • Time Online: 4d 14h 1m 40s

Posted 24 July 2011 - 08:41 AM

I'm using a portal in a report, to display multiple records in a sub-table related to the main table. There can be 1 or more instances of the records in the portal.

At the moment, I have the portal set to display 10 records. However, if there are only two records, it shows 8 empty lines.

Is there a way to have the portal automatically contract or expand to display all the records and no blank lines?
  • 0

#2 comment  consultant

comment
  • Members
  • 23,501 posts
  • Time Online: 299d 10h 6m 30s

Posted 24 July 2011 - 02:33 PM

You can set the portal to slide up. It would probably be better to produce the report from the child table, though.
  • 0

#3 benwiggy  novice

benwiggy
  • Members
  • 60 posts
  • FM Application:11
  • Platform:Mac OS X Snow Leopard
  • Skill Level:Beginner
  • Time Online: 4d 14h 1m 40s

Posted 25 July 2011 - 12:00 AM

When you say "set the portal to slide", do you mean include a scroll bar? Or something else?

There is data from other subtables, as well as the main table. Will that work if I produce the report from the child table?

Say for instance that the database is of customers and their orders. (It isn't.) I want a report that shows all the customer's information, and then lists all the orders below.
Some customers will have a few orders, and some may have 50. When I display (or more importantly, print) the report, I want to see all the orders but not have a huge gap for those customers with only one order.

Ideally, I'd like quite a few fields to collapse if they contain no data. I also have a big "Notes" field, which sometimes contains a lot of information, and sometimes contains none. It would be great if when nothing was there, it didn't leave a big blank space, but just closed up all the fields.

Is there any logic I can do "if field is empty, don't show"?
  • 0

#4 comment  consultant

comment
  • Members
  • 23,501 posts
  • Time Online: 299d 10h 6m 30s

Posted 25 July 2011 - 02:32 AM

When you say "set the portal to slide", do you mean include a scroll bar? Or something else?


Something else:
http://www.filemaker...62.html#1030089


I want a report that shows all the customer's information, and then lists all the orders below.


You would produce the report from the orders table, summarized by customer. This enables each order to have its own height. OTOH, customers with no orders will not be included.

There is data from other subtables


That is more difficult. Only one child table can use the body part. The others must either use portals in the sub-summary part, or be calculated in the parent table. Another option is to combine all child tables into one - either ad hoc for the report or permanently.
  • 0

#5 benwiggy  novice

benwiggy
  • Members
  • 60 posts
  • FM Application:11
  • Platform:Mac OS X Snow Leopard
  • Skill Level:Beginner
  • Time Online: 4d 14h 1m 40s

Posted 03 August 2011 - 10:41 AM

That's mostly got it. Thanks.

However, what I want to do now is to create a report which uses one field in a portal from a sub-table, but I want the data to repeat on the same line.
In other words: I want to make "columns" within a portal, as well as rows. So that instead of each piece of data starting a new line, I can get 8 or so records (of the same field) on one line.
Do I just repeat the field blocks?
  • 0

#6 comment  consultant

comment
  • Members
  • 23,501 posts
  • Time Online: 299d 10h 6m 30s

Posted 03 August 2011 - 11:11 AM

Are you trying to save space, or is there some significance to the columns? If the former, you could report from the child table, using a layout set to print in 8 columns, across first.
  • 0

#7 benwiggy  novice

benwiggy
  • Members
  • 60 posts
  • FM Application:11
  • Platform:Mac OS X Snow Leopard
  • Skill Level:Beginner
  • Time Online: 4d 14h 1m 40s

Posted 13 August 2011 - 08:23 AM

Thanks for the reply.

Yes, I want to save space. The report should have a few fields from the main table (which all fit on one line across the page), and then there is one field from the sub-table, and I want each instance to join the current line. The record is only 5 characters long!!!

The effect replicates a standard way of presenting information in relevant academic reference material. So creating a layout with columns is not really the answer, as that still gives a carriage return, and it wraps the first line with the main table data.

"Show repetitions" and what looks like a vertical and horizontal button in the Data tab of the Inspector, looks promising, but I can't get that to work either.

If Filemaker can't do it, then I may have to export the text and run it into InDesign or something that does grep search and replace.

----------
Now, in a different layout (and sort of going back to my original post), I am using the scroll bar on a portal. That's fine and dandy when I'm browsing, but when I go to the Preview, it doesn't work and isn't really useful on a printout. Is there a way to suppress the scroll bar in Preview or print?
(My sub-table has wildly varying records for each record in the main table -- some have one, some have 50 or more. I still haven't quite found a way to display them in both Preview and Browse mode that is optimal for both modes.

In other words, if I use portal sliding, then that only works in Preview (still leaving lots of unused rows in Browse mode). If I use a scroll bar, then I don't have the problem with white space in Browse mode, but I get purely decorative scroll bars in Preview mode, and the portal doesn't reveal the extra records.
  • 0

#8 comment  consultant

comment
  • Members
  • 23,501 posts
  • Time Online: 299d 10h 6m 30s

Posted 13 August 2011 - 09:37 AM

The report should have a few fields from the main table (which all fit on one line across the page), and then there is one field from the sub-table, and I want each instance to join the current line.


I probably misunderstood your request. I am not sure I understand it now. It sounds like you should have a calculation field in the Parent table =

Substitute ( List ( Child:: SomeField ) ; ¶ ; ", " )

and place it on the Parent layout alongside the "few fields". If that's not it, provide an example file and a mock-up of the intended result.


Now, in a different layout (and sort of going back to my original post), I am using the scroll bar on a portal.


As i said in my first reply, produce the report from the child table,
  • 0

#9 benwiggy  novice

benwiggy
  • Members
  • 60 posts
  • FM Application:11
  • Platform:Mac OS X Snow Leopard
  • Skill Level:Beginner
  • Time Online: 4d 14h 1m 40s

Posted 14 August 2011 - 07:14 AM

Now I don't understand. Currently, using a portal, everything works as I want it to: I get multiple records from the sub-table on a page for each record from the main table.

That is what I want, and that is what I have: EXCEPT that I want to get rid of the scroll bars in the portals when I print.

I suppose I could simply have one duplicate layout without scroll bars and a very long portal for printing; and another layout for working and browsing on-screen. But that seems a bit kludgy, and I expected that there would be an easier way.

Why on earth would anyone want a scroll bar on a printed page...?

I can see that a REPORT that uses the child table is auto-sizing, so that may be an alternative -- but that kind of negates the whole purpose of portals, doesn't it? Anyway, I'll have to muck about with report layouts and try to get the Main table data in there too.

As to the other problem of putting multiple sub-records on one line: Here's what I want:

52 Gloria in G major SSATB, 2 Violin, 2 Viola, Basso continuo, 2 Oboe, Trumpet, Bassoon, Flute
CZ-Pak; CZ-Pkřiž; D-Bsb; D-Dlb; GB-Lbl; US-BETm


and here's what I get:

52 Gloria in G major: SSATB, 2 Violin, 2 Viola, Basso continuo, 2 Oboe, Trumpet, Bassoon, Flute
CZ-Pak
CZ-Pkřiž
D-Bsb
D-Dlb
GB-Lbl
US-BETm


(It's manuscript sources for a particular piece of music, if you're interested.)
  • 0

#10 comment  consultant

comment
  • Members
  • 23,501 posts
  • Time Online: 299d 10h 6m 30s

Posted 14 August 2011 - 07:59 AM

I could simply have one duplicate layout without scroll bars and a very long portal for printing; and another layout for working and browsing on-screen. But that seems a bit kludgy


Having a dedicated layout for printing is not "kludgy" - it's practically a must. The requirements for a printed page are very different from on-screen browsing in terms of size, colors, headers, page numbers and much more.


As to the other problem of putting multiple sub-records on one line:


Have you tried my suggestion?
  • 0

#11 benwiggy  novice

benwiggy
  • Members
  • 60 posts
  • FM Application:11
  • Platform:Mac OS X Snow Leopard
  • Skill Level:Beginner
  • Time Online: 4d 14h 1m 40s

Posted 15 August 2011 - 08:43 AM


It sounds like you should have a calculation field in the Parent table =

Substitute ( List ( Child:: SomeField ) ; ¶ ; ", " )

and place it on the Parent layout alongside the "few fields". If that's not it, provide an example file and a mock-up of the intended result.

That works well. Many thanks.
I've sent off for "Filemaker Pro, The Missing Manual", which should be some good bedtime reading.

Until then, is there an easy way to sort and/or remove duplicate entries from the field above, or is that pushing it...?

Many thanks once again.
  • 0




FMForum Advertisers