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

Reporting Editor goes in strange way.

2 Answers 26 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
shadow
Top achievements
Rank 2
shadow asked on 12 May 2010, 04:29 PM
Hi,

Telerik, I am in greate trouble, I have faced this problem so many times. 
During last 5 days, it is coming so often, and every time I have no other option but to create the report again.

I have attatched the detailed image of error, please check this and suggest how we can solve this problem.

We are using "Reporting Q1 2010" version.

Also please tell us how we can bind the sub report, here I am posting my code but this is not doing any thing,
Infact during this process I have been facing the reported error this time. I have created this report almost 6 times
and every time during the sub report binding I came up with this error.

<Format Code Block>

        private void AsapBillingTransactions_NeedDataSource(object sender, EventArgs e)
        {
            DataSet ds_SubReport = new DataSet();

            command = new SqlCommand();
            command.CommandType = CommandType.StoredProcedure;
            command.Connection = connection;
            command.CommandText = "sp_ASAPBilling1";
            command.Parameters.Add(new SqlParameter("@OrgID", OrgID));
            command.Parameters.Add(new SqlParameter("@FromDate", FromDate));
            command.Parameters.Add(new SqlParameter("@ToDate", ToDate));

            adapter = new SqlDataAdapter(command);
            adapter.Fill(ds_SubReport);

            this.subReport1.ReportSource.DataSource = ds_SubReport;

        }
  

<Format Code Block>


Certainly found more errors.
One of reports in my project is working well, I am able to preview the report in my reporting project, but creating dll of reports project, when I use it with my web application, it is giving error, I have also attatched the image with error named"ConnectionStringError".


2 Answers, 1 is accepted

Sort by
0
shadow
Top achievements
Rank 2
answered on 12 May 2010, 04:51 PM
This is image for second error
0
Accepted
Steve
Telerik team
answered on 13 May 2010, 01:42 PM
Hi Farid,

We believe the error message is pretty clear, but we'll paraphrase: "In case you use a connection string from the application configuration file (of the class library), make sure the name is correct and the same connection string settings are present in the configuration file of your application (your web site) as well."

In other words if you have saved a connectionString in your class library and it is e.g.:

<connectionStrings>
        <add name="Telerik.Reporting.Examples.CSharp.Properties.Settings.TelerikConnectionString"
            connectionString="Server=(local);Database=AdventureWorks;Integrated Security=SSPI;"
            providerName="System.Data.SqlClient" />
    </connectionStrings>

you should copy it to the web.config (in case of a website) or app.config (in case of a windows forms) as well, in order to be able to connect to your database at runtime.
Also when you're programmatically binding a report or subreport in a report event, you should set the datasource to the processing counterpart and not the definition report item. More info about this is available in the following articles:

Greetings,
Steve
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
shadow
Top achievements
Rank 2
Answers by
shadow
Top achievements
Rank 2
Steve
Telerik team
Share this question
or