in the image table, add a calculation field called sort, use a case statement, if image 1 isempty, use image 2, if image 2 is empty use image 3 etc etc.
Cannot say i quite follow what you mean, the image table for example has 4 records, of which only record 1 and 4 contain an image in my example, how do i make your sugestion work.
Also in my actual application there are 26 records, so if only record 1 had an image, i am still going to have 25 empty portals taking up space on the document, generating pages of blank data,
Hence the need for the portal to slide
Try moving the bottom right portal 4 or 5 pixels to the right or use the alignment tools to left align the right two portals. Does that make a difference?
Now have them aligned right down to the pixel, but still not moving.
Just ruling out a possible issue.
How does one portal differ from another to control which image appears in each portal? I Think that upper right portal has a record in it, but one with no data, or at least no visible data in the container and text fields you've placed in the portal row. Portals will only slide up to fit the number of records visible in the portal. Fields within the portal row cannot slide up.
A fix might be to put a portal filter on your portals that omits records where these two fields are empty.
true the upper right portal did have no visible data in it, but it had a record.
I have the portals set as follows
top left : initial row 1 , number of rows 1
top right: initial row 2, number of rows 1
bottom left: initial row 3 , number of rows 1
bottom right: initial row 4, number of rows 1
I have now added a fiter to each portal : not isempty(data1::d1_image)
so i only get records with images that need to be shown.
There is now some sliding bottom right has moved up to top right, BUT why has the bottom left just show a blank square, when there is no record in the portal - Dont know how to stop that.
Also slightly differnet issue, if i create a portal to display say 26 records assuming there is data to display in all 26 records, they break across the page boundry. A record on the page boundry gets cut in half, half at the bottom of one page and the balance of the record at the top of the next page.
Is there a way to force the portal or layout, to not print a record if it will cross the page boundary, but put the record at the start of the next page
Is that bottom left set to "slide up" and also to "resize enclosing part"? I'd check to be sure.
The best way to print the portal records, when you have multiple records in the portal is to not use a portal for printing. This isn't always possible, but the way that it works is that you set up a list view layout based on the portal's table and then add field's from the parent record as needed to complete the report. You perform a find or use Go To Related Records to pull up the set of portal records and you size the body to be just tall enough to contain the fields from the portal table in a horizontal row. You view the layout in List view.
Why are you using a portal to display these images? From the screen above it looks like you don't need any portals.
I have a sample app you can look at. I created this sample for another post originally. The Layout PictureTest View Pictures with a portal, Horizontally Layout view the pictures without a portal. The new Layout Report is for printing the images similar to your screen shot without portals. On this layout click preview (Report Layout) to view the images.
Phil - Yes the bottom left is set to slid up.
S Chamblee - Thanks for the example. What I have been trying to achieve, (without much luck), it to display images with a previewed report. I can hold the images with fields within 1 record, or create a seperate file with one record for each image (try both ways).
I need to then display the images, with some associated text underneath,(this waas the reasoning behind the portal approach) ideally two per line , ie 4 per page. Not all the containers will contain an image, so these need to be missed out so there is no gaps in the document. Ie I might only have images in Pic1 , Pic 4, Pic5, Pic 10 etc.
On top of all this i need it to page ok and not split the image across the page boundary.
I have taken a look at your example , and am baffeled as to how the report works. You have a script call Previous Record, but i cannot see where that is called from.
I also cannot see how the report works, when in design mode it only has one container called "Picture", yet when you preview the report, it generates the 4 images. - Can you give me some pointers on what happens,
Playing more with your example i see , we achieve 4 images per page an i can place text against them. The only bit I need to then achieve is the fact that i might not have an image in some of the positions and i dont want a gap, on the report, so i need a way, to perhaps filter for only records with images.
Not fully understding how your example works as yet, not sure how to achieve this, - any pointers.
Go to layout setup while in find mode and examine the settings on the Printing tab. It sounds like this demo file is set to print things in two columns. This setting affects what you see in preview mode, but not in browse mode.
You should be able to perform a find or constrain found set operation that drops out recorsd where the container field is empty.
Phil is correct about the print settings.
The script really doesn't do anything it was left over from another sample and I forgot to delete.
I have 4 calculation fields pic1,pic2,pic3,pic4 and a pictureIdKey and I set relationships to each calculation field and pictureidkey to show all four pictures on a layout. I created the portal sample, which has the pictures vertical. The trick was to get the picture horizonal which is the second sample.
The constrain found set that omits the records with empty container as Phil stated above, will take care of your blank issue. Most realiabe method too.
Sorry to get back so late.
I believe i understand that you are indeed printing from the parent table with containers inside 1-row portals. Ideally you should print from the portal table where, as recommended, you can constrain to non-empty containers. You can then specify two rows ( Layouts > setup).
One thing I recall reading ... that containers would only slide if their graphics was set to top left (data tab). I never tested it but planted it for future reference so you might just give it a try. Portals DO slide fine. :-)
many thanks for all the answers, I will now experiment with the constrain found set