Columns Missing

Using the following codes, I try to add a datasource. It gets added, but non of the columns/fields are listed. If I click on the table to edit it, don't change anything, just step through the wizard.....when I click finish, the fields/columns show up. Is there a way I can automatically populate the columns in the datasource?


Dim conn As New FastReport.Data.MsSqlDataConnection
conn.Name = "Current Sales Ticket"
conn.ConnectionString = varConnect

Report1.Dictionary.Connections.Add(conn)

Dim table As New TableDataSource()
table.TableName = "Payment Details"
table.Name = "Payment Fields"
table.SelectCommand = "SELECT paymentAmount,paymentData1,paymentData2,paymentTitle FROM [dbo].[tbl_invoicePayments] INNER JOIN tbl_invoicePaymentTypes ON paymentType= tbl_invoicePaymentTypes.paymentID"
conn.Tables.Add(table)

Comments

  • edited 3:56PM
    Hello,

    Try to call the RefreshTable() method of TableDataSource.
  • edited 3:56PM
    AlexTZ wrote: »
    Hello,

    Try to call the RefreshTable() method of TableDataSource.


    Thanks, this did the trick.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.