Telerik Forums
Reporting Forum
1 answer
86 views

Hi,

 

I'm trying to build the report out of large numeric table dynamically created of database.

It's grouped by hierarchy of 4 elements created of database dynamically. 3 Bottom levels should have total Column And calculated average column.

Sort of:

 

                                Building

                |                                |                         |              

Floor Number          Floor Number                Floor Number

|              |         |                         |                                 |             |

Room Room Room          Room                    Room          Room

||||||||||||||||           ||||                       ||||||||||||||||

Tenants                                Tenants                                Tenants


I have excel file to show the structure , but cant upload.
How can I upload excel file?


How can I build report like that?

Thank you.

Elian
Telerik team
 answered on 13 Feb 2012
2 answers
126 views
Hi

I'm using Razor to create a view in MVC 3 C#.  I'm looking to convert that view to .pdf for saving or printing.  Is it possible to do this with the Telerik controls?  If it is, could you direct me to a tutorial.

Thanks
Bobman
Top achievements
Rank 1
 answered on 13 Feb 2012
3 answers
175 views


Dear Telerik team ,

                  I have implemented the  below code for external print button functionality in silverlight with a report having more than 20 pages. I have tested this using XPS printer I have found few of the pages are not printed correctly. Out of 20 pages I have found 2 pages are printing partially every time.(Page 7 and page 14). if the chart size increase it is becoming more worse.
Is is possible to show a progress bar before print dialog appears.
 I have attached the screen shot for your reference.  Please help on this issue.


MainPage.cs 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Navigation;
using Telerik.ReportViewer.Silverlight;
using Telerik.Reporting.Service.SilverlightClient;
using System.ServiceModel;
using Telerik.Reporting.Service;
using System.Runtime.Serialization;
using System.IO;
using System.Text;
using System.Windows.Printing;
using System.Windows.Media.Imaging;
using System.Windows.Markup;
using System.Collections.ObjectModel;
 
namespace ReportsSample
{
    
    public partial class MainPage : UserControl, IReportServiceClientFactory
    {
 
 
      
        public MainPage()
        {
            InitializeComponent();
           
 
           
 
 
            this.rptViewer.ReportServiceClientFactory = this;
            this.rptViewer.RenderBegin += new RenderBeginEventHandler(rptViewer_RenderBegin);      
        }
 
 
     
 
        ReportViewerModel viewerModel;
        ReportViewerModel ViewerModel
        {
            get
            {
                if (viewerModel == null && VisualTreeHelper.GetChildrenCount(this.rptViewer) > 0)
                {
                    var layoutRoot = (FrameworkElement)VisualTreeHelper.GetChild(this.rptViewer, 0);
                    viewerModel = (ReportViewerModel)layoutRoot.DataContext;
                }
                return viewerModel;
            }
        }
 
 
        void rptViewer_RenderBegin(object sender, RenderBeginEventArgs args)
        {
            this.rptViewer.RenderBegin -= this.rptViewer_RenderBegin;          
            this.ViewerModel.PropertyChanged += this.ViewerModel_PropertyChanged;
        }
 
 
        void ViewerModel_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            //if (e.PropertyName == "State" && IsReadyToPrint())
            //{
            //    this.ViewerModel.PropertyChanged -= this.ViewerModel_PropertyChanged;
            //    this.PrintReport();
            //}
        }
 
        bool IsReadyToPrint()
        {
            return this.ViewerModel.State == ReportViewerStates.ViewerPage;
        }
 
        void PrintReport()
        {
            this.viewerModel.PrintReportCommand.Execute(null);
        }
 
      
 
        #region IReportServiceClientFactory Members
 
        ReportServiceClient IReportServiceClientFactory.Create(System.Uri remoteAddress)
        {
           // remoteAddress = new Uri("../Reports/ReportService.svc", UriKind.RelativeOrAbsolute);
            var binding = new BasicHttpBinding()
            {
                MaxBufferSize = int.MaxValue,
                MaxReceivedMessageSize = int.MaxValue,
                ReceiveTimeout = new TimeSpan(0, 15, 0),
                SendTimeout = new TimeSpan(0, 15, 0)
            };
 
            var endpointAddress = new EndpointAddress(remoteAddress);
 
            return new ReportServiceClient(binding, endpointAddress);
 
        }
        #endregion
 
 
 
 
      
 
        
 
 
 
 
 
 
 
 
 
 
     
        Collection<Canvas> pagesList;
        string instanceID;
        private void btnPritNew_Click(object sender, RoutedEventArgs e)
        {
 
            try
            {
 
                this.ViewerModel.PropertyChanged -= this.ViewerModel_PropertyChanged;
                this.PrintReport();
            }
            catch(Exception ex)
            {
            }
 
 
 
        }
 
 
       
 
        
 
 
 
    }
}
public class ReportSettingsMaster
{
    public int CodeId { get; set; }
 
    public string CodeName { get; set; }
 
    public string CodeKey { get; set; }
}



Report.cs
#region [Assemblies References]
using System;
using Telerik.Reporting;
using Telerik.Reporting.Drawing;
using System.Data;
using System.Collections.Generic;
using Telerik.Reporting.Charting;
using Telerik.Reporting.Charting.Styles;
using System.Runtime.Serialization;
using System.IO;
using System.Text;
using System.Drawing;
using System.Linq;
#endregion
namespace Telstrat.Reports
{
    /// <summary>
    /// Summary description for Report1.
    /// </summary>
    public partial class SampleEvaluationsReport : Telerik.Reporting.Report
    {
          DataTable dtResults = new DataTable();
 
        #region [Constructor]
          public SampleEvaluationsReport()
        {
            //Providing the DataSource event for the report         
            InitializeComponent();
 
            for (int i = 0; i < 15; i++)
            {
 
                dtResults.Columns.Add(" Column " + i.ToString(), i == 0 ? typeof(string) : typeof(int));
            }
 
            for (int i = 0; i < 70; i++)
            {
                Random r = new Random();
                dtResults.Rows.Add(new object[] { "Chart Series "+i.ToString(),
                                                  r.Next(100),
                                                  r.Next(100),
                                                  r.Next(100),
                                                  r.Next(100),
                                                  r.Next(100),
                                                  r.Next(100),
                                                  r.Next(100),
                                                  r.Next(100),
                                                  r.Next(100),
                                                  r.Next(100),
                                                  r.Next(100),
                                                  r.Next(100),
                                                  r.Next(100),                                                 
                                                  r.Next(100) }
                                                   );
            }
            generateChart(dtResults,1,2); 
 
 
        }
        #endregion
 
        #region [generateChart]
 
        private float _standardHeight = 11.7f;
        private double _reportMargin = 0;
        private int formatedLabelmaxlength = 0;
        private int formatedLabelmaxdepth = 0;
        private string formatTextWrap(string sourceText)
        {
            int divider = 80;
 
            string[] sourceTextlist = sourceText.Split(' ');
 
            int lineCount = 0;
            string strResultText = string.Empty;
            string strLine = string.Empty;
            foreach (string strWord in sourceTextlist)
            {
 
                if (strLine.Length < divider)
                {
                    strLine += strWord + " ";
                    formatedLabelmaxlength = formatedLabelmaxlength < strLine.Length ? strLine.Length : formatedLabelmaxlength;
                }
                else
                {
                    formatedLabelmaxlength = formatedLabelmaxlength < strLine.Length ? strLine.Length : formatedLabelmaxlength;
                    lineCount++;
                    strResultText += strLine + "\n";
                    strLine = string.Empty;
 
                }
 
 
            }
 
            if (strLine.Length > 0)
            {
                strResultText += strLine;
            }
 
            formatedLabelmaxdepth = formatedLabelmaxdepth < lineCount ? lineCount : formatedLabelmaxdepth;
 
 
            return strResultText;
 
 
 
        }
 
 
        private void generateChart(DataTable dtResults, int chartType, int GraphType)
        {
 
            ChartSeriesType CurrentChartType = ChartSeriesType.Bar;
            ChartSeriesOrientation ChartOrientation = ChartSeriesOrientation.Vertical;
            float reportWidth = 5;
            float reportHeight = 5;
            float xAxisMargin = 0f;
            float xAxisLableMargin = 0f;
 
 
 
            int xAxisRotationAngle = 0;
            AlignedPositions xAxisTextAlignedPositions = AlignedPositions.Left;
            AlignedPositions xAxisLabelAlignedPositions = AlignedPositions.Top;
            AlignedPositions xAxisAxisLabel = AlignedPositions.Top;
 
 
            #region Format Data
            for (int i = 0; i < dtResults.Rows.Count; i++)
            {
                dtResults.Rows[i][0] = formatTextWrap(dtResults.Rows[i][0].ToString());
            }
            #endregion
 
            #region Graph Type
            switch (chartType)
            {
                case 1://Column
                    CurrentChartType = ChartSeriesType.Bar;
                    ChartOrientation = ChartSeriesOrientation.Vertical;
                    xAxisTextAlignedPositions = AlignedPositions.Left;
                    xAxisLabelAlignedPositions = AlignedPositions.Top;
                    xAxisAxisLabel = AlignedPositions.Top;
                    xAxisRotationAngle = 270;
 
                    break;
                case 2: //Bar
                    CurrentChartType = ChartSeriesType.Bar;
                    ChartOrientation = ChartSeriesOrientation.Horizontal;
                    xAxisTextAlignedPositions = AlignedPositions.Left;
                    xAxisLabelAlignedPositions = AlignedPositions.Right;
                    xAxisAxisLabel = AlignedPositions.Left;
                    xAxisRotationAngle = 0;
 
                    #region Reverse the Data
 
                    DataTable clonedtResults;
                    clonedtResults = dtResults.Clone();
                    for (int intRow = dtResults.Rows.Count - 1; intRow >= 0; intRow--)
                    {
                        clonedtResults.ImportRow(dtResults.Rows[intRow]);
                    }
                    dtResults.Rows.Clear();
                    foreach (DataRow dr in clonedtResults.Rows)
                    {
                        dtResults.ImportRow(dr);
                    }
 
                    #endregion
                    break;
                case 3: //Line                   
                    CurrentChartType = ChartSeriesType.Line;
                    ChartOrientation = ChartSeriesOrientation.Vertical;
                    xAxisTextAlignedPositions = AlignedPositions.Left;
                    xAxisLabelAlignedPositions = AlignedPositions.Top;
                    xAxisAxisLabel = AlignedPositions.Top;
                    xAxisRotationAngle = 270;
 
                    break;
                default: break;
            }
 
 
 
            #endregion
 
 
            int totalBarCount = dtResults.Rows.Count * (dtResults.Columns.Count - 1);
            int maxXAxisTextlength = formatedLabelmaxlength > 80 ? 80 : formatedLabelmaxlength;
            GetChartProperties(ChartOrientation, totalBarCount, maxXAxisTextlength, ref reportWidth, ref reportHeight, ref  xAxisMargin, ref xAxisLableMargin);
 
 
 
            #region Chart Formating
 
            this.chartGeneric.Skin = "Mac";
            this.chartGeneric.AutoLayout = false;            
            this.chartGeneric.AutoTextWrap = false;
            this.chartGeneric.BitmapResolution = 96F;
           
            this.chartGeneric.ImageFormat = System.Drawing.Imaging.ImageFormat.Png;  
            this.chartGeneric.ChartTitle.Visible = false;
 
            this.chartGeneric.PlotArea.Appearance.Position.X = 0;
            this.chartGeneric.PlotArea.Appearance.Position.Y = 0;
            this.chartGeneric.PlotArea.Chart.Appearance.Position.X = 0;
            this.chartGeneric.PlotArea.Chart.Appearance.Position.Y = 0;
 
            this.chartGeneric.PlotArea.EmptySeriesMessage.TextBlock.Text = "There is nothing to display";
            this.chartGeneric.PlotArea.XAxis.AxisLabel.Visible = true;
            this.chartGeneric.PlotArea.YAxis.AxisLabel.Visible = true;
            this.chartGeneric.SeriesOrientation = ChartOrientation;
            this.chartGeneric.PlotArea.XAxis.AxisLabel.Appearance.Dimensions.Margins = new ChartMargins(0);
            this.chartGeneric.PlotArea.XAxis.AxisLabel.Appearance.Dimensions.Paddings = new ChartPaddings(0);
 
            this.chartGeneric.PlotArea.XAxis.AutoShrink = false;
            this.chartGeneric.PlotArea.XAxis.AutoScale = false;
 
 
            this.chartGeneric.PlotArea.XAxis.Appearance.TextAppearance.MaxLength = 255;
            this.chartGeneric.PlotArea.XAxis.Appearance.TextAppearance.AutoTextWrap = AutoTextWrap.False;
            this.chartGeneric.Appearance.TextQuality = TextQuality.SystemDefault;
            this.chartGeneric.PlotArea.XAxis.Appearance.Color = Color.Black;
 
 
            this.chartGeneric.PlotArea.XAxis.LayoutMode = ChartAxisLayoutMode.Between;
            this.chartGeneric.DefaultType = CurrentChartType;
 
            this.chartGeneric.PlotArea.XAxis.AxisLabel.TextBlock.Text =  dtResults.Columns[0].ColumnName;
            this.chartGeneric.PlotArea.YAxis.AxisLabel.TextBlock.Text = "(in numbers) ";
 
 
            this.chartGeneric.PlotArea.Appearance.Dimensions.Margins.Top = 50;
            this.chartGeneric.PlotArea.Appearance.Dimensions.Margins.Right = 250;
 
            this.chartGeneric.Appearance.BarWidthPercent = totalBarCount > 5 ? 100 : 20;
            this.chartGeneric.Appearance.BarOverlapPercent = -10;
 
 
 
            this.chartGeneric.PlotArea.XAxis.AxisLabel.Appearance.Dimensions.Margins.Left = new Telerik.Reporting.Charting.Styles.Unit(5);
 
 
            this.chartGeneric.PlotArea.XAxis.Appearance.TextAppearance.Position.AlignedPosition = xAxisTextAlignedPositions;
            this.chartGeneric.PlotArea.XAxis.Appearance.LabelAppearance.Position.AlignedPosition = xAxisLabelAlignedPositions;
            this.chartGeneric.PlotArea.XAxis.AxisLabel.Appearance.Position.AlignedPosition = xAxisAxisLabel;
 
 
            this.chartGeneric.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = xAxisRotationAngle;
 
 
            this.chartGeneric.PlotArea.Appearance.Dimensions.Margins.Left = 50;
 
            if (ChartOrientation == ChartSeriesOrientation.Vertical)
            {
                this.chartGeneric.PlotArea.Appearance.Dimensions.Margins.Left = 50;
                this.chartGeneric.PlotArea.Appearance.Dimensions.Margins.Bottom = xAxisMargin;
                this.chartGeneric.PlotArea.XAxis.Appearance.TextAppearance.Dimensions.Margins.Bottom = xAxisLableMargin;
 
            }
            else
            {
 
                this.chartGeneric.PlotArea.Appearance.Dimensions.Margins.Left = xAxisMargin;
                this.chartGeneric.PlotArea.Appearance.Dimensions.Margins.Bottom = 50;
                this.chartGeneric.PlotArea.XAxis.Appearance.TextAppearance.Dimensions.Margins.Left = xAxisLableMargin;
 
            }
 
            #endregion
 
            #region Legend Formating
            this.chartGeneric.Legend.Appearance.Position.AlignedPosition = AlignedPositions.TopRight;
            this.chartGeneric.Legend.Appearance.Dimensions.Margins = new ChartMargins(5);
            this.chartGeneric.Legend.Appearance.Dimensions.Paddings = new ChartPaddings(5);
            this.chartGeneric.Legend.Appearance.Overflow = Overflow.Column;
            this.chartGeneric.Legend.Appearance.Dimensions.Width = 75;
            this.chartGeneric.Legend.Appearance.ItemTextAppearance.AutoTextWrap = AutoTextWrap.True;
            this.chartGeneric.Legend.Appearance.Location = LabelLocation.OutsidePlotArea;
            this.chartGeneric.Legend.Appearance.ItemTextAppearance.Position.AlignedPosition = AlignedPositions.Top;
 
            #endregion
 
 
            #region Chart Series
 
            chartGeneric.Series.Clear();
            chartGeneric.DataSource = dtResults;
            List<ChartSeries> chartSeries = new List<ChartSeries>();
            chartGeneric.PlotArea.XAxis.DataLabelsColumn = dtResults.Columns[0].ColumnName.Trim();
            for (int counter = 1; counter < dtResults.Columns.Count; counter++)
            {
                ChartSeries series = new ChartSeries()
                {
                    DataYColumn = dtResults.Columns[counter].ColumnName,
                    Name = dtResults.Columns[counter].Caption,
                    YAxisType = ChartYAxisType.Primary,
                    Type = chartGeneric.DefaultType
 
                };
 
                //series.Appearance.FillStyle.FillType = FillType.Gradient;
                series.Appearance.LabelAppearance.LabelLocation = Telerik.Reporting.Charting.Styles.StyleSeriesItemLabel.ItemLabelLocation.Inside;
                //series.Appearance.TextAppearance.FillStyle.MainColor = Color.White;
                //series.Appearance.TextAppearance.FillStyle.FillType = FillType.Solid;
                if (ChartOrientation == ChartSeriesOrientation.Vertical)
                {
                    series.Appearance.LabelAppearance.Position.AlignedPosition = AlignedPositions.Top;
 
                }
                else
                {
                    series.Appearance.LabelAppearance.Position.AlignedPosition = AlignedPositions.Right;
                }
                series.Appearance.BarWidthPercent = 90;
                series.Appearance.TextAppearance.TextProperties.Color = Color.Black;
                series.Appearance.TextAppearance.Dimensions.Margins = new ChartMargins(0);
                series.Appearance.TextAppearance.Dimensions.Paddings = new ChartPaddings(0);
                //series.Appearance.TextAppearance.TextProperties.Font = new System.Drawing.Font(FontFamily.GenericSansSerif, 12, GraphicsUnit.Pixel);
 
                chartSeries.Add(series);
            }
 
            // add the series to the chart, chart to page.
            chartGeneric.Series.AddRange(chartSeries.ToArray());
 
            #endregion
 
            #region Chart Dimensions
 
            this.chartGeneric.Docking = DockingStyle.None;
            this.chartGeneric.Appearance.Position.AlignedPosition = AlignedPositions.Center;
            this.chartGeneric.Location = new PointU(new Telerik.Reporting.Drawing.Unit(0), new Telerik.Reporting.Drawing.Unit(0));
            this.chartGeneric.Width = new Telerik.Reporting.Drawing.Unit(reportWidth, Telerik.Reporting.Drawing.UnitType.Inch);
            this.chartGeneric.Height = new Telerik.Reporting.Drawing.Unit(reportHeight, Telerik.Reporting.Drawing.UnitType.Inch);
 
            //this.chartGeneric.Width = new Telerik.Reporting.Drawing.Unit(8, Telerik.Reporting.Drawing.UnitType.Inch);
            //this.chartGeneric.Height = new Telerik.Reporting.Drawing.Unit(10, Telerik.Reporting.Drawing.UnitType.Inch);
 
            #endregion
 
            #region Page Dimensions
            this.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.Custom;
            this.PageSettings.Landscape = true;
            this.PageSettings.PaperSize = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(8.27, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(11.69f, Telerik.Reporting.Drawing.UnitType.Inch));
 
 
            //this.PageSettings.PaperSize = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(reportWidth + 0.5, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(reportHeight + 1.0 + this.pageHeaderSection1.Height.Value, Telerik.Reporting.Drawing.UnitType.Inch));
 
            //this.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.Custom;
            //Setting the page Width and Height
 
            // this.PageSettings.PaperSize = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(7.0f + 0.5, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(10.25f, Telerik.Reporting.Drawing.UnitType.Inch));
 
 
 
            //if (GraphType == 2)
            //{
            //    this.PageSettings.PaperSize = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(reportWidth + 0.5, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(_standardHeight, Telerik.Reporting.Drawing.UnitType.Inch));
            //}
            //else
            //{
            //    this.PageSettings.PaperSize = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(_standardHeight, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(reportHeight + 1.0 + this.pageHeaderSection1.Height.Value, Telerik.Reporting.Drawing.UnitType.Inch));
            //}
 
 
            //this.PageSettings.PaperSize = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(10, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(12, Telerik.Reporting.Drawing.UnitType.Inch));
                //       this.PageSettings.Landscape = true;
//            this.PageSettings.PaperSize = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(10, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(reportHeight + 1.0 + this.pageHeaderSection1.Height.Value, Telerik.Reporting.Drawing.UnitType.Inch));
 
            #endregion
 
 
 
        }
 
        private void GetChartProperties(ChartSeriesOrientation objChartOrientation, int totalBarCount, int maxXAxisTextlength, ref float reportWidth, ref float reportHeight, ref float xAxisMargin, ref float xAxisLableMargin)
        {
 
            if (objChartOrientation == ChartSeriesOrientation.Horizontal)
            {
                float tempwidth = reportWidth;
                reportWidth = reportHeight;
                reportHeight = tempwidth;
            }
 
 
 
            xAxisMargin = (maxXAxisTextlength * 7) + 60;
            xAxisLableMargin = (maxXAxisTextlength * 6) + 10;
 
 
 
            if (objChartOrientation == ChartSeriesOrientation.Vertical)
            {
                if (maxXAxisTextlength > 50)
                {
                    reportHeight += (float)(6 - (reportWidth - (maxXAxisTextlength * 0.0625)));
                }
                if (formatedLabelmaxdepth < totalBarCount)
                {
 
                    if (totalBarCount > 5)
                    {
                        //reportWidth += (float)reportWidth + (totalBarCount - 3) / 9;
                        reportWidth += (float)reportWidth + (totalBarCount * .3f);
                    }
                }
                else
                {
                    if (formatedLabelmaxdepth > 3)
                    {
                        reportWidth += (float)reportWidth + (formatedLabelmaxdepth * .1f);
                    }
                }
            }
            else
            {
                if (maxXAxisTextlength > 50)
                {
                    reportWidth += (float)(8 - (reportWidth - (maxXAxisTextlength * 0.0625)));
 
                }
                if (formatedLabelmaxdepth < totalBarCount)
                {
 
                    if (totalBarCount > 5)
                    {
                        // reportHeight += (float)reportHeight + (totalBarCount - 5) / 9;
                        reportHeight += (float)reportHeight + (totalBarCount * .3f);
 
                    }
                }
                else
                {
                    if (formatedLabelmaxdepth > 3)
                    {
                        reportHeight += (float)reportHeight + (formatedLabelmaxdepth * .1f);
                    }
                }
            }
 
 
 
            reportHeight = reportHeight > 300 ? 300 : reportHeight;
            reportWidth = reportWidth > 300 ? 300 : reportWidth;
 
        }
 
        #endregion
    }
}



Thanks.

regards,
Kiran

Peter
Telerik team
 answered on 13 Feb 2012
3 answers
431 views

Hi,

I am facing an issue when the html data show in the telerik report.
I am using Reporting Q3 2011 .
I have placed HTMLTextBox control in the report page.
After I taken html page and read its content to the string  and assigned this string to the
HTMLTextbox obect value.when running report error occurs.
The reason of this error is 'the html' page contains tables.
I am attaching my htmlpage along with this email.
How can generate the report of this html page?
This is an urgent requirement.

Thanks
Sindu.



Steve
Telerik team
 answered on 13 Feb 2012
8 answers
155 views
I have a similar problem as an earlier posting as shown below

I have a Silverlight Report Viewer. I have a few parameters I am using to filter my results, and they have AllowNull set to true. But can I change the text of the checkbox from "Null" to "All"?   


The recommendation was to use Blend to modify the template.  The problem I have is that I own a license to visual studio 2008 and the download for Blend is 4.0.  There seems to be a compatability issue here.  Is there another way to modify this template?
Craig
Top achievements
Rank 1
 answered on 11 Feb 2012
1 answer
114 views
I have created a report, completely wihin the designer. This report contains several graphs, wiyh on the x-axis the month-nr's. To achieve better readability, I want to convert the month-numbers to month-names. I have created a method:

public static string NRToMonth(int nr)
{
  string month = "";          
  switch (nr)           
  {               
    case 1:                   
      month = 
"jan";
      break;
    case 2:
      month =
"feb";
      break;



This methods works fine when used in a table, but now I want to convert the x-axis labels of several graphs. 
At this moment i really don't know which code and where to put this code to change the x-axis?

I can change parameters like axis-labels programmatically, but not convert axis values?

i'm using Telerik Reporting 2011 Q3
Steve
Telerik team
 answered on 11 Feb 2012
1 answer
69 views
I have a collection of Document objects that I'd like to bind to a table in my report. Each Document has a collection of Note objects as well. Is it possible to bind a table in such a way that there are master and detail records with different columns and values?

DOCUMENT: Id - Field1 - Field2 - Field3 - Field4
DOCUMENT: Id - Field1 - Field2 - Field3 - Field4 
  NOTE:   User - Text - Timestamp
  NOTE:   User - Text - Timestamp 
  NOTE:   User - Text - Timestamp 
DOCUMENT: Id - Field1 - Field2 - Field3 - Field4 
  NOTE:   User - Text - Timestamp 

And if not, is there an easy way to simulate such functionality? If you have any documentation or sample projects you can supply me with I'd appreciate it.

Thanks.
Steve
Telerik team
 answered on 11 Feb 2012
5 answers
121 views
Is there any chance that you will be providing a way to embed the new RadMap control within Reports generated by this Reporting Engine?  If not, then I would very much like to suggest this as a feature enhancement.

Thanks,
Lee
Steve
Telerik team
 answered on 11 Feb 2012
7 answers
395 views
Hi
i have downloaded latest version of telerik reports released on Report Q3 2010. thanks for new features
I want to open a new window of specific record when user click on image. We can use action for it. I define a javascript function which accept RecordId as parameter
function openWin(id)
{
window.open("mypage.aspx?employeeId="+id);
}
This javascript function is in my aspx file where i have placed ReportViewer Control
on action of image i select Navigate to url if i write javascript:alert('ok') it works fine and display alert
Now how can i call my javascript function defined in my aspx page and how pass parameter for each row
Steve
Telerik team
 answered on 10 Feb 2012
3 answers
143 views
Greetings!

I have a master report with several subreports in it.  I need to keep all of the sections for the subreports in my master report, but would like to print the word "None" or "No Records Found" whenever a subreport has no records.  Hopefully this is a simple thing to do... any suggestions?

Your assistance is appreciated!

Matt
Steve
Telerik team
 answered on 10 Feb 2012
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?