Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Sliding / columnar report problem

Featured Replies

Is it possible to allow a field to slide or not slide on the basis of a calculation (in this case, of character length)? I have a columnar report with fixed column sizes. Most of my data fits in the column nicely, but a few entries are longer, and I would like only these to slide, so that my report would look like this :-

xxxx xxx xxxxx xxx xxxxxx

xxxx xxx xxxxx xxx xxxxxx

xx xxx xxxxxxxx xxx xxxxxx

xxxx xxx xxxxx xxx xxxxxx

xxxx xxx xxxxx xxx xxxxxx

xxxx xx xxxx xxxxxxxxxxxxx

Only entries 3 and 6 would slide because they have data which is longer than the "default" field width.

Thanks,

Mike McHugh

  • Author

Sorry, the spacings didn't show up properly in my post - I'm re-posting with underscores instead of spaces.

xxxx___xxx___xxxx___xxx___xxxxx

xxxx___xxx___xxxx___xxx___xxxxx

xx_xxx_xxxxxxxx_xxx_xxxxxx

xxxx___xxx___xxxx___xxx___xxxxx

xxxx___xxx___xxxx___xxx___xxxxx

xxxx_xx_xxxx_xxxxxxxxxxxxx

"Is it possible to allow a field to slide or not slide on the basis of a calculation (in this case, of character length)?"

-- No.

Of course, you could possibly display the record data using a calculation field that works out where to put the spaces. It might need to be in monospace font though.

Yes. Because sliding is specific to a layout, you could duplicate your report layout and have a sliding and a non-sliding version. Create your calculation If (FieldLength > x, 1, 2) where FieldLength is a calculation field that returns the number of characters, x is the threshold beyond which you need to slide, and 1 and 2 are categorical variables. Make calculation result be text (you can use any other value or character besides 1 and 2, I just used them as an example).

In your navigation script, assuming you are viewing or printing one record at a time, if the result is 1, go to the sliding layout. If the result is 2, go to the non-sliding layout.

I think Mike wanted to slide specific fields, not all of them, based on a calculation. Slide fields 5 and 6 across but not 1 to 4.

Sliding fields in a columnar report makes a mess! I think he wants a "column auto-resize" feature like Excel.

[ November 28, 2001: Message edited by: Vaughan ]

  • Author

Thanks for the replies. I only want to slide a row when one field is more than a set size - otherwise they should stay in their columns (which is why an excel auto-size feature won't work either). I also realise that it would be much easier if I could just make the text wrap to a second line, but since this isn't for me, but for a friend, I don't have the final say !

Thanks again,

Mike

You can have fields slide conditionally, but only in Preview mode. Is that what you want?

  • Author

No, I need a hard copy, but I'd be interested in knowing how to do this, just for my edification !

Mike

quote:

Originally posted by Mike McHugh:

No, I need a hard copy

As in printed on paper? No problem. Use calc fields to specify width of columns and width between columns. You can use a different calc for each column, if you need each to be a different width. I used one calc field, making all columns the same width.

Make 3 calc fields: columnWidth, spaceWidth, columnWidthSliding. The first two are fixed:

columnWidth(calc,text) = "XXXXXXXXXX"

spaceWidth(calc,text) = "X"

columnWidthSliding depends on the character count of the data fields:

columnWidthSliding(calc,text)=

If( (Length(field1) > 10) or (Length(field2) > 10) or (Length(field3) > 10) or (Length(field4) > 10) or (Length(field5) > 10), "",columnWidth )

On your report layout, make as many copies of columnWidth as you have data fields, in this case 5. Make each one wide enough to show all the data that might appear in a data field. Spread them out across the header with gaps between them. In the gaps, place copies of spaceWidth, at least wide enough to show an "X". Tighten it up so that each field just touches its neighbor. Copy all the fields and move them straight down to the body, perfectly lined up with the originals. In the body, change each occurance of columnWidth to columnWidthSliding. Change the background and text colors of all the fields to the background color of the parts they're on.

Place your header labels directly on top of corresponding columnWidth's, lined up on the left. Make copies of each columnWidthSliding. Place the copies directly on top of the originals. Change the copies to your data fields. Give the data fields appropriate text colors.

Select everything and make it slide left.

I used 10 X's for the field widths, but you would adjust them to suit your needs. The report should both preview and print the way you want it.

I can send you a demo, if this is too confusing to follow.

  • Author

Thanks a lot for this, Thom - I'll certainly give it a try ! It looks fairly straightforward to me, but if it's not too much trouble could you send a demo, for reference ?

Thanks again

Mike

[email protected]

  • Author

Sorry for the public posting ...

Thom,

Thanks for the demo. I tried to send this to your return email address, but it kept bouncing ...

Mike

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.