Telerik Forums
Reporting Forum
1 answer
133 views
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
Steve
Telerik team
 answered on 11 Jan 2010
3 answers
129 views

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?

 

 

 

 

Steve
Telerik team
 answered on 11 Jan 2010
3 answers
227 views

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();
    }
}

sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
 answered on 11 Jan 2010
7 answers
455 views
Hi

I'm trying to get multiple reports to display in a ReportBook control.

Each report uses the same parameter (JobPlan_ID) but I cant see there the ReportBook merges the params and where I can set them.

I am trying the approach shown below, but I keep getting Object reference not set errors on the line assigning the paramter.

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

saba homa
Top achievements
Rank 1
 answered on 11 Jan 2010
2 answers
147 views
Is there a way I can create a new instance of a rport using a variable containing the report name, such as:

rpt = new Telerik.Reporting.Report strRptName

We want to allow users to select reports for a report book and I would like to pass this data to the viewer as a list of report names.  Possible?
Bob Bruce
Top achievements
Rank 1
 answered on 11 Jan 2010
1 answer
276 views
Hello,

Someone will have an example of a report you can print multiple sheets whether the header change?, Example, I print a range of bills but only to the first sheet prints the header of the first invoice and details of all invoices
distinguishes and prints all in one sequence.

Regards,
Victor Alameda

Steve
Telerik team
 answered on 11 Jan 2010
2 answers
87 views
Hi,

When trying exporting from a web report inside a WebBrowser control a new window pops up and nothing more happens.

Does anybody know how i can solve this?

Thanks
Niklas
Steve
Telerik team
 answered on 11 Jan 2010
2 answers
291 views
Hi there.

We needed to upgrade Telerik Reporting on one of our projects due a bug (couldn't list all listboxes in a multiple dropdown).

So.. We did this:

- downloaded the new version. (to our Dev computers)
- uninstalled the old one Q2 something.
- installed the new one Q3.
- Used the Telerik Reporting - Upgrade Wizard function inside VS 2008 on the project.
- Worked fine on our machine.
- Published the project.
- Updated the code on the live server.
- Did get problems with the viewer. Couldn't load any data/design etc (see attachment)
- Even tried to install Q3 on the that live server.



Any suggestions of what it could be?


Thanks for any kind of help

Regards / Magnus
Magnus
Top achievements
Rank 1
 answered on 11 Jan 2010
1 answer
185 views
Hi,
I have places a square shape in a table and I want it to have a background color.
But when setting the color it sets it on the hole column and not just the shape (see attached print screen).
The background color is set in the shapes Style.BackgroundColor property.
How do I fix this?

/Mattias
Steve
Telerik team
 answered on 11 Jan 2010
1 answer
79 views
Hi,

I realised that, when I export in csv format, invisible report columns are exported as well.

The report in the page seems ok, also when i export to excel or pdf, it is ok... but when i export to csv, the exported report is different than the report on the page. (Invisible columns are exported as well.)

I am using Telerik Q3.
Steve
Telerik team
 answered on 11 Jan 2010
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?