Telerik Forums
Reporting Forum
1 answer
233 views

I am creating a report

I have dragged a Table to the design page  of report

I am binding a list (of Product)

If I have a Property called ProductName, then how can I bind this to the table?

Steve
Telerik team
 answered on 13 Jan 2010
1 answer
112 views
Hello,

The company I work for is currently evaluating buying telerik reporting for use within our program. I have noticed that when we display the report within the telerik reporting viewer that only a small portion of the report is displayed and the user will have to use the scroll bar to view the remainder of the report.

I have set the reportviewers height and width to be 100% of the size of the container. I also have set the DIV in which I placed the reportviewer to be a width and a height of 100%. This did not fix the issue. I then removed the reportviewer from the DIV and kept the height and width the same again the issue persisted.

Thank you
Steve
Telerik team
 answered on 13 Jan 2010
2 answers
147 views
Hello!!!
Increasing a table/crosstable vertically inside the same page...

Hi!!!
I have a problem, I have a set of cross tables, one upon the other in design time, that show a set of items which grow horizontally, meaning that the columns are increased. Up to here there is not problem. But when one of them, or the whole set, has many items so the number of columns exceed the page width, these are printed, in pdf, as if they were in other page instead of been printed just below the previous row, spliting it but in the same page keeping the order.

I have tried putting the datail section in columns but although I have the labels repeted in each column the tables are printed in other page, leaving a blank section just below the first row of colums instead of putting the other set of columns.

I Would like to know if there is a property or attibute or even a component in which I can envelop my table in order to achive the requiriment of showing a table that grows horizontally and continues showing its data just below itself when the page width is reached?

Thanks in advance
Atte. I frustrated programmer

carlos chavez
Top achievements
Rank 1
 answered on 12 Jan 2010
0 answers
171 views
I used the Telerik reports q3-2009. the report is generated code behind from database. i

need to connect the Chart from database in code behind. the data is not populated let me

know how can i solved this problem . please give me the sample code and reference.

I used the code below like this


 /// <summary>
    /// Summary description for Report1.
    /// </summary>
    public partial class OrderChartReport : Telerik.Reporting.Report
    {
        public OrderChartReport()
        {
            /// <summary>
            /// Required for telerik Reporting designer support
            /// </summary>
            InitializeComponent();

            OrderManager orderManager = new OrderManager();
            List<OrderData> AgeementNotAgreeedList = new List<OrderData>();
            AgeementNotAgreeedList = orderManager.GetRentalAgreementReportsNotAgreed();
            this.DataSource = AgeementNotAgreeedList;


           
            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }

        private void chart1_NeedDataSource(object sender, EventArgs e)
        {
        

            OrderManager orderManager = new OrderManager();
            List<OrderData> AgeementNotAgreeedList = new List<OrderData>();
            AgeementNotAgreeedList = orderManager.GetRentalAgreementReportsNotAgreed();
            this.DataSource = AgeementNotAgreeedList;            

            Telerik.Reporting.Processing.Chart procChart =

(Telerik.Reporting.Processing.Chart)sender;
          
            chart1.Series[0].DataYColumn = "id";
            chart1.PlotArea.XAxis.DataLabelsColumn = "id";
            // assign appearance related properties
            chart1.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 300;
            chart1.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Color =

System.Drawing.Color.BlueViolet;
            chart1.PlotArea.Appearance.Dimensions.Margins.Bottom =
            Telerik.Reporting.Charting.Styles.Unit.Percentage(30);
            
        }

        private void chart2_NeedDataSource(object sender, EventArgs e)
        {
        

            OrderManager orderManager = new OrderManager();
            List<OrderData> AgeementNotAgreeedList = new List<OrderData>();
            AgeementNotAgreeedList = orderManager.GetRentalAgreementReportsNotAgreed();
         
            this.DataSource = AgeementNotAgreeedList;  
            chart2.Series[0].DataYColumn = "QuantityInStock";
            chart2.PlotArea.XAxis.DataLabelsColumn = "Name";
            chart2.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Font
             = new System.Drawing.Font("Ariel", 8);
            
        }

        private void chart3_NeedDataSource(object sender, EventArgs e)
        {
            OrderManager orderManager = new OrderManager();
            List<OrderData> AgeementNotAgreeedList = new List<OrderData>();
            AgeementNotAgreeedList = orderManager.GetRentalAgreementReportsNotAgreed();
            this.DataSource = AgeementNotAgreeedList;
            chart1.Series[0].DataYColumn = "id";
            chart1.PlotArea.XAxis.DataLabelsColumn = "RenterName";
            // assign appearance related properties
            chart1.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 300;
            chart1.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Color =

System.Drawing.Color.BlueViolet;
            chart1.PlotArea.Appearance.Dimensions.Margins.Bottom =
            Telerik.Reporting.Charting.Styles.Unit.Percentage(30);
        }

    }    
}


Let me know how can i solved this problem. i used the telerik q3-2009.

Thanks
G.  Manikandan
mani kandan
Top achievements
Rank 1
 asked on 12 Jan 2010
1 answer
57 views
1. i am using Telerik reports Q3 2009. herewith the dataset generated the data in dataset. i give the report form give the datasoruce, and data member. Eventhough the data is not generated but the the report is geneated empty. let me know how can i solved this problem

2. I need connect the reports in database code behind. but the data is not generated. I do it evertythins as u given website like
http://www.telerik.com/help/reporting/asp-net-report-viewer.html


Let me know how can i integrate the data from database, Please send me the sample and implement procedure.

i used the database connectivity in
public report1()
{
 // Do Database Connectivity
}

and i do need datasoruce

Eventhough it is not working

Let me know know how can i solved this problem.

Thanks



Schlurk
Top achievements
Rank 2
 answered on 11 Jan 2010
1 answer
325 views
 We have desgin few reports in our project that would in Chinese . Chinese info is working fine , when report is viewed in report viewer, but when export to PDf or print  , Chiense is not working . There comes Square symbol instaed of chinese chracter . pls suggest as soultion ASAP to us , Because i have to deploy these report urgently.

Thanks,
Naginder Singh  
Steve
Telerik team
 answered on 11 Jan 2010
1 answer
154 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
136 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
249 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
Iron
Veteran
 answered on 11 Jan 2010
7 answers
489 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
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?