with out wizard

2 posts, 0 answers
  1. karyjon
    karyjon avatar
    6 posts
    Member since:
    Oct 2012

    Posted 02 Feb 2010 Link to this post

    i don't want to use wizard to attach a dataset to my report page.

    i want to write some query in code and return a dataset and send this dataset to page. but in report form i don't see my returned field
    in dataExplorer to arrange page and border an ... .because i dp'nt use wizard.

    how can i do? is it possible?
  2. Peter
    Peter avatar
    1629 posts

    Posted 03 Feb 2010 Link to this post

    Hi karyjon,

    In order to enable the full design-time support including the Data Explorer, Expression builder and all editors you need to have the Report.DataSource initialized. The tricky part is that in order to load the component's designer   Visual Studio do parse the code inside the InitializeComponent method and create the objects it finds there in a specific manner. The parser (CodeDomSerializer) understands limited syntax and in general you should avoid writing code there - usually the designer generates the code inside for you. Please note that only the InitializeComponent() method matters. The Report's constructor is never invoked while loading the report into the designer (this is not a limitation of the Telerik Report's designer but for all .NET components).
    We highly recommend that you review the Connecting Data to a Report help section and specifically Adding a Data Source Programmatically help topic.
    Generally when you want to achieve a certain task programmatically, it is a good idea to create the desired layout through the report designer and after that inspect the code generated by the designer (i.e. InitializeComponent). This would decrease the learning curve significantly as Telerik Reporting has a feasible and easy to understand API.

    Best wishes,
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
Back to Top