Telerik Forums
Reporting Forum
3 answers
162 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
137 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
111 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
121 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
188 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
3 answers
176 views
Hi,

Keeping in mind with the scalability we have decided to use SessionState mode to SQLServer.Unfortunately, telerik reports fail to display any data. The odd thing is it was working and it works when SessionState mode is "InProc".

As everyone knows, I have modified SessionState in web.config. Please advise me.

Many thanks.

MG

 
Peter
Telerik team
 answered on 19 Oct 2010
3 answers
119 views
Hi,
I'm new to Telerik Reporting. I've a report running alright. Now I'm trying to add a report parameter to it. I've setup a parameter but my report doesn't filter the record I can see my parameter on the report. but report data isn't affected at all. Is there any walkthrough for setting up basic parameter functionality?

e.g I have a employee table ... and I've set up a multivalued parameter for the First Name. it shows a dropdown with that data. but should it also filter my data? or do I need to add a filter further? because when I try to add a filter my parameter dropdown doesn't get any data.

Can someone plz guide me here.
 
thanks
Steve
Telerik team
 answered on 19 Oct 2010
0 answers
47 views
I am trying to use the Telerik Silverlight Reportviewer in a Silverlight Business Application.  I am using VS2010 and Silverlight 4.  When the viewer runs rather than the report, I get a message in the report area that says "No Report".  In trying to resolve this I built a basic Silverlight app and used exactly the same procedures and the report renders as it should.  Is there something different I should be doing to get the reportviewer to render a report when using a Silverlight Business Application?  Any help would be appreciated.
Thank you  
carl
Top achievements
Rank 1
 asked on 19 Oct 2010
1 answer
158 views
I am building a report generator based on metadata from our database (there will be to many varied reports to generate them with the designer).  The reports are dynamically generated and passed to the report viewer.  In the web forms report viewer, they come up blank.  I have an external windows console utility that reads the same metadata definitions (using the same class as the web form version) and then exports them to .pdf files.  The pdf files generate fine, but the web form viewer is blank.   I am using a real simple template which uses no data source and contains one text box in the details section with the message "hello world". 

Any suggestions on how to diagnose this further?

Thanks
Richard
Top achievements
Rank 1
 answered on 19 Oct 2010
4 answers
492 views
Hello,

I'm new to Telerik reporting and I was wondering if it's possible to change the series item label vertical positioning with a pie chart? Or even being able to move the labels Positioin.X and Y values would work.
I tried setting intelligentLabelsEnabled = true but with a lot of series items the labels are too hard to follow.

I tried somthing like,

ChartSeriesItem

 

item = new ChartSeriesItem();

 

item.YValue = 10;

 

item.Label.TextBlock.Text =

"Ben 10";

 

item.Label.Appearance.Position.Auto =

false;

 

item.Label.Appearance.Position.AlignedPosition = Telerik.Reporting.Charting.Styles.

AlignedPositions.None;

 

item.Label.Appearance.Position.X = 10;

item.Label.Appearance.Position.Y = 10;

 

chartDrill.Series[0].Items.Add(item);

Any ideas?
Thanks in advance,
~Boots

pradeep tamanar
Top achievements
Rank 1
 answered on 19 Oct 2010
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?