dynamic datasource in design time

Hi,
i have a DataTable made in Run-time.
i want to know how can i design a report file for that? and how to show it in runtime in report viewer?
thanks

Comments

  • edited May 2013
    ahmadi wrote: »
    Hi,
    i have a DataTable made in Run-time.
    i want to know how can i design a report file for that? and how to show it in runtime in report viewer?
    thanks

    when you create table via runtime - register that table to Fast reports (how to register datasource (the same aplies to tables) is shown in all demos of FR.

    then run designer and your table will be available in datasource. i'm doing this all the time.

    here you go full code:
    Report report = new Report();
            System.Data.DataTable prekes = new DataTable();
            prekes.TableName = "Prekes";
            report.RegisterData(prekes,"Prekes");
            report.GetDataSource("Prekes").Enabled = true;
    
            report.Design();        
            report.Dispose();
    

    of course you have to add records to that table to see something >

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.