Telerik Forums
Reporting Forum
1 answer
67 views
Hi,
I have a web project which has a Masterpage containing content place holders.

And I have a telerik reportviewer item in one of my pages(using masterpage).
In google chrome everything is fine with rendering with the report.
Bun in IE8 after selecting the proper report parameters i press the preview button on the report. The "Generating the report" indicator appears. But nothing is rendered on the screen. What i see is just the reportviewers toolbar and parameters section. The reports content looks to be not rendered with IE8.

When i get rid of master page the rendering in IE8 works fine again.

Is there a way to get reportviewer properly render in IE8 with master paged web site?

Thanks.

Chavdar
Telerik team
 answered on 14 Sep 2012
6 answers
232 views
I've been struggling to get the Silverlight Report Viewer running properly in Visual Studio 2010. I created a new project and followed the video tutorial found here, and I keep getting this error:

There is no available report type with assembly qualified name 'ReportLibrary.BasicReport, ReportLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Could not load file or assembly 'ReportLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

I'm not sure what I'm doing wrong, I tried creating another project and followed the video again thinking I forgot something but after a few tries I still get the error. The video is from Q3 2009 so maybe there's some small difference between the latest Q2 2010 version and the version in the video that is throwing me off.

I should mention that I originally created the project in .NET 4.0, in this help document It recommends.NET 3.5 so I tried creating and running a .NET 3.5 Silverlight App in VS2010 but still no luck. The project I would like to add the Report Viewer to is running on .NET 4.0, can I use the Report Viewer in .NET 4.0 or do I need to use .NET 3.5?

Please let me know if there is anything else you need from me, any help is appreciated.

Thank you.
Jose
Top achievements
Rank 1
 answered on 14 Sep 2012
2 answers
242 views
I don't use SDK. Only Telerik. I correctly understood, what shall add reference library System.Windows.Controls from SDK's pack?

{System.Windows.Markup.XamlParseException: The type 'GridSplitter' was not found because 'clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls' is an unknown namespace. [Line: 6 Position: 30] ---> System.InvalidOperationException: A ResourceDictionary '/Telerik.Windows.Themes.Transparent;component/Themes/Telerik.ReportViewer.Silverlight.xaml' cannot be found. Please make sure that references to the needed theme assemblies have been added to the project. ---> System.Exception: Error HRESULT E_FAIL has been returned from a call to a COM component.
   w MS.Internal.XcpImports.CheckHResult(UInt32 hr)
   w MS.Internal.XcpImports.SetValue(IManagedPeerBase obj, DependencyProperty property, String s)
   w MS.Internal.XcpImports.SetValue(IManagedPeerBase doh, DependencyProperty property, Object obj)
   w System.Windows.DependencyObject.SetObjectValueToCore(DependencyProperty dp, Object value)
   w System.Windows.DependencyObject.SetEffectiveValue(DependencyProperty property, EffectiveValueEntry& newEntry, Object newValue)
   w System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
   w System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isBindingInStyleSetter)
   w System.Windows.ResourceDictionary.set_Source(Uri value)
   w Telerik.Windows.Controls.Theme.GetCachedResourceDictionary(Uri uri)
   --- Koniec Å›ladu stosu wyjÄ…tków wewnÄ™trznych ---
   w Telerik.Windows.Controls.Theme.GetCachedResourceDictionary(Uri uri)
   w Telerik.Windows.Controls.Theme.GetResourceFromTheme(Theme theme, String controlAssembly, Type defaultStyleKeyType, Theme controlTheme)
   w Telerik.Windows.Controls.Theme.GetResourceValue(Type defaultStyleKey, Theme theme, Theme controlTheme)
   w Telerik.Windows.Controls.Theme.GetThemeStyle(Theme oldTheme, Type defaultStyleKey)
   w Telerik.Windows.Controls.Theme.Apply(FrameworkElement element, Theme oldTheme)
   w Telerik.Windows.Controls.StyleManager.OnThemeChanged(DependencyObject target, DependencyPropertyChangedEventArgs changedEventArgs)
   w Telerik.Windows.PropertyMetadata.PropertyChangeHook.OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   w System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
   w System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
   w System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isBindingInStyleSetter)
   w System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   w Telerik.Windows.Controls.StyleManager.SetTheme(DependencyObject element, Theme value)
   --- Koniec Å›ladu stosu wyjÄ…tków wewnÄ™trznych ---
   w System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
   w ReState.View.ReportsView.InitializeComponent()
   w ReState.View.ReportsView..ctor()}

Telerik Silverlight v. 2012.2.903.1050
Telerik.ReportViewer.Silverlight v. 6.1.12.611

ADM-IT Denis Pujdak
Top achievements
Rank 1
 answered on 14 Sep 2012
3 answers
663 views
I'm working on Telerik Report Designer (to be specific, not Visual studio)
I'm facing problem in passing multivalue parameter to proc
In proc, I have the parameter as: @parTest varchar(1000)

select data into #Temp1 from Products where data in (@parTest)

If I select a single value, the report runs good
But, if multiple values are selected, then I see the error in preview as :
'Procedure xyz has too many arguments specified'

how to pass MULTIVALUE parameter to db from telerik REPORT DESIGNER?
and how to use that parameter in proc ?

In some thread I saw:
"How do you pass multi value paramas to sql datasource?  I am trying to pass multi-value params but receive error  as below.  Would you please advise on how to do this or do you have an example/sample for multi-value params report somewhere that I can download? 
Failed to convert parameter value from a Object[] to a String.
------------- InnerException -------------
Object must implement IConvertible."

Reply:
"The DataSource Components don't work out of the box with a MultiValue Report Parameter since the current implementation is based on ADO.NET and does not allow you to pass a collection of values (set, array). Thus, the SqlDataSourceParameter accepts only single values corresponding to the SqlDataSourceParameter.DbType property. Although this is a known limitation of ADO.NET and not a problem of our product, we're currently working on possible solution for it and it would be part of the upcoming Q2 SP1."

fyi, I'm using Q2 - 2012

I also see:
"Currently the new DataSource Components don't work out of the box with a MultiValue Report Parameter. In order to use a multivalue Parameter you will have to create User Function that bulds a String from multivalue Parameter (Object[]) and use that string to set a SqlDataSource SelectCommand in the NeedDataSource event. Check out the attached sample project that illustrates how this scenario can be accomplished."

how can add the function in telerik report DESIGNER?
Peter
Telerik team
 answered on 13 Sep 2012
1 answer
78 views
I want to bind a subset of my data source to chart object on my Telerik report and I cannot figure out how to accomplish this.

public class MyObject
{
    public int ID { get; set; }
    public string Name { get; set;}
    public List<MySubObject> SubList { get; set; }
}
 
public class MySubObject
{
    public int ID { get; set; }
    public decimal Percentage { get; set; }
    public string SurveyGroupName { get; set;}
}

I want to bind my chart object to the SubList property in the MyObject class.



Michael Kniskern
Top achievements
Rank 1
 answered on 13 Sep 2012
1 answer
91 views
Hi I am currently trying to create a report that contains times used on each customer each specific day, currently I am stuck at ordering them by weekday so I get

----------
Monday

Tuesday

Wednesday

Thursday

Friday
'''''''''''''''''''

Basically I have a list of time entries that contains something like
String customername
int customerid
custom class Update
---
custom classs(Relevant members):
DateTime LastUpdate
so there might be more times for one customer each day like this

snippet from list
.....
name=x, timespent=1 update=10.10.10 10:10:10
name x, itmespent=2 update = 10.10.10 11:11:11
.....

apart from this I want a total number at the end of each day (hours spent that day) and a total at the end of the report, total time used on each customer and total time used that week, here's the desired result

___________________
[header]
monday
customer1  2
customer2 2
x:::::::::::::::::3
total time spent day 7
[the monday block for the rest of the days in a week]
Total
Customer1 20
customer 2 10
x:::::::::::::::::10
total time spent 40
'''''''''''''''''''''''''''''''''''''''''''''''''''''
at the current point I created a group that is sorted by each day, from here I am blank
Anders
Top achievements
Rank 1
 answered on 13 Sep 2012
1 answer
156 views
Hi
--------------------------
EDIT:
I am really sorry for the long post, tell me if you want it to a pastebin, the problem here after some debugging is that the structure seems ok after going through properties when opening it in debugging mode, the really big problem for me is that I canot get any kind of output from the report telling me what is wrong and why it's thinking there is no report. like some kind of exception catching
--------------------------
I am using the Q2 2010 SP1 4.1 and telerik radcontrols for winforms Q1 2012 SP1 and I just created a report by using some dynamic coding in the report(which is embeded in a winform), at first I copy pasted and edited a lot from some code made in designtime, however as this resulted in ugly (but working) code I created a class to do it for me however it now shows no report, just a message saying "Object reference not set to an instance of an object."

this is my weekreport.cs class containing the definition class for the report, the uglypopulate method is the one which works, the almostpopulatelikeabaws is the new code I created with the help class

using System.Collections.Generic;
using System.Data;
using BE;
 
namespace TimeRegisterClient
{
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;
    using Telerik.Reporting;
    using Telerik.Reporting.Drawing;
 
    /// <summary>
    /// Summary description for WeekReport.
    /// </summary>
    public partial class TidsRapport : Telerik.Reporting.Report
    {
        private void setEmptyRowStandard(Telerik.Reporting.TextBox RowBox)
        {
            RowBox.Style.BorderWidth.Default = new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Point);
            RowBox.Style.Font.Size = new Telerik.Reporting.Drawing.Unit(12D, Telerik.Reporting.Drawing.UnitType.Point);
            RowBox.Value = "";
        }
        private void setTotalRowStandard(Telerik.Reporting.TextBox RowBox)
        {
            RowBox.Style.BorderWidth.Default = new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Point);
            RowBox.Style.BorderWidth.Top = new Telerik.Reporting.Drawing.Unit(1D, Telerik.Reporting.Drawing.UnitType.Point);
            RowBox.Style.BorderStyle.Top = BorderType.Solid;
            RowBox.Style.Font.Size = new Telerik.Reporting.Drawing.Unit(12D, Telerik.Reporting.Drawing.UnitType.Point);
            RowBox.Style.TextAlign = HorizontalAlign.Left;
            RowBox.Style.VerticalAlign = VerticalAlign.Middle;
        }
 
        private void setCustomerRowStandard(Telerik.Reporting.TextBox RowBox)
        {
            RowBox.Style.BorderWidth.Default = new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Point);
            RowBox.Style.Font.Size = new Telerik.Reporting.Drawing.Unit(12D, Telerik.Reporting.Drawing.UnitType.Point);
            RowBox.Style.TextAlign = HorizontalAlign.Left;
            RowBox.Style.VerticalAlign = VerticalAlign.Middle;
        }
        private void setDayHeaderStandard(Telerik.Reporting.TextBox RowBox)
        {
            RowBox.Style.BorderWidth.Default = new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Point);
            RowBox.Style.BorderWidth.Bottom = new Telerik.Reporting.Drawing.Unit(1D, Telerik.Reporting.Drawing.UnitType.Point); ;
            RowBox.Style.BorderStyle.Bottom = BorderType.Solid;
            RowBox.Style.Font.Size = new Telerik.Reporting.Drawing.Unit(12D, Telerik.Reporting.Drawing.UnitType.Point);
            RowBox.Style.VerticalAlign = VerticalAlign.Middle;
        }
        private void setColumnStandard(Telerik.Reporting.TextBox RowBox,Unit height)
        {
            RowBox.Style.Font.Underline = true;
            RowBox.Style.Font.Size = new Telerik.Reporting.Drawing.Unit(14D, Telerik.Reporting.Drawing.UnitType.Point);
            RowBox.Style.BorderWidth.Default = new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Point);
            RowBox.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
            RowBox.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(2.4999997615814209D, Telerik.Reporting.Drawing.UnitType.Cm),height);
        }
        public TidsRapport(Dictionary<DayOfWeek, Dictionary<int, UpdCus>> values, UserDetail user, DateTime from, DateTime to)
            : this()
        {
            FromTime = from;
            ToTime = to;
            WriteDate();
            TxtFraBruger.Value += user.Name;
             
            populatealmostlikeabaws(values);
           //uglypopulate(values);
            
            
             
 
        }
        #region new
        private void populatealmostlikeabaws(Dictionary<DayOfWeek, Dictionary<int, UpdCus>> values)
        {
            PointU l =
                new PointU(
                    new Unit(0.299999862909317D, UnitType.Cm),
                    new Unit(4.5999999046325684D, UnitType.Cm));
            SizeU s = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(12.600000381469727D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(2.4000000953674316D, Telerik.Reporting.Drawing.UnitType.Cm));
            ReportTableGenerator tg = new ReportTableGenerator(s, l, new Telerik.Reporting.Drawing.Unit(0.6D, Telerik.Reporting.Drawing.UnitType.Cm));
 
            setColumnStandard(tg.Nextbox, tg.DefaultRowHeight);
            tg.Nextbox.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Left;
            tg.Nextbox.Value = "Dag/Kunde";
            tg.addColumn(new Telerik.Reporting.Drawing.Unit(10.09999942779541D, Telerik.Reporting.Drawing.UnitType.Cm));
 
            setColumnStandard(tg.Nextbox, tg.DefaultRowHeight);
            tg.Nextbox.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center;
            tg.Nextbox.Value = "Tider";
            tg.addColumn(new Telerik.Reporting.Drawing.Unit(2.4999997615814209D, Telerik.Reporting.Drawing.UnitType.Cm));
 
            tg.DefaultRowHeight = new Telerik.Reporting.Drawing.Unit(0.5D, Telerik.Reporting.Drawing.UnitType.Cm);
            Dictionary<int, UpdCus> total = new Dictionary<int, UpdCus>();
            DayOfWeek DayOfWork = FromTime.DayOfWeek;
 
            for (int i = 0; i < (values.Keys.Count + 1); i++)
            {
                Boolean notlast = i < values.Keys.Count;
 
                setDayHeaderStandard(tg.Nextbox);
                tg.Nextbox.Style.TextAlign = HorizontalAlign.Left;
                tg.Nextbox.Style.Padding.Left = new Unit(1.5, UnitType.Cm);
                tg.Nextbox.Style.Font.Bold = true;
 
                if (notlast)
                    tg.Nextbox.Value = DayOfWork.ToString();
                else
                    tg.Nextbox.Value = "Samlet tid";
 
                tg.addRowCell();
 
                setDayHeaderStandard(tg.Nextbox);
                tg.Nextbox.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center;
                tg.addRowCell();
 
                tg.appendRow();
 
                Decimal weekHours = 0;
                #region Customer Times loop
 
                Dictionary<int, UpdCus> temp;
                if (notlast)
                    temp = values[DayOfWork];
                else
                    temp = total;
                foreach (UpdCus c in temp.Values)
                {
                    if (notlast)
                    {
                        if (!total.ContainsKey(c.CustomerId))
                        {
                            total.Add(c.CustomerId, c);
                        }
                        else
                        {
                            total[c.CustomerId].update.TimeSpent += c.update.TimeSpent;
                        }
                    }
 
 
 
                    setCustomerRowStandard(tg.Nextbox);
                    tg.Nextbox.Style.Padding.Left = new Unit(2.5, UnitType.Cm);
                    tg.Nextbox.Value = c.CustomerName;
 
                    tg.addRowCell();
                    setCustomerRowStandard(tg.Nextbox);
                    tg.Nextbox.Value = c.update.TimeSpent.ToString();
 
                    tg.addRowCell();
                    tg.appendRow();
 
                    weekHours += c.update.TimeSpent;
                }
                #endregion
                #region Total Row add
 
 
                setTotalRowStandard(tg.Nextbox);
 
                tg.Nextbox.Style.Padding.Left = new Unit(2.5, UnitType.Cm);
                tg.Nextbox.Value = "total tid registreret " + (notlast ? DayOfWork + "" : "I alt");
                tg.addRowCell();
                setTotalRowStandard(tg.Nextbox);
                tg.Nextbox.Value = weekHours + "";
                tg.addRowCell();
                tg.appendRow();
                #endregion
 
                #region empty row add
                if (notlast)
                {
                    setEmptyRowStandard(tg.Nextbox);
                    tg.addRowCell();
                    setEmptyRowStandard(tg.Nextbox);
                    tg.addRowCell();
                    tg.appendRow();
 
 
                }
                #endregion
 
                DayOfWork++;
            }
            tg.finishTable();
            DetailSection.Items.Add(tg.table);
        }
        #endregion
 
        #region old
        private void uglypopulate(Dictionary<DayOfWeek, Dictionary<int, UpdCus>> values)
        {
 
            Telerik.Reporting.Table DataTable;
            List<Telerik.Reporting.ReportItemBase> tableItems = new List<ReportItemBase>();
            Telerik.Reporting.TextBox FirstDay = new Telerik.Reporting.TextBox();
            Telerik.Reporting.TextBox empty = new Telerik.Reporting.TextBox();
            DataTable = new Telerik.Reporting.Table();
            DetailSection.Items.Add(DataTable);
            Telerik.Reporting.TextBox TextHeader;
            Telerik.Reporting.TextBox HourHeader;
            Telerik.Reporting.TableGroup tableGroup1 = new Telerik.Reporting.TableGroup();
            Telerik.Reporting.TableGroup tableGroup2 = new Telerik.Reporting.TableGroup();
            Telerik.Reporting.TableGroup tableGroup3 = new Telerik.Reporting.TableGroup();
 
 
            TextHeader = new Telerik.Reporting.TextBox();
            HourHeader = new Telerik.Reporting.TextBox();
 
            TextHeader = new Telerik.Reporting.TextBox();
            HourHeader = new Telerik.Reporting.TextBox();
            DataTable.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(new Telerik.Reporting.Drawing.Unit(10.09999942779541D, Telerik.Reporting.Drawing.UnitType.Cm)));
            DataTable.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(new Telerik.Reporting.Drawing.Unit(2.4999997615814209D, Telerik.Reporting.Drawing.UnitType.Cm)));
            DataTable.Body.Rows.Add(new Telerik.Reporting.TableBodyRow(new Telerik.Reporting.Drawing.Unit(0.6D, Telerik.Reporting.Drawing.UnitType.Cm)));
            DataTable.Body.SetCellContent(0, 0, FirstDay);
            DataTable.Body.SetCellContent(0, 1, empty);
            tableGroup1.ReportItem = TextHeader;
            tableGroup2.ReportItem = HourHeader;
            DataTable.ColumnGroups.Add(tableGroup1);
            DataTable.ColumnGroups.Add(tableGroup2);
            tableItems.AddRange(new Telerik.Reporting.ReportItemBase[] {
            FirstDay,
            empty,
            TextHeader,
            HourHeader});
            DataTable.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0.299999862909317D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(4.5999999046325684D, Telerik.Reporting.Drawing.UnitType.Cm));
            DataTable.Name = "DataTable";
 
            DataTable.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(12.600000381469727D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(2.4000000953674316D, Telerik.Reporting.Drawing.UnitType.Cm));
 
 
            TextHeader.Name = "TextHeader";
            TextHeader.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(10.09999942779541D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0.6D, Telerik.Reporting.Drawing.UnitType.Cm));
            TextHeader.Style.BorderWidth.Default = new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Point);
 
 
            TextHeader.Style.Font.Size = new Telerik.Reporting.Drawing.Unit(14D, Telerik.Reporting.Drawing.UnitType.Point);
            TextHeader.Style.Font.Underline = true;
            TextHeader.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Left;
            TextHeader.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
            TextHeader.Value = "Dag/Kunde";
 
            HourHeader.Name = "HourHeader";
            HourHeader.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(2.4999997615814209D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0.6D, Telerik.Reporting.Drawing.UnitType.Cm));
            HourHeader.Style.BorderWidth.Default = new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Point);
 
            HourHeader.Style.Font.Size = new Telerik.Reporting.Drawing.Unit(14D, Telerik.Reporting.Drawing.UnitType.Point);
            HourHeader.Style.Font.Underline = true;
            HourHeader.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center;
            HourHeader.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
            HourHeader.Value = "Tider";
            Boolean made = true;
            int row = 1;
            Dictionary<int, UpdCus> total = new Dictionary<int, UpdCus>();
            DayOfWeek DayOfWork = FromTime.DayOfWeek;
            for (int i = 0; i < (values.Keys.Count + 1); i++)
            {
                Boolean notlast = i < values.Keys.Count;
                if (made)
                {
                    made = false;
                }
                else
                {
                    DataTable.Body.Rows.Add(new Telerik.Reporting.TableBodyRow(new Telerik.Reporting.Drawing.Unit(0.6D, Telerik.Reporting.Drawing.UnitType.Cm)));
                    FirstDay = new Telerik.Reporting.TextBox();
                    empty = new Telerik.Reporting.TextBox();
                    DataTable.Body.SetCellContent(row, 0, FirstDay);
                    DataTable.Body.SetCellContent(row, 1, empty);
                    row++;
                    tableItems.AddRange(new Telerik.Reporting.ReportItemBase[] {
            FirstDay,
            empty});
 
                }
                TableGroup t = new TableGroup();
                tableGroup3.ChildGroups.Add(t);
                FirstDay.Name = DayOfWork.ToString();
                //FirstDay.Size = new SizeU(new Unit(10.09999942779541D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0.6D, Telerik.Reporting.Drawing.UnitType.Cm));
                FirstDay.Style.BorderWidth.Default = new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Point);
                FirstDay.Style.BorderWidth.Bottom = new Telerik.Reporting.Drawing.Unit(1D, Telerik.Reporting.Drawing.UnitType.Point); ;
                FirstDay.Style.BorderStyle.Bottom = BorderType.Solid;
                FirstDay.Style.Font.Size = new Telerik.Reporting.Drawing.Unit(12D, Telerik.Reporting.Drawing.UnitType.Point);
                FirstDay.Style.TextAlign = HorizontalAlign.Left;
                FirstDay.Style.VerticalAlign = VerticalAlign.Middle;
                FirstDay.Style.Padding.Left = new Unit(1.5, UnitType.Cm);
 
                FirstDay.Style.Font.Bold = true;
                if (notlast)
                    FirstDay.Value = DayOfWork.ToString();
                else
                    FirstDay.Value = "Samlet tid";
 
 
 
 
                // empty.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(2.4999997615814209D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0.6D, Telerik.Reporting.Drawing.UnitType.Cm));
                empty.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center;
                empty.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
                empty.Style.BorderWidth.Default = new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Point);
                empty.Style.BorderWidth.Bottom = new Telerik.Reporting.Drawing.Unit(1D, Telerik.Reporting.Drawing.UnitType.Point);
                empty.Style.BorderStyle.Bottom = BorderType.Solid;
                empty.Style.Font.Size = new Telerik.Reporting.Drawing.Unit(12D, Telerik.Reporting.Drawing.UnitType.Point);
                Decimal weekHours = 0;
                #region Customer Times loop
 
                Dictionary<int, UpdCus> temp;
                if (notlast)
                    temp = values[DayOfWork];
                else
                    temp = total;
                foreach (UpdCus c in temp.Values)
                {
                    if (notlast)
                    {
                        if (!total.ContainsKey(c.CustomerId))
                        {
                            total.Add(c.CustomerId, c);
                        }
                        else
                        {
                            total[c.CustomerId].update.TimeSpent += c.update.TimeSpent;
                        }
                    }
                    DataTable.Body.Rows.Add(new Telerik.Reporting.TableBodyRow(new Telerik.Reporting.Drawing.Unit(0.5D, Telerik.Reporting.Drawing.UnitType.Cm)));
                    Telerik.Reporting.TextBox Customer = new Telerik.Reporting.TextBox();
                    Telerik.Reporting.TextBox Time = new Telerik.Reporting.TextBox();
                    empty.Name = DayOfWork.ToString() + "e";
                    DataTable.Body.SetCellContent(row, 0, Customer);
                    DataTable.Body.SetCellContent(row, 1, Time);
                    row++;
                    tableItems.AddRange(new Telerik.Reporting.ReportItemBase[] {
            Customer,
            Time});
                    TableGroup t1 = new TableGroup();
                    tableGroup3.ChildGroups.Add(t1);
                    Customer.Name = DayOfWork.ToString() + c.CustomerName;
                    // Customer.Size = new SizeU(new Unit(10.09999942779541D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0.5D, Telerik.Reporting.Drawing.UnitType.Cm));
                    Customer.Style.BorderWidth.Default = new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Point);
                    Customer.Style.Font.Size = new Telerik.Reporting.Drawing.Unit(12D, Telerik.Reporting.Drawing.UnitType.Point);
                    Customer.Style.Padding.Left = new Unit(2.5, UnitType.Cm);
                    Customer.Style.TextAlign = HorizontalAlign.Left;
                    Customer.Style.VerticalAlign = VerticalAlign.Middle;
                    Customer.Value = c.CustomerName;
                    //Console.WriteLine(c.CustomerName + ": " + c.update.TimeSpent);
                    //TableGroup n = new TableGroup();
                    // n.Grouping.Add(c.CustomerName);
                    // DataTable.RowGroups.Add(n);
                    Time.Name = DayOfWork.ToString() + "T";
                    Time.Style.BorderWidth.Default = new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Point);
                    //Time.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(2.4999997615814209D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0.5D, Telerik.Reporting.Drawing.UnitType.Cm));
                    Time.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Left;
                    Time.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
                    Time.Value = c.update.TimeSpent.ToString();
                    weekHours += c.update.TimeSpent;
                }
                #endregion
                #region Total Row add
 
                DataTable.Body.Rows.Add(new Telerik.Reporting.TableBodyRow(new Telerik.Reporting.Drawing.Unit(0.5D, Telerik.Reporting.Drawing.UnitType.Cm)));
                Telerik.Reporting.TextBox CustomerTotal = new Telerik.Reporting.TextBox();
                Telerik.Reporting.TextBox TimeTotal = new Telerik.Reporting.TextBox(); empty.Name = DayOfWork.ToString() + "e";
                DataTable.Body.SetCellContent(row, 0, CustomerTotal);
                DataTable.Body.SetCellContent(row, 1, TimeTotal);
                row++;
                tableItems.AddRange(new Telerik.Reporting.ReportItemBase[] {
            CustomerTotal,
            TimeTotal});
                TableGroup t2 = new TableGroup();
                tableGroup3.ChildGroups.Add(t2);
                CustomerTotal.Name = DayOfWork.ToString() + "TotalDescription" + notlast;
                //CustomerTotal.Size = new SizeU(new Unit(10.09999942779541D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0.5D, Telerik.Reporting.Drawing.UnitType.Cm));
                CustomerTotal.Style.BorderWidth.Default = new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Point);
                CustomerTotal.Style.BorderWidth.Top = new Telerik.Reporting.Drawing.Unit(1D, Telerik.Reporting.Drawing.UnitType.Point);
                CustomerTotal.Style.BorderStyle.Top = BorderType.Solid;
 
                CustomerTotal.Style.Font.Size = new Telerik.Reporting.Drawing.Unit(12D, Telerik.Reporting.Drawing.UnitType.Point);
                CustomerTotal.Style.Padding.Left = new Unit(2.5, UnitType.Cm);
                CustomerTotal.Style.TextAlign = HorizontalAlign.Left;
                CustomerTotal.Style.VerticalAlign = VerticalAlign.Middle;
                CustomerTotal.Value = "total tid registreret " + (notlast ? DayOfWork + "" : "I alt");
 
                TimeTotal.Name = DayOfWork.ToString() + "TotalTimeTotal" + notlast;
                //TimeTotal.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(2.4999997615814209D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0.5D, Telerik.Reporting.Drawing.UnitType.Cm));
                TimeTotal.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Left;
                TimeTotal.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
                TimeTotal.Style.BorderWidth.Default = new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Point);
                TimeTotal.Style.BorderWidth.Top = new Telerik.Reporting.Drawing.Unit(1D, Telerik.Reporting.Drawing.UnitType.Point);
                TimeTotal.Style.BorderStyle.Top = BorderType.Solid;
                TimeTotal.Value = weekHours + "";
                #endregion
 
                #region empty row add
                if (notlast)
                {
                    DataTable.Body.Rows.Add(new Telerik.Reporting.TableBodyRow(new Telerik.Reporting.Drawing.Unit(0.5D, Telerik.Reporting.Drawing.UnitType.Cm)));
                    Telerik.Reporting.TextBox CustomerEmpty = new Telerik.Reporting.TextBox();
                    Telerik.Reporting.TextBox TimeEmpty = new Telerik.Reporting.TextBox(); empty.Name = DayOfWork.ToString() + "e";
                    DataTable.Body.SetCellContent(row, 0, CustomerEmpty);
                    DataTable.Body.SetCellContent(row, 1, TimeEmpty);
                    row++;
                    tableItems.AddRange(new Telerik.Reporting.ReportItemBase[] {
            CustomerEmpty,
            TimeEmpty});
                    TableGroup t3 = new TableGroup();
                    tableGroup3.ChildGroups.Add(t3);
                    CustomerEmpty.Name = DayOfWork.ToString() + "dEmpty";
                    // CustomerEmpty.Size = new SizeU(new Unit(10.09999942779541D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0.5D, Telerik.Reporting.Drawing.UnitType.Cm));
                    CustomerEmpty.Style.BorderWidth.Default = new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Point);
 
                    CustomerEmpty.Style.Font.Size = new Telerik.Reporting.Drawing.Unit(12D, Telerik.Reporting.Drawing.UnitType.Point);
                    CustomerEmpty.Style.Padding.Left = new Unit(2.5, UnitType.Cm);
                    CustomerEmpty.Style.TextAlign = HorizontalAlign.Left;
                    CustomerEmpty.Style.VerticalAlign = VerticalAlign.Bottom;
                    CustomerEmpty.Value = "";
 
                    TimeEmpty.Name = DayOfWork.ToString() + "EmptyTime";
                    //TimeEmpty.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(2.4999997615814209D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(0.5D, Telerik.Reporting.Drawing.UnitType.Cm));
                    TimeEmpty.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Left;
                    TimeEmpty.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Bottom;
                    TimeEmpty.Style.BorderWidth.Default = new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Point);
 
                    TimeEmpty.Value = "";
                }
                #endregion
 
                DayOfWork++;
            }
            DataTable.Items.AddRange(tableItems.ToArray());
 
            DataTable.RowGroups.Add(tableGroup3);
            tableGroup3.Grouping.AddRange(new Telerik.Reporting.Data.Grouping[] {
            new Telerik.Reporting.Data.Grouping("")});
            tableGroup3.Name = "DetailGroup";
        }
 
            #endregion
 
        public TidsRapport()
        {
            InitializeComponent();
 
        }
 
        private void WriteDate()
        {
 
 
            TitleTextBox.Value += FromTime.ToShortDateString() + " til " + ToTime;
 
            TitleTextBox.Width += TitleTextBox.Width + new Unit(8.0, UnitType.Cm);
 
        }
 
        protected DateTime FromTime { get; set; }
 
        protected DateTime ToTime { get; set; }
    }
 
}

And this is the helper class

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using Telerik.Reporting;
using Telerik.Reporting.Data;
using Telerik.Reporting.Drawing;
 
namespace TimeRegisterClient
{
    class ReportTableGenerator
    {
        public int CurrentRow { get; private set; }
        public int CurrentColumn { get; private set; }
        public int MaxColumns { get; private set; }
         
        public TextBox Nextbox { get; set; }
        private List<TextBox> nextRow { get; set; }
        private Table GeneratedTable;
        public Table table
        {
            get
            {
                if (isFinished)
                    return GeneratedTable;
                return null;
            }
            private set { GeneratedTable = value; }
        }
        public Boolean isFinished { get; private set; }
        public Boolean ColumnsSet { get; set; }
        private List<ReportItemBase> tableItems { get; set; }
        public Unit DefaultRowHeight { get; set; }
        public ReportTableGenerator(Unit colHeight)
        {
            ColumnsSet = false;
            CurrentColumn = 0;
            CurrentRow = 0;
            MaxColumns = 0;
            DefaultRowHeight = new TextBox().Size.Height;
            RowGroup = new TableGroup();
            tableItems = new List<ReportItemBase>();
            GeneratedTable = new Table();
            //GeneratedTable.Body.Rows.Add(new TableBodyRow(colHeight));
            resetRow();
            resetBoxes();
            GeneratedTable.Name = "GeneratedTable";
        }
        public ReportTableGenerator( SizeU size,PointU location,Unit columnheight):this(columnheight)
       {
           setDimensions(size,location);
       }
         
        public void finishTable()
        {
            GeneratedTable.Items.AddRange(tableItems.ToArray());
            GeneratedTable.RowGroups.Add(RowGroup);
            RowGroup.Grouping.AddRange(new Grouping[]
                                           {
                                            new Grouping("")
                                           });
            RowGroup.Name = "DetailGroup";
            isFinished = true;
        }
 
        private void resetRow()
        {
            nextRow=new List<TextBox>();
        }
 
         
 
        public void resetBoxes()
        {
            Nextbox = new TextBox();
        }
        
        public void setDimensions(SizeU size, PointU location)
        {
            GeneratedTable.Location = location;
            GeneratedTable.Size = size;
        }
        
        public void addRowCell()
        {
            nextRow.Add(Nextbox);
            resetBoxes();
        }
 
         
 
        public void appendRow()
        {
            int dif = nextRow.Count - (MaxColumns+1);
            if (dif > 0)
                throw new Exception("you added " + dif + " more cells to a row than possible");
            if (!ColumnsSet)
            {
                ColumnsSet = true;
                completeColumns();
            }
            GeneratedTable.Body.Rows.Add(new TableBodyRow(DefaultRowHeight));
            TableGroup newGroup = new TableGroup();
            RowGroup.ChildGroups.Add(newGroup);
            foreach (TextBox t in nextRow)
            {
                if (t.Name.Equals(""))
                    t.Name = CurrentRow + "," + CurrentColumn;
                addCell(t);
            }
            resetRow();
        }
        
        private void addCell(TextBox t)
        {
            GeneratedTable.Body.SetCellContent(CurrentRow,CurrentColumn,t);
            iterateCell();
            tableItems.Add(t);
        }
 
        public void addColumn(Unit Width)
        {
            if(ColumnsSet)
                throw new Exception("You cannot add anymore columns at the given time");
            GeneratedTable.Body.Columns.Add(new TableBodyColumn(Width));
            TableGroup cgroup = new TableGroup();
            MaxColumns++;
             
            cgroup.ReportItem = Nextbox;
            GeneratedTable.ColumnGroups.Add(cgroup);
            addCell(Nextbox);
            resetBoxes();
        }
 
        
        private void completeColumns()
        {
            MaxColumns--;
            iterateCell();
        }
        private void iterateCell()
        {
            if (CurrentColumn >= MaxColumns)
            {
                CurrentColumn = 0;
                CurrentRow++;
            }
            else
            {
                CurrentColumn++;
            }
        }
 
        private TableGroup RowGroup { get; set; }
 
         
    }
}

I also attached a picture of how the report looks once generated, I removed the names of the customers though hope you don't mind

any help is appreciated :)

Update:
I tried adding this code block just to test if it was the generator class or the code using it that was the problem, and it's the generatorclass. This is the code I used to show one row with and I still got the problem
PointU l =
                  new PointU(
                      new Unit(0.299999862909317D, UnitType.Cm),
                      new Unit(4.5999999046325684D, UnitType.Cm));
            SizeU s = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(12.600000381469727D, Telerik.Reporting.Drawing.UnitType.Cm), new Telerik.Reporting.Drawing.Unit(2.4000000953674316D, Telerik.Reporting.Drawing.UnitType.Cm));
            ReportTableGenerator rg = new ReportTableGenerator(s, l, new Telerik.Reporting.Drawing.Unit(0.6D, Telerik.Reporting.Drawing.UnitType.Cm));
            rg.Nextbox.Value = "ctest1";
            rg.addColumn(new Unit(0.6D, UnitType.Cm));
            rg.Nextbox.Value = "ctest2";
            rg.addColumn(new Unit(0.6D, UnitType.Cm));
            rg.Nextbox.Value = "row1";
            rg.addRowCell();
            rg.Nextbox.Value = "row12";
            rg.appendRow();
            rg.finishTable();
            DetailSection.Items.Add(rg.table);
Anders
Top achievements
Rank 1
 answered on 13 Sep 2012
1 answer
120 views
Hello,

I tried Telerik Reporting Online demo on Ipad, however it seems none of the scroll bar is working on IPAD.
Is it known issue?
Is there any workaround solution for this? thank you
Peter
Telerik team
 answered on 13 Sep 2012
1 answer
159 views
I have a report that consist of multiple reports.  For example.

dim rpt1 s new report1
dim rpt2 as new report2
Dim reportBook as new Telerk.Reporting.ReportBook()
reportBook.Reports.Add(rpt1)
reportBook.Reports.Add(rpt2)

if rtp1 has no detail lines then I want to be able to suppress the entire page so that the first report I added basically just doesn't show.  I wish it was as easy as just not adding the report to the reportbook but I just can't do this being I don't know yet if there are detail lines.

How can I suppress this report so that it don't show and that also the page numbering is correct?

thanks for your help.
Squall
Top achievements
Rank 1
 answered on 13 Sep 2012
1 answer
399 views
Hello,

I'm considering working with Telerik Reporting but I want to make sure that text boxes can overlap images in the report.  For example, i have an image showing dimensions.  I plan on placing text boxes bound to data over the image where the dimensions are shown.  Can Telerik do something like this?

thansk
francis
Chavdar
Telerik team
 answered on 12 Sep 2012
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?