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

Add Items without Wizard

1 Answer 134 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Matt Thrower
Top achievements
Rank 1
Matt Thrower asked on 18 Nov 2008, 02:31 PM
Hi,

I'm not using Report Generation Wizards because I need to hook my reports up to a custom data source. Telerik kindly pointed me at the appropriate documentation to help with this but now I've hit another snag: I don't know how to add data-bound items and text items to the report using the designer interface. Is there any way to do this, and if not, can someone point me at some documentation to show me how it's done programatically?

EDIT: I've managed to add a box programatically, but with bound field boxes I'm getting the message "An error has occured while processing TextBox 'textBox1': The expression contains object 'adID' that is not defined in current context". What's going on here? There's a dataset being called and bound in the codebehind of the report object.

Cheers,
Matt

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 18 Nov 2008, 03:52 PM
Hello Matt,

These are two opposite approaches for binding the report and as such they impose limitations. In your case when binding the report programmatically, the designer of the report is not aware of the provided datasource in code and therefore the data fields are not available in the Data Explorer. You would have to manually enter the data field names in your report items' values/expressions or use the DataSource report property to set it to your datasource only for the design time sake. When you're done with the report layout, you can remove it and your programmatic databinding would kick in.

Regards,
Steve
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Matt Thrower
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or