Hi,
I have a chart and table wizard both are depended on report parameter.
Table data is refreshing when i am selecting any other value from dropdown
but chart is not refreshing based on dropdown.
I have alredy check your product line sales demo but its not clear that
where I can pass the parameter for chart refreshing.
Private Sub chart1_NeedDataSource(ByVal sender As Object, ByVal e As
System.EventArgs) Handles chart1.NeedDataSource
Dim conn = New SqlConnection("Data Source=XXXXXX;Initial
Catalog=XXX;Persist Security Info=True;User ID=XXXXXXX;Password=XXXXXXXX")
Dim adp As SqlDataAdapter
adp = New SqlDataAdapter()
Dim scomm As New SqlCommand
Dim dst As New DataSet
scomm.CommandText = "SELECT presentpost, sum(CurrentSalary) as TotalSalary
from associate where activestatus='A' group by presentpost"
scomm.Connection = conn
adp.SelectCommand = scomm
adp.Fill(dst)
Dim chart As Telerik.Reporting.Processing.Chart = TryCast(sender,
Telerik.Reporting.Processing.Chart)
chart.DataSource = dst
chart1.PlotArea.XAxis.DataLabelsColumn = "TotalSalary"
End Sub
Please help me this is really most important part for my project.
we can decide to purchase this license.
Thanks,
Ankit
VS 2008
We were using Telerik 3.0.9.403 version.
And our project was running cool.
But now we have formatted the system and new version of telerik reporting have been installed.
Now we have version 3.2.9.1211.
But we are getting error in loading the report controls
Our web. config have items like bellow
<add assembly="Telerik.ReportViewer.WebForms, Version=3.0.9.430, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE"/>
<add assembly="Telerik.Reporting.Processing, Version=3.0.9.430, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE"/>
<add assembly="Telerik.Reporting, Version=3.0.9.430, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE"/>
<add assembly="Telerik.Reporting.Interfaces, Version=3.0.9.430, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE"/>
I my resx file I have
<assembly alias="Telerik.Reporting" name="Telerik.Reporting, Version=3.0.9.430, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" />
How can we get ride of the problem?
Hi:
I have an ASP.NET application that uses tabs and grids to display data to the end user, and they want the ability to click a button and have all the data on the web page generated to a PDF file. There are some images, some data in grids, and some text in text boxes.
Is it possible to build a report step-by-step from the data on the page, and then pass that report to the Export method to generate the PDF? So for example something like:
Report report1 = new Report();
report1.addImage( image):
table table1 = new table();
for (int i=0; i<radGrid.Rows.Count; i++)
{
For each row of data, add a row to the table
}
report1.add(table);
And so on until all the data is added to a report, and then use
ExportToPdf(report1)
Is this possible and/or is there another way to send all the data from the ASPX page to a PDF using the component?
Here is some code I used to try this, and I did get a PDF file, but it was empty:
void ExportToPDF(Telerik.Reporting.Report reportToExport)
{
ReportProcessor reportProcessor = new ReportProcessor();
RenderingResult result = reportProcessor.RenderReport("PDF", reportToExport, null);
string fileName = result.DocumentName + ".pdf";
Response.Clear();
Response.ContentType = result.MimeType;
Response.Cache.SetCacheability(HttpCacheability.Private);
Response.Expires = -1;
Response.Buffer = true;
Response.AddHeader("Content-Disposition",
string.Format("{0};FileName=\"{1}\"",
"attachment",
fileName));
//Response.Write("test");
Response.BinaryWrite(result.DocumentBytes);
Response.End();
}
protected void Button1_Click(object sender, EventArgs e)
{
try
{
Telerik.Reporting.Report report1 = new Telerik.Reporting.Report();
DataTable dt = new DataTable();
DataColumn column1 = new DataColumn();
column1.ColumnName = "1";
column1.ReadOnly = true;
dt.Columns.Add(column1);
DataColumn column2 = new DataColumn();
column2.ColumnName = "2";
column2.ReadOnly = true;
dt.Columns.Add(column2);
for (int i = 0; i < 25; i++)
{
DataRow theRow = dt.NewRow();
theRow["1"] = i.ToString();
int z = i + 5;
theRow["2"] = z.ToString();
dt.Rows.Add(theRow);
}
report1.DataSource = dt;
ExportToPDF(report1);
}
catch (Exception ex)
{
txtMessage.Text += "Error: " + ex.ToString();
}
}
Dim reportBook As ReportBook = TryCast(Me.ReportViewer.Report, ReportBook)
Dim Frontsheet_Report As New JobPlan_Frontsheet()
Frontsheet_Report.ReportParameters("JobPlan_ID").Value = Session("Jobplan_ID")
reportBook.Reports.Add(Frontsheet_Report)
Dim Notes_Report As New JobPlan_Notes()
Notes_Report.ReportParameters("JobPlan_ID").Value = Session("Jobplan_ID")
reportBook.Reports.Add(Notes_Report)
I have gone through the help files and searched the site for Reportbook, and none of the examples quite fits.
Andy