SQL Query from VB .NET to FR .NET

how to transform the code below c # to vb

using FastReport.Data;
report1.Load (...);
/ / do it after loading the report, before running it
/ / find the table alias by ITS
TableDataSource report1.GetDataSource table = ("MyTable") the TableDataSource;
table.SelectCommand = "new SQL text";
report1.Show ();

Thank you

Comments

  • Magezi SagesseMagezi Sagesse DRCONGO
    edited 7:10PM
    kaiboll wrote: »
    how to transform the code below c # to vb

    using FastReport.Data;
    report1.Load (...);
    / / do it after loading the report, before running it
    / / find the table alias by ITS
    TableDataSource report1.GetDataSource table = ("MyTable") the TableDataSource;
    table.SelectCommand = "new SQL text";
    report1.Show ();

    Thank you

    first you declare a tabledatasource variable type by doing: dim table as new tabledatasource
    Second : table = ctype(report1.GetDataSource("table"),tabledatasource)
    and table.selectCommand is there for type the Sql command that you want to run.

    My problem is how can I add parameters to that sqlCommand like we do with oledbcommand?

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.