This is a migrated thread and some comments may be shown as answers.

with out wizard

1 Answer 13 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
karyjon
Top achievements
Rank 1
karyjon asked on 02 Feb 2010, 12:30 PM
hi
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?

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 03 Feb 2010, 09:08 AM
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,
Peter
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.
Tags
General Discussions
Asked by
karyjon
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or