Telerik Forums
Reporting Forum
10 answers
401 views
Does Telerik Reporting support a matrix control just like the one in the Microsoft reportviewer?
Igor
Top achievements
Rank 1
 answered on 21 Oct 2010
2 answers
82 views
Hi,

I am using Chinese version of Visual Studio 2010. After installed Telerik_Reporting_Q2_2010_v4_1_10_921, We could not find "Telerik Report Q2 2010 in Installed Template. It's OK on English version of Visual Studio 2010.

Please advise.

Many thanks,
Bill


wg
Top achievements
Rank 1
 answered on 21 Oct 2010
1 answer
199 views
Hi;
(Use 2009.Q1)
i am writing my own web browser. And from that browser, i try to export a report to pdf. But when you click on the Export functionality, it opens the export operation on Internet Explorer (a different web browser of course...). And because the instance ids of my own web browser and internet explorer's are different, exporting fails. Now that, i need to export the report on the same page by writing code behind a button control or by changing the functionality of WebReportViewer to export the report to the _self window.

First of all, i am using a code snippet that would display the report in the same page with my web browser (by implementing a button control's event). The code snippet is:

http://www.telerik.com/help/reporting/faq-display-pdf-browser.html
Sub ExportToPDF(ByVal reportToExport As Telerik.Reporting.Report)    
    Dim reportProcessor As New ReportProcessor() 
    Dim result As RenderingResult = reportProcessor.RenderReport("PDF", reportToExport, Nothing
  
    Dim fileName As String = 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.BinaryWrite(result.DocumentBytes)    
    Response.End()    
End Sub

Although i have imported Telerik.Reporting and Telerik.Reporting.Processing libraries, the compiler tells me that "ReportProcessor" is ambigious in the namespace Telerik.Reporting.Processing. Why do i get this error?

As a second question, i tried to open the exported sheet in the same window by using WebReportViewer with _self directive. But i failed again because of the different instance ids of web browsers...

Any ideas about exporting the report to _self window would be appreciated!.
Thanx
Steve
Telerik team
 answered on 20 Oct 2010
3 answers
143 views

Hi,

When I install my program on my clients computer, everything works except for the reports (telerik reporting).  When I try to view a report I get "unable to find the requested .net framework"  This project is vb.net, sql server, .net framework 3.5.  It of course runs fine on my development machine.

TIA,
Barry
Steve
Telerik team
 answered on 20 Oct 2010
1 answer
221 views
I have a report using a stylesheet, if I were to use conditional formatting to change the font colour of negative numbers to red does the resulting style rule also change the rest of the textboxs properties (font, size, etc) away from the values set by the stylesheet?
or
Is it possible to assign a stylesheet style conditionally?

Thanks
Patrick
Peter
Telerik team
 answered on 20 Oct 2010
3 answers
172 views
Hi, I'm quite new with telerik charts,
I'm wondering if there's a way to create a 3d pie chart, rotate it on the x axis for example by 30°, with labels not rotated and with the size of the slices (3D pie) displayed (like in the picture). I used in the past other C++ components in order to manage charts, but yours one seems completely different than everything else I've seen.
Yavor
Telerik team
 answered on 20 Oct 2010
1 answer
149 views
hi... to all
i've created ssrs reports local following is my code..
 public void source(string tbname,string Rptname)
        {
            ReportViewer1.Visible = true;
            string myQuery = "select * from " + tbname;
            SqlConnection myConnection = new SqlConnection(ConnectionString);
            SqlCommand myCommand = new SqlCommand(myQuery, myConnection);
            myCommand.Connection.Open();
            SqlDataAdapter da = new SqlDataAdapter(myCommand);
            DataSet dt = new DataSet();
            da.Fill(dt);


            //ReportParameter[] p = new ReportParameter[1];
            //p[1] = new ReportParameter("@p_dno", "5");
            //this.ReportViewer1.LocalReport.SetParameters(p);
            //DataSet dt = new DataSet();
            //dt = p;
            ReportViewer1.LocalReport.ReportPath = Rptname + ".rdlc" ;
            ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Local;
           ReportDataSource datasource = new ReportDataSource("employeeDataSet_" + tbname , dt.Tables[0]);
            ReportViewer1.LocalReport.DataSources.Clear();
            ReportViewer1.LocalReport.DataSources.Add(datasource);
       
        }
now it works good..
as i expected...

but i want to pass the datasource connection string from here is there any 
way to pass the datasource programatically....
Massimiliano Bassili
Top achievements
Rank 1
 answered on 20 Oct 2010
1 answer
119 views
I can't use querystring to pass parameters to reportviewer but i need to pass them from ascx, where webviewer is declared.

How to do that?

rvBidReport.Report.ReportParameters collection is readonly for web report viewer

thank you for any hint
Jaroslav
Top achievements
Rank 1
 answered on 19 Oct 2010
1 answer
128 views
Hello

I have a group, and on the footer I want to make a Sum(). But when I right click > Expression > Aggregates, nothing shows. I know that before, I had the ability to sum, and it worked. I don't know what I changed, but it doesn't work anymore.

I call Sum() of my field anyway, but on the second page of the report, I have an error : "The expression contains undefined function call Sum()".

I can't find references in the documentation for when aggregates are disabled...

Why doesn't Sum() works ?

Thanks
Thomas B
Top achievements
Rank 1
 answered on 19 Oct 2010
3 answers
196 views
Hello,

Before to buy Telerik Reporting i try to make a report programmatically with the trial version.

My first problem was in Silverlight you must quote this ligne :
WebRequest.RegisterPrefix("http://", WebRequestCreator.ClientHttp);
Else you have a message like below :
"Report is unavailable or session has expired."

My second problem unsolve is when I build my report programmatically I have got a NullReference Exception in the report Viewver.
I dont understand this Exception, but it throw only when I build the details.

Anyone has got an idea what is wrong in my source code?



My report :

public class MedialogSimpleTableReport : Telerik.Reporting.Report
{
    #region Fields
    Telerik.Reporting.DetailSection _detail;
    ObjectDataSource _objectDataSource;
    Table _table_arrivee;
    PageFooterSection _pageFooterSection;
    TextBox _tb_footer_page;
    PageHeaderSection _pageHeaderSection;
    TextBox _tbTitle_page;
    ReportFooterSection _reportFooterSection;
    Panel _panel_ReportBottom;
    TextBox _tb_end_report2;
    TextBox _tb_Pages;
    TextBox _tb_End_report;
    System.ComponentModel.ComponentResourceManager _resources;
 
    PictureBox _pictureBox_Logo;
    TextBox _tb_Report_header;
 
    TableGroup _tableGroupDetail;
    TableGroup _tableGroupRows;
 
    List<TableGroup> _tableGroupsTitle;
    List<TextBox> _titlesTextBoxes;
    List<TextBox> _datasTextBoxes;
    List<TextBox> _totalTextBoxes;
    #endregion
 
    public double WidthPage
    {
        get { return 27D; }
    }
 
    public MedialogSimpleTableReport()
    {
        Initialize();
    }
 
    public void Initialize()
    {
        this._detail = new Telerik.Reporting.DetailSection();
        this._table_arrivee = new Telerik.Reporting.Table();
        this._objectDataSource = new Telerik.Reporting.ObjectDataSource();
        this._pageFooterSection = new Telerik.Reporting.PageFooterSection();
        this._tb_footer_page = new Telerik.Reporting.TextBox();
        this._pictureBox_Logo = new Telerik.Reporting.PictureBox();
        this._pageHeaderSection = new Telerik.Reporting.PageHeaderSection();
        this._tbTitle_page = new Telerik.Reporting.TextBox();
        this._tb_Pages = new Telerik.Reporting.TextBox();
        this._tb_Report_header = new Telerik.Reporting.TextBox();
        this._reportFooterSection = new Telerik.Reporting.ReportFooterSection();
        this._panel_ReportBottom = new Telerik.Reporting.Panel();
        this._tb_end_report2 = new Telerik.Reporting.TextBox();
        this._tb_End_report = new Telerik.Reporting.TextBox();
        this._resources = new System.ComponentModel.ComponentResourceManager(typeof(MedialogSimpleTableReport));
        BuildPageHeader();
        BuildDataSource();
        BuildReportFooter();
        BuildPageFooter();
        BuildDetail();
        BuildPage();
    }
 
    void BuildDataSource()
    {
        this._objectDataSource.DataSource = typeof(Telerik.Reporting.Examples.CSharp.Test.ArriveesPrevues);
        this._objectDataSource.Name = "_objectDataSource";
    }
 
    void BuildPageHeader()
    {
        // _pageHeaderSection
        //
        this._pageHeaderSection.Height = new Telerik.Reporting.Drawing.Unit(1.6998001337051392D, Telerik.Reporting.Drawing.UnitType.Cm);
        this._pageHeaderSection.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
        this._tbTitle_page,
        this._tb_Pages,
        this._tb_Report_header});
        this._pageHeaderSection.Name = "_pageHeaderSection";
        //
        // _tbTitle_page
        //
        this._tbTitle_page.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0.0037841796875D, Telerik.Reporting.Drawing.UnitType.Pixel), new Telerik.Reporting.Drawing.Unit(0.00377655029296875D, Telerik.Reporting.Drawing.UnitType.Pixel));
        this._tbTitle_page.Name = "_tbTitle_page";
        this._tbTitle_page.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(897.55096435546875D, Telerik.Reporting.Drawing.UnitType.Pixel), new Telerik.Reporting.Drawing.Unit(22.677162170410156D, Telerik.Reporting.Drawing.UnitType.Pixel));
        this._tbTitle_page.Style.Font.Bold = true;
        this._tbTitle_page.Value = "BLABLABLABLABLABLABLABLABLABLABLABLABLABLABLABLABLABLABLABLA";
 
        //
        // _tb_Pages
        //
        this._tb_Pages.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(897.56231689453125D, Telerik.Reporting.Drawing.UnitType.Pixel), new Telerik.Reporting.Drawing.Unit(0.003780364990234375D, Telerik.Reporting.Drawing.UnitType.Pixel));
        this._tb_Pages.Name = "_tb_Pages";
        this._tb_Pages.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(122.9063720703125D, Telerik.Reporting.Drawing.UnitType.Pixel), new Telerik.Reporting.Drawing.Unit(22.677162170410156D, Telerik.Reporting.Drawing.UnitType.Pixel));
        this._tb_Pages.Style.Font.Bold = true;
        this._tb_Pages.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Right;
        this._tb_Pages.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
        this._tb_Pages.Value = "=\'Page \' + PageNumber + \' / \' + PageCount";
 
    }
 
    void ReportHeader()
    {
        this._tb_Report_header.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Pixel), new Telerik.Reporting.Drawing.Unit(22.688491821289062D, Telerik.Reporting.Drawing.UnitType.Pixel));
        this._tb_Report_header.Name = "_tb_Report_header";
        this._tb_Report_header.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1020.4647827148438D, Telerik.Reporting.Drawing.UnitType.Pixel), new Telerik.Reporting.Drawing.Unit(22.665840148925781D, Telerik.Reporting.Drawing.UnitType.Pixel));
        this._tb_Report_header.Style.Font.Bold = true;
        this._tb_Report_header.Value = "=\'.......................................... \' + NOW()";
    }
 
    void BuildDetail()
    {
        _tableGroupDetail = new Telerik.Reporting.TableGroup();
        _tableGroupRows = new Telerik.Reporting.TableGroup();
 
        var headerDatas = new ArriveeDatas();
        _tableGroupsTitle = new List<TableGroup>();
        _titlesTextBoxes = new List<TextBox>();
        _datasTextBoxes = new List<TextBox>();
        _totalTextBoxes = new List<TextBox>();
 
        this._detail.Height = new Telerik.Reporting.Drawing.Unit(1.4000000953674316D, Telerik.Reporting.Drawing.UnitType.Cm);
        this._detail.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
        this._table_arrivee});
        this._detail.Name = "_detail";
        this._detail.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
 
 
        for (int i = 0; i < headerDatas.Headers.Count; i++)
            _tableGroupsTitle.Add(new TableGroup());
 
        for (int i = 0; i < headerDatas.Headers.Count; i++)
            _titlesTextBoxes.Add(new TextBox());
        for (int i = 0; i < headerDatas.Headers.Count; i++)
            _datasTextBoxes.Add(new TextBox());
        for (int i = 0; i < headerDatas.Headers.Count; i++)
            _totalTextBoxes.Add(new TextBox());
 
 
        for (int i = 0; i < _titlesTextBoxes.Count; i++)
        {
            _titlesTextBoxes[i].Dock = System.Windows.Forms.DockStyle.Fill;
            _titlesTextBoxes[i].CanShrink = true;
            //_titlesTextBoxes[i].Name = headerDatas.Headers[i].TitleValue;
            _titlesTextBoxes[i].Style.TextAlign = headerDatas.Headers[i].HorizontalAlignTitle;
            _titlesTextBoxes[i].Style.VerticalAlign = headerDatas.Headers[i].VerticalAlignTitle;
            _titlesTextBoxes[i].Value = headerDatas.Headers[i].TitleValue;
            _titlesTextBoxes[i].Style.BackgroundColor = headerDatas.Headers[i].BackgroundTitleColor;
        }
        for (int i = 0; i < _datasTextBoxes.Count; i++)
        {
            _datasTextBoxes[i].Dock = System.Windows.Forms.DockStyle.Fill;
            _datasTextBoxes[i].CanShrink = true;
            _datasTextBoxes[i].Name = "_tb_" + headerDatas.Headers[i].TitleValue + "_data";
            _datasTextBoxes[i].Style.TextAlign = headerDatas.Headers[i].HorizontalAlignData;
            _datasTextBoxes[i].Style.VerticalAlign = headerDatas.Headers[i].VerticalAlignData;
            //_datasTextBoxes[i].Value = headerDatas.Headers[i].DataValue;
        }
 
        for (int i = 0; i < _totalTextBoxes.Count; i++)
        {
            _totalTextBoxes[i].Dock = System.Windows.Forms.DockStyle.Fill;
            _totalTextBoxes[i].CanShrink = true;
            _totalTextBoxes[i].Name = "_tb_" + headerDatas.Headers[i].TitleValue + "_total";
            _totalTextBoxes[i].Style.TextAlign = headerDatas.Headers[i].HorizontalAlignTotal;
            _totalTextBoxes[i].Style.VerticalAlign = headerDatas.Headers[i].VerticalAlignTotal;
            //_totalTextBoxes[i].Value = headerDatas.Headers[i].TotalValue;
        }
 
        this._table_arrivee.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(new Telerik.Reporting.Drawing.Unit(1.8500000238418579D, Telerik.Reporting.Drawing.UnitType.Cm)));
        this._table_arrivee.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(new Telerik.Reporting.Drawing.Unit(2.2000000476837158D, Telerik.Reporting.Drawing.UnitType.Cm)));
        this._table_arrivee.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(new Telerik.Reporting.Drawing.Unit(4.7000007629394531D, Telerik.Reporting.Drawing.UnitType.Cm)));
        this._table_arrivee.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(new Telerik.Reporting.Drawing.Unit(2.2000000476837158D, Telerik.Reporting.Drawing.UnitType.Cm)));
        this._table_arrivee.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(new Telerik.Reporting.Drawing.Unit(1D, Telerik.Reporting.Drawing.UnitType.Cm)));
        this._table_arrivee.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(new Telerik.Reporting.Drawing.Unit(2.2000000476837158D, Telerik.Reporting.Drawing.UnitType.Cm)));
        this._table_arrivee.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(new Telerik.Reporting.Drawing.Unit(3.7999999523162842D, Telerik.Reporting.Drawing.UnitType.Cm)));
        this._table_arrivee.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(new Telerik.Reporting.Drawing.Unit(2.2000000476837158D, Telerik.Reporting.Drawing.UnitType.Cm)));
        this._table_arrivee.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(new Telerik.Reporting.Drawing.Unit(2.2000000476837158D, Telerik.Reporting.Drawing.UnitType.Cm)));
        this._table_arrivee.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(new Telerik.Reporting.Drawing.Unit(2D, Telerik.Reporting.Drawing.UnitType.Cm)));
        this._table_arrivee.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(new Telerik.Reporting.Drawing.Unit(2.2000000476837158D, Telerik.Reporting.Drawing.UnitType.Cm)));
        this._table_arrivee.Body.Rows.Add(new Telerik.Reporting.TableBodyRow(new Telerik.Reporting.Drawing.Unit(0.699999988079071D, Telerik.Reporting.Drawing.UnitType.Cm)));
        this._table_arrivee.Body.Rows.Add(new Telerik.Reporting.TableBodyRow(new Telerik.Reporting.Drawing.Unit(1D, Telerik.Reporting.Drawing.UnitType.Cm)));
 
 
        for (int i = 0; i < _titlesTextBoxes.Count; i++)
            this._table_arrivee.Items.AddRange(new Telerik.Reporting.ReportItemBase[] { _titlesTextBoxes[i] });
        for (int i = 0; i < _datasTextBoxes.Count; i++)
            this._table_arrivee.Items.AddRange(new Telerik.Reporting.ReportItemBase[] { _datasTextBoxes[i] });
        for (int i = 0; i < _totalTextBoxes.Count; i++)
            this._table_arrivee.Items.AddRange(new Telerik.Reporting.ReportItemBase[] { _totalTextBoxes[i] });
        for (int i = 0; i < _titlesTextBoxes.Count; i++)
        {
            this._table_arrivee.Body.SetCellContent(0, i, _titlesTextBoxes[i]);
            _tableGroupsTitle[i].ReportItem = _titlesTextBoxes[i];
        }
 
        for (int i = 0; i < _datasTextBoxes.Count; i++)
        {
            this._table_arrivee.Body.SetCellContent(1, i, _datasTextBoxes[i]);
        }
        for (int i = 0; i < _tableGroupsTitle.Count; i++)
            this._table_arrivee.ColumnGroups.Add(_tableGroupsTitle[i]);
 
 
 
        this._table_arrivee.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Pixel), new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Pixel));
        this._table_arrivee.Name = "_table_arrivee";
        _tableGroupDetail.Grouping.AddRange(new Telerik.Reporting.Data.Grouping[] { new Telerik.Reporting.Data.Grouping("") });
        _tableGroupDetail.Name = "_tableGroupDetail";
        _tableGroupRows.Name = "_tableGroupRows";
 
        this._table_arrivee.RowGroups.Add(_tableGroupDetail);
        this._table_arrivee.RowGroups.Add(_tableGroupRows);
        this._table_arrivee.RowHeadersPrintOnEveryPage = true;
        this._table_arrivee.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(26.55000114440918D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(2.4000000953674316D, Telerik.Reporting.Drawing.UnitType.Cm));
        this._table_arrivee.Style.Font.Size = new Telerik.Reporting.Drawing.Unit(8D, Telerik.Reporting.Drawing.UnitType.Point);
        this._table_arrivee.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center;
        this._table_arrivee.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
    }
 
    void BuildReportFooter()
    {
        _reportFooterSection.Height = new Telerik.Reporting.Drawing.Unit(2.2000000476837158D, Telerik.Reporting.Drawing.UnitType.Cm);
        _reportFooterSection.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
        _panel_ReportBottom});
        _reportFooterSection.Name = "_reportFooterSection";
        _reportFooterSection.PageBreak = Telerik.Reporting.PageBreak.None;
        //
        // _panel_ReportBottom
        //
        _panel_ReportBottom.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
        _tb_end_report2,
        _tb_End_report});
        _panel_ReportBottom.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0.89999997615814209D, Telerik.Reporting.Drawing.UnitType.Cm));
        _panel_ReportBottom.Name = "_panel_ReportBottom";
        _panel_ReportBottom.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(WidthPage, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(1.3000001907348633D, Telerik.Reporting.Drawing.UnitType.Cm));
        //
        // _tb_end_report2
        //
        _tb_end_report2.Dock = System.Windows.Forms.DockStyle.Bottom;
        _tb_end_report2.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0.70000046491622925D, Telerik.Reporting.Drawing.UnitType.Cm));
        _tb_end_report2.Name = "_tb_end_report2";
        _tb_end_report2.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(WidthPage, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(22.677154541015625D, Telerik.Reporting.Drawing.UnitType.Pixel));
        _tb_end_report2.Style.Color = System.Drawing.SystemColors.GrayText;
        _tb_end_report2.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Left;
        _tb_end_report2.Value = "...................................";
        //
        // _tb_End_report
        //
        _tb_End_report.Dock = System.Windows.Forms.DockStyle.Top;
        _tb_End_report.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Cm));
        _tb_End_report.Name = "_tb_End_report";
        _tb_End_report.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(WidthPage, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(26.456680297851562D, Telerik.Reporting.Drawing.UnitType.Pixel));
        _tb_End_report.Style.Color = System.Drawing.SystemColors.GrayText;
        _tb_End_report.Style.Padding.Top = new Telerik.Reporting.Drawing.Unit(0.20000000298023224D, Telerik.Reporting.Drawing.UnitType.Cm);
        _tb_End_report.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Left;
        _tb_End_report.Value = "BLABLABLA..................";
    }
 
    void BuildPageFooter()
    {
        this._pageFooterSection.Height = new Telerik.Reporting.Drawing.Unit(1D, Telerik.Reporting.Drawing.UnitType.Cm);
        this._pageFooterSection.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
        this._tb_footer_page,
        this._pictureBox_Logo});
        this._pageFooterSection.Name = "_pageFooterSection";
 
        this._tb_footer_page.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
        this._tb_footer_page.CanShrink = false;
        this._tb_footer_page.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0.0037841796875D, Telerik.Reporting.Drawing.UnitType.Pixel), new Telerik.Reporting.Drawing.Unit(0.39999988675117493D, Telerik.Reporting.Drawing.UnitType.Cm));
        this._tb_footer_page.Name = "_tb_footer_page";
        this._tb_footer_page.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1020.4647216796875D, Telerik.Reporting.Drawing.UnitType.Pixel), new Telerik.Reporting.Drawing.Unit(22.677154541015625D, Telerik.Reporting.Drawing.UnitType.Pixel));
        this._tb_footer_page.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center;
        this._tb_footer_page.Value = "Medialog - Informatique  Hôtelière";
    }
 
    void BuildPage()
    {
        this.Culture = new System.Globalization.CultureInfo("");
        this.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
        this._pageHeaderSection,
        this._detail,
        this._pageFooterSection,
        this._reportFooterSection});
        this.PageNumberingStyle = Telerik.Reporting.PageNumberingStyle.Continue;
        this.PageSettings.Landscape = true;
        this.PageSettings.Margins.Bottom = new Telerik.Reporting.Drawing.Unit(1D, Telerik.Reporting.Drawing.UnitType.Cm);
        this.PageSettings.Margins.Left = new Telerik.Reporting.Drawing.Unit(1D, Telerik.Reporting.Drawing.UnitType.Cm);
        this.PageSettings.Margins.Right = new Telerik.Reporting.Drawing.Unit(1D, Telerik.Reporting.Drawing.UnitType.Cm);
        this.PageSettings.Margins.Top = new Telerik.Reporting.Drawing.Unit(1D, Telerik.Reporting.Drawing.UnitType.Cm);
        this.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.A4;
        this.Style.BackgroundColor = System.Drawing.Color.White;
        this.UnitOfMeasure = Telerik.Reporting.Drawing.UnitType.Cm;
        this.Width = new Telerik.Reporting.Drawing.Unit(WidthPage, Telerik.Reporting.Drawing.UnitType.Cm);
    }
 
}


My DataSource :

public class ArriveesPrevues : System.Collections.Generic.List<ArriveePrevu>
{
    public ArriveesPrevues()
    {
        for (int i = 0; i < 50; i++)
        {
            Add(new ArriveePrevu()
            {
                Date = new StayDateRange
                {
                    DateEnd = DateTime.Now.AddDays(2),
                    DateStart = DateTime.Now
                },
                Nbr = 1,
                Noms = "Coucou",
                Pays = "France",
                Produit = "None",
                Memo = "Un loooooooooooooooog mémo",
                RoomNumber = "105",
                Type = "DOUBLE",
                Prix = 10,
                Solde = 10,
                Arrhes = 0
            });
             
        }
         
    }
}
 
 
public class ArriveePrevu
{
    public string RoomNumber { get; set; }
    public string Type { get; set; }
    public string Noms { get; set; }
    public StayDateRange Date { get; set; }
    public int Nbr { get; set; }
    public string Produit { get; set; }
    public string Memo { get; set; }
    public int Prix { get; set; }
    public int Arrhes { get; set; }
    public int Solde { get; set; }
    public string Pays { get; set; }
}
 
public class StayDateRange : INotifyPropertyChanged
{
    private DateTime _dateStart;
    private DateTime _dateEnd;
 
    public event PropertyChangedEventHandler PropertyChanged;
 
    /// <summary>
    /// Obtient ou définit la date de début de la période
    /// </summary>
    public DateTime DateStart
    {
        get
        {
            return _dateStart;
        }
        set
        {
            _dateStart = value;
            NotifyPropertyChanged("DateStart");
            NotifyPropertyChanged("Duration");
        }
    }
    /// <summary>
    /// Obtient ou définit la date de fin de la période
    /// </summary>
    public DateTime DateEnd
    {
        get
        {
            return _dateEnd;
        }
        set
        {
            _dateEnd = value;
            NotifyPropertyChanged("DateEnd");
            NotifyPropertyChanged("Duration");
        }
    }
    /// <summary>
    /// Renvoit la duré de la période en nb de jours
    /// </summary>
    public int Duration
    {
        get
        {
            return DateEnd.Subtract(DateStart).Days;
        }
    }
 
    /// <summary>
    /// Renvoit la durée de la période en terme hôtelier
    /// CaD : du 24 au 24, renvoit 1
    /// </summary>
    public int DurationForHotelStay
    {
        get
        {
            return DateEnd.AddDays(1).Subtract(DateStart).Days;
        }
    }
 
    protected void NotifyPropertyChanged(string propertyName)
    {
        if (PropertyChanged != null)
            PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
    }
 
}


Thanks by Advance.

Jérôme Giacomini.

P.S : Excuse me for my bad english.
medialog
Top achievements
Rank 2
 answered on 19 Oct 2010
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?