Telerik Forums
Reporting Forum
1 answer
299 views
Hi Guys, we working on some reports, going over them again, reading what would be better.

We started creating reports using the wizard, so we had designtime support. Great, that works. But now I want to add some more flexibilitty to the code. So I added a NeedDataSource event to the report including the next code:

 this.generalReportDataSetTableAdapter1.Connection.ConnectionString = ConfigurationManager.ConnectionStrings["Report.ConnectionString"].ConnectionString; 
            this.generalReportDataSetTableAdapter1.FillByClientIdAndBetweenStartAndEndDate(this.generalReportDataSet.GeneralReportDataSetTable, 
                Convert.ToInt32(this.ReportParameters["pClientId"].Value), Convert.ToDateTime(this.ReportParameters["pStartDate"].Value), Convert.ToDateTime(this.ReportParameters["pEndDate"].Value)); 
 
            Processing.Report report = (Processing.Report)sender; 
            Report.DataSource = this.generalReportDataSet; 

of course in de constructor I set: this.DataSource = null;

Nou when I set breakpoints, I can see my DS is filled. No problem but all my textboxen throw: the expression contains object 'Name' that is not defined in the current context. Where name is different for every textbox.

The structure of the DS is still the same.

It seems I cannot get the fields in the DB anymore

How is that possible.




Stephan
Top achievements
Rank 1
 answered on 01 Apr 2009
1 answer
249 views
I created an elaborate report using a SQL view as a data source. I updated the view in SQL and tried unsuccessfully

1. To get the new fields include in the report by redoing the datasource in VS. (When I updated the data source and tried to run the report I get red boxes saying that I have null values. However, running the datasource and viewing the returned records shows that those fields are not null.)

2. Create a new report with the new data set. Then replacing the dataset in the first report with this new data set and tableAdapter. When I try this I get red boxes with "object not set ot an instance of an object." Additionally, when I try to edit my expressions I get no Fields listings at all. Is seems from this that the old report has not recognized the data returned in the new data source.

I suspect that there is very simple answer. But how do I up date the data the report is looking at when I update the view in SQL server?

Thanks,

Matthew
Steve
Telerik team
 answered on 01 Apr 2009
1 answer
91 views
hi  i am pramod
i using telerik reporting very heavily i have one issue regarding text formating
i embedded html table in one string and and take on textbox on report and give string value to textbox
my string TodisplayList

            ToDisplayList = @"<table cellpadding='0' cellspacing='0' border='1' width='570'>";
            ToDisplayList += @"<tr  bgColor='#cbccd1'><td align='center'> <b>" + "Services" + "</b></td align='center'>" + "<td><b>" +                 "Duration" + "</b></td> " + "<td><b>" + "Appointments" + "</b></td>" + "<td><b>" + "Average" + "</b></td></tr>";
            while (_enumerator1.MoveNext() && _enumerator2.MoveNext())
            {
                if (Convert.ToInt32(_enumerator1.Value) > 0 && Convert.ToInt32(_enumerator2.Value) > 0)
                {
                    ToDisplayList += @"<tr><td>" + _enumerator1.Key + ":</td>" + "<td align='center'>" + _enumerator1.Value + " </td>" +                     "<td align='center'>" + _enumerator2.Value + " </td>" + "<td align='center'>" + float.Parse(_enumerator1.Value.ToString()) /                 float.Parse(_enumerator2.Value.ToString()) + " </td> </tr> ";
                }
                else
                {
                    ToDisplayList += @"<tr><td>" + _enumerator1.Key + ":</td>" + "<td align='center'>" + _enumerator1.Value + " </td>" + "<td align='center'>" + _enumerator2.Value + " </td>" + "<td align='center'>" + (Convert.ToInt32(_enumerator1.Value) / Convert.ToInt32(_enumerator2.Value)) + " </td> </tr> ";
                }

                ServiceCount++;
                DurationCount += Convert.ToInt32(_enumerator1.Value);
            }
            ToDisplayList += @"<tr height='10'><td colspan='4'></td></tr> ";
            ToDisplayList += @"</table>";


--------------------------------------
now i bind that string to
this.textBox12.Value = ToDisplayList;

its display fine but when i taken print it also print the embeded html script 
please give me any solution on this..?




Steve
Telerik team
 answered on 01 Apr 2009
0 answers
120 views
Hi support,
I am new to telerik reporting.
Could you tell me, How to use Dynamic data for charts. i.e using a data source,data set and query.
Could you also tell me, info regarding how to use all tools in telerik



Thanks and Regards
Praveen
Praveen kumar
Top achievements
Rank 1
 asked on 01 Apr 2009
1 answer
170 views
I am testing out Telerik Reporting and will probably ditch Crystal reports soon because of the troubles i've been having with it.

Problem though is, i try to align the textboxes together in an attempt to output the address of a client but when i preview it... there is an inconsitent space between the address and the city... i can't figure out why yet.

http://s734.photobucket.com/albums/ww342/crazycoders/?action=view&current=ReportDesigner.gif
http://s734.photobucket.com/albums/ww342/crazycoders/?action=view&current=ReportPreview.gif

Thanks


Milen | Product Manager @DX
Telerik team
 answered on 01 Apr 2009
1 answer
208 views
hI,

is there a way to separate the location of all the report templates from the application path?another thing, is it possible that if i modify an existing report or even if i make another report i dont need to recompile the whole application, i'll just difine the report template name on my DB and it will be available on my application or something like that?  
Thanks


Dennis
Steve
Telerik team
 answered on 31 Mar 2009
3 answers
310 views
Dear ....
please can anyone help  me ,
I have report with four parameters (StartDate , EndDate , Count of records , Country )

when I pressed in these parameters , I got The chart
this is my code 

 

 

private

 

void chart1_NeedDataSource(object sender, EventArgs e)

 

{

Telerik.Reporting.Processing.

Chart chart = sender as Telerik.Reporting.Processing.Chart;

 

 

SqlConnection conn = new SqlConnection("Server=(local);Database=UMG;Integrated Security=SSPI;");

 

 

SqlCommand command = new SqlCommand("GetDiagnosisReport", conn);

 

command.CommandType =

CommandType.StoredProcedure;

 

command.Parameters.AddWithValue(

"@Country", this.ReportParameters["Country"].Value);

 

command.Parameters.AddWithValue(

"@FromDate", this.ReportParameters["FromDate"].Value);

 

command.Parameters.AddWithValue(

"@ToDate", this.ReportParameters["ToDate"].Value);

 

command.Parameters.AddWithValue(

"@Count", this.ReportParameters["Count"].Value);

 

 

SqlDataAdapter adapter = new SqlDataAdapter(command);

 

 

DataSet ds = new DataSet();

 

 

try

 

 

 

 

 

{

adapter.Fill(ds);

}

 

catch (Exception ex)

 

{

System.Diagnostics.

Debug.WriteLine(ex.Message);

 

}

 

DataView view = ds.Tables[0].DefaultView;

 

chart.DataSource = view;

 

}

 

but when I got chart without bound any value (there is no ,or empty series)


then I put parameters and press for preview I got this error 

An error has occured while processing Chart 'chart1':
An Unexpected error has occurred. Please review the InnerException for more information how to resolve the problem.


its urgent

thanks in advance

 

Steve
Telerik team
 answered on 30 Mar 2009
1 answer
545 views
I have a sub report where I have a total setup to print in the footer of the sub report.
It is setup to be visible, print on lost page.

Whe I do a preview of the subreport it is there just fine.

When I run the master report for that sub report it does not show up.

An ideas?

thx

Jim
Steve
Telerik team
 answered on 30 Mar 2009
7 answers
687 views
Hi

I have a bunch of reports that are added to a Reportbook as follows:

 ReportBook reportBook = new ReportBook();
 reportBook.Reports.Add(report1);
reportBook.Reports.Add(report2);
reportBook.Reports.Add(report3);
...

I then assign reportbook to my ReportViewer1 control as follows:

 ReportViewer1.Report = reportBook;
        ReportViewer1.Report.DocumentName = "some name";
        ReportViewer1.DataBind();

The question is how to display the report book programmatically in the ReportViewer control?

A sample project or code snippet would be helpfull.

Thanks

Peter
Chavdar
Telerik team
 answered on 30 Mar 2009
3 answers
180 views
Hi
     I have a group in my report, and i set a pagebreak after the groupfooter. There is a problem that i get a blank page after all the pages generated, because of the pagebreak i set in the groupfooter.How to fix it?
    Thanks.
Hrisi
Telerik team
 answered on 30 Mar 2009
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?