Telerik Forums
Reporting Forum
1 answer
82 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
102 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
149 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
185 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
282 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
512 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
640 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
139 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
4 answers
392 views
Hi I have an asp .net application, on my page is a reportviewer, I also have created a report (rptSummary)

below is the Page_load event of my page

 

 

 
    Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load  
        If Me.IsPostBack Then 
 
 
            If Me.RadDatePickerStartDate.SelectedDate.HasValue = True And Me.RadDatePickerEndDate.SelectedDate.HasValue = True Then 
 
                Dim newrpt As New rptSummary(CDate(Me.RadDatePickerStartDate.SelectedDate.Value), CDate(Me.RadDatePickerEndDate.SelectedDate.Value))  
                Me.ReportViewer1.Report = newrpt  
 

                Response.Write(

CType(CType(Me.ReportViewer1.Report, rptSummary).DataSource, svcDailyStats.clsDailyStatistics).intTotalCalls)

 

 

            End If 
        End If 
 
 
    End Sub 


 And here we see some code from my report

 

Imports System.ComponentModel  
Imports System.Drawing  
Imports System.Windows.Forms  
Imports Telerik.Reporting  
Imports Telerik.Reporting.Drawing  
 
Partial Public Class rptSummary  
    Inherits Telerik.Reporting.Report  
 
    Private objDailyStats As svcDailyStats.DailyStats  
    Private DailyStats As svcDailyStats.clsDailyStatistics  
 
    Public Sub New()  
        InitializeComponent()  
        objDailyStats = New svcDailyStats.DailyStats  
        DailyStats = objDailyStats.GetDailyStatsEmpty()  
        Me.DataSource = DailyStats  
    End Sub 
 
    Public Sub New(ByVal startDate As DateByVal enddate As Date)  
 
 
        InitializeComponent()  
 
        objDailyStats = New svcDailyStats.DailyStats  
        DailyStats = objDailyStats.GetDailyStats(startDate, enddate)  
        Me.DataSource = DailyStats  
 
 
    End Sub 
End Class 

Now as an example lets assume I submit my page with the values of RadDatePickerStartDate = '01/03/2009' and RadDatePickerEndDate = '02/03/2009'

The report runs, the datasource is set with the newly created business object using these 2 dates as expected.

Now lets suppose I change those 2 dates and submit the page again, for some reason the report doesn't change. You'll see the response.write in the above code, intTotalCalls is a property of my business object that I am setting as a datasource for my report. This value will change and display on my page as expected for the response.write but it will not change in my visible report and always remains the same as the first time the report was run as do all other fields in the report.

 

DGraham
Top achievements
Rank 1
 answered on 26 Mar 2009
3 answers
97 views
Hi..
          Sir I have created a hirarical tre view using a sqldatasource., like the following one...

Main
--> Group1
------>Child 1 g1
------>Child 2 g1
-->Group2
------>Child 1 g2
------>Child 2 g2

Now doubt is... i need to add a new node for Child 1 g2 by entering the text by clicking the node., then i expect the
following treeview..

Main
--> Group1
------>Child 1 g1
------>Child 2 g1
-->Group2
------>Child 1 g2
----------> Child 1 g2 1
------>Child 2 g2
.. i am waiting for ur reply...
By
Suriya

Peter
Telerik team
 answered on 26 Mar 2009
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?