1 Reply Latest reply on Jan 29, 2013 9:29 AM by philmodjunk

    ExecuteSQL to retrieve the data to show in the layout

    chetanhegde

      Title

      ExecuteSQL to retrieve the data to show in the layout

      Post

           Hi,

           We need some help to sort it out ExecuteSQL function to display returned list of values on to the layout. We are struck while getting the result when we execute the query from one or many tables.

           Example :

           ExecuteSQL ( "select m.state, m.title, me.page_count from magazine m, magazine_edition me where m.mag_pub_code=me.mag_pub_code"; ""; "")

           We need to show it in a layout below manner.

                                                                                                                                                                                                                                                                                               
                          State                     Title                     Page Count                      
                          Chicago                     Title 1                     100                      
                          NewYork                     Title2                     200                      

           How we can achieve this? We tried many ways but couldnt achieve the target.

           Thanks in advance.

        • 1. Re: ExecuteSQL to retrieve the data to show in the layout
          philmodjunk

               Use Layout text to label the data columns.

               Size the text calculation field to be very large, many rows of text in height. You can set the field to slide up/resize enclosing part if you plan to print or save as PDF from this layout.

               Specify the ¶ as your record separator and Char ( 9 ) //tab character as your field separator.

               Enter layout mode, select this field and use the Appearance tab of the Inspector to set appropriate Tab stops for the tab characters that will now separate your columns of data.