4 Answers, 1 is accepted
The only reason for your report not to work is missing DataSource property setting - please set the DataSource property of the report trough VS2005 Designer and let us know of the outcome. You can also check your connection string and make sure it is correct and returns proper data. Try running it in your app directly without using preview and see if that works.
Kind regards,
Steve
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.

Hi Steve,
Below is my code file for my report. On the report design, I just put one textbox with the expression '=Fields.Name'. When I preview I get the error msg. When you mentioned about the data source property, I am assuming that the code below is what you mean by data source property. This is all that I did in trying to come out with the Binding to Data Programatically. Please advice.
public partial class NTierUsersReport : Report
{
public NTierUsersReport()
{
/// <summary>
/// Required for telerik Reporting designer support
/// </summary>
InitializeComponent();
// Create connection, command adapter
SqlConnection sqlConnection1 = new SqlConnection();
SqlCommand sqlSelectCommand1 = new SqlCommand();
SqlDataAdapter sqlDataAdapter1 = new SqlDataAdapter();
// define a connection string
sqlConnection1.ConnectionString =
"Data Source=DEV1;Initial Catalog=TestApplicationDB;Integrated Security=True;";
// define the command object properties
sqlSelectCommand1.CommandText = "SELECT Name FROM Users";
sqlSelectCommand1.Connection = sqlConnection1;
sqlDataAdapter1.SelectCommand = sqlSelectCommand1;
this.DataSource = sqlDataAdapter1;
}
}
Regards,
Eugene

Hitting the preview button doesn't post back so I'm wondering why I get this error the first time.
Also, is there a way to capture the event when the preview button is being pressed? I need to post back to the server with the new dates. I am using an Oracle Package as the datasource.
Currently the parameter area is in iframe and that is why postback is not observed, since it is in the context of a "separate" page. The viewer handles the information through the http handler that is defined in the web/app config file. Please verify that you have default values for the parameters set and that your filter expression is valid.
If you are following Telerik Trainer video, please use the code view to directly open the project in Visual Studio and pinpoint the differences.
Regards,
Steve
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.