Empty text display won't shrink

Not to preempt Jim, but I have a report in which the expanding and shrinking works just as expected. The Data tile is marked both expandable and expand/shrink on the measurements panel, the Text Display object is set just the same, and is also set to collapse blank lines on the TD options panel.

I’m glad it’s working for you. As far as I know, this feature works fine.

FYI, however, the expandable and expand/shrink options only have an effect on objects that contain data. Since the data tile has no data associated with it, these options have no effect on it. It doesn’t hurt anything to make a tile expandable or expand/shrink, but it doesn’t help either – basically these options are ignored for objects that don’t contain data.

I tried Bill’s suggestions, but to no avail. I’m taking Jim up on his offer and sending the file to Provue for diagnostics.

What happens if you recreate this form from scratch in Panorama X?

I’ve seen that solve problems before, but forgot to try it. I set up a new form first with a header, footer, and data tile with only 2 text display items in it. Super simple - but couldn’t get it to vary the height of the record when the shrinkable item was blank. Tried again with only the data tile and same result - even chose different fields for the text displays (numeric, text, formulas). Still no change. Even with a new DB and 2 fields I can’t make it shrink. I’ve tried setting expand and expand/shrink on both text displays, plus the data tile, as well as checking the collapse blank lines box. Hoping Jim can see what is missing.
FWIW I’m running Mojave on a 27" iMac from late 2013

I haven’t had a chance to look at your database yet, but are you sure the data is really empty? Even a single space will cause it to not shrink.

Thanks for sending the file. There is a bug. Panorama X is using some Apple code to measure the height of the text, and that code doesn’t consider empty text to be zero height. I can fix that by bypassing the measurement if the text is empty. This fix will be in Panorama X 10.2 (sorry, I don’t know exactly when that will be available, but I promise the fix will be in that release).

Thanks for verifying that I wasn’t missing something. And fixing it.
To save me a lot of time experimenting with things, can you think of any work arounds such as a rich text statement to shrink the text size to 0.1 point if the value is empty or using some code to eliminate the text display and shrink the size of the data tile for each record as it prints? I’m grasping at things I’ve only seen mentioned in the documentation but would love to have a way to print daily summaries more compactly.

If there was some other way to do it, I wouldn’t waste my time implementing the variable height printing feature! (or your time having to learn how it works).

I guess you could experiment with the Text Display set to Rich Text and add a string of a couple of blanks to the existing formula set to a very tiny size. Say your formula now is simply a variable or field named theText:

theText+"<size:.5>   </size>"

Now if theText is blank you will still have this tiny string left to trick the data tile into shrinking. Don’t know if this would work but it is something I would give a shot.

Sorry, but this won’t work. Expand and Expand/Shrink don’t work with Rich Text. In fact, I think if you try this with 10.1 Panorama X will crash.

Oh, right, I forgot about that problem. Well then, second best is to just add the text string of a space or two at the end so even if your normal text string is empty you will still have the spaces and maybe force the shrinking. I have not tried this myself so I can’t say if it would do what you need.

theText+"  "

Please re-read my post explaining the problem. To accomplish the expand and expand/shrink feature, Panorama uses an algorithm (supplied by Apple) that measures the height of the text. This algorithm will never calculate that the height of the text is less than one line, even if text is completely empty. There is no trick that will force this algorithm to calculate a height of zero. Of course if the text is empty, we can assume that the height is zero without even using the algorithm, and that is the fix I have made for the future by changing the Objective-C code. But there is no way to do this in the current 10.1 version.

Well, I was never trying to infer that the Text Display would be shrunk to zero. I was only trying to suggest a way to minimize the size if it was otherwise empty text. I probably made a bad assumption as to the real problem since I never had the time to create a test for this.

I have made a workaround for my version of the issue. I’ll post a description here in case it points anyone toward a solution. Given the fact that Jim didn’t know about this difference from Pan 6 to Pan X, I’m not sure how popular this feature is with the bulk of users.
The goal was to have a day report that lists a line of 15 data bits for each transaction and, if there was a note field with the transaction, it would show up under the line of data items. If it was blank, the Note display item would shrink to zero and the spacing under that line in the report would be tight.
So, until the fix is in in Pan 10.2, I made this change. On the form, I put a wide text display on top of the rightmost 8 items. I changed the code for those 8 to say if the «Transaction Type» is “Note” make it blank, otherwise show the usual data info. Then I looped through the transactions and if there was a note filled in, I inserted a new record below and labelled the transaction type “Note” and copied down the Note from the record above.
When printed, the note will be right under the transaction it goes with. This is almost the same output format Pan 6 produced. For now it will suffice. These reports are important archival records in case the computer ever crashes or gets stolen. Thanks to all who contributed suggestions along the way.

I should also add that there is a lot of processing and sorting of data to produce the day report, so I export the day’s records to a temporary database. Back 15-20 years ago it was so much faster to do that than have the computer sort through 100-150k records for each select, sort, and total operation. The database has grown over the years and I haven’t tested the speed with modern computers, but still guess this is a faster way to do those things.
All this to say that this is a temporary copy of a slice of the records, so all of them, includeing the extra records inserted will simply be discarded when the report is completed.

Yes, that was what Scott needed.

Cool. Given your overall workflow, this sounds like a reasonable temporary solution.

I’d like to suggest another workaround: If a Text Display object never shrinks to less than 1 line, make sure that your “Notes” always go into the second line!

Here is my test example: A test database with 2 records, one with Notes, one without Notes. The Text Display object is set to “Formula”, Expandable, Expand/Shrink, and Collapse Blank Lines.

The formula calculates a first line, followed by a carriage return, and then the contents of the Notes field in the second line. If the Notes field is empty, the Text Display object shrinks in the printed form to 1 line. You could hide this first line of the Text Display object behind other objects.

The screenshot shows the data sheet and the form (in Graphics Mode to show the formula); then it shows 2 Preview windows: the Print Previews of the 1st and the 2nd record.

1 Like

The formula of the Text Display object in my example needs an improvement: The second line should appear only, when there is text in the Notes field. You can change the first line part to whatever you want.)

"" +?(length(Notes)>0, cr() + Notes,"")

Thanks, Kurt. Your solution is more elegant than mine and keeps the information together in one record whereas mine splits it into two parts. I’ll implement that shortly