4 Replies Latest reply on Mar 12, 2013 1:17 AM by paolobkk

    IWP reporting on portals - make a better look



      IWP reporting on portals - make a better look


           Good day everyone!

           So, I'm still working on this reporting lists for IWP and I'm researching about another portal issue.

           The lists in Portals are ok to display  many records on the layout, but if I need to make a report I also need to replicate the sub-summary fields somehow.

           For example I have a portal to display from table "Line_Sales" and the first field in the row will be the Customer_Name.

           There is any way to make appear the Customer_Name only in the first record row? Then I will see the second Customer_Name under the end of the first report and so on.

           Maybe there is a way to make a calculation field that will display the Customer_Name only if is different from the Customer_name in the previous row?

           ..Perhaps using text formatting functions?

           I've seen some discussion about this solution around the internet some time ago but I can't find it anymore

           Appreciated any comment, Cheers!


           FMP12 on FMS12 - Macmini server - IWP


        • 1. Re: IWP reporting on portals - make a better look

               Reporting in IWP is quite limited.

               Using portals in any FileMaker report--Filemaker Pro as well as IWP, is often not the best option for a report.

               Sub summary layout parts cannot be put in a portal and cannot be used at all in IWP.

               You may be able to use a calculation field to display the name if it uses the GetNthRecord function to access data in the previous record:

               Let ( R = Get ( RecordNumber ) ; IF ( R = 1 ; NameField ; GetNthRecord ( NameField ; R - 1 ) ) )

               That will work in a list view of your data--which may be a better option anyway, but I don't think Get ( RecordNumber ) will evaluate correctly from within a portal, but you can try that if you want to see what you get.

          • 2. Re: IWP reporting on portals - make a better look

                 I will try that way, thanks!

                 List view in IWP is also limited to 25 records my the lists will be way longer that that. The users will need to have quick view to all the records and be able to scroll up and down.

                 I'm aware of the limitations about subsummary parts in IWP and impossible within a portal. I'm trying to achieve a portal like this:

                                Date                     Customer                     Specs
                                Date 1                     Customer 1                     Item 1
                                                                            Item 2
                                                                            Item 3
                                                      Customer 2                     Item 1
                                                                            Item 2
                                Date 2                     Customer 1                     Item 1
                                                                            Item 2


                 I may try to use your suggestion within fields and sorting portals (or raleted tables) in the proper way.

            • 3. Re: IWP reporting on portals - make a better look

                   From a list view layout, using calculation fields in place of the date and customer fields might make it possible to use the GetNthRecord to return the value of the date or customer field only if Get (RecordNumber) is not 1 and value in the preceding record is different from that in the current record:

                   case ( Get ( RecordNumber ) = 0 ; Customer ;
                              GetNthRecord ( Customer ; Get ( RecordNumber ) - 1 )  ≠ customer ; customer )

              • 4. Re: IWP reporting on portals - make a better look

                     Hi Phil, Thank you for your suggestiopns always very helpful!

                     Sadly list view is not an option for my case, the limit of 25 records does not satisfied the whole view and browsing speed.


                     However following your directions I was able to get what I want within the portal!!wink

                     To start easy I've worked on another table where I need a list of items sorted by category.

                     I've created an unstored calculation field "Category Calculated" as follows:


                     If ( 
                     (GetNthRecord ( category ; Get(RecordNumber) - 1 )) = category ;
                      "" ;

                     The calculation is on the contest of the table used for the portal.

                     The portal is sorted by the field "Category"


                     In the picture you can see the resulting portal in the browser. I've displayed the "Category" and the "Category calculated" to show you where the calculation is working.

                     I think is great!

                     All the fields in the portal are from the same table of the portal. Now I will try with another portal where I work with customers.