Telerik Forums
Reporting Forum
1 answer
137 views
I have a report which i am using recursively as a subreport.
At runtime, i modify the report based on user inputs (I add some columns, sorting,  groupings, etc.).
I would like to clone the already customized report instance so that I can provide it as the subreport reportsource without having to redo the customization for every single instance. 

Is there an easy way to do that? Are report instances Clonable?
Elian
Telerik team
 answered on 31 Jan 2013
1 answer
140 views
I am using an aspx page in which i have included this page directive.
<%@ Register assembly="Telerik.ReportViewer.WebForms, Version=4.0.10.317, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" namespace="Telerik.ReportViewer.WebForms" tagprefix="telerik" %>


but still there is an error on design page saying failed to create Telerik.reportview.webforms.reportviewer.
more over there is a logo in the current abc available in the following path 
Telerik.reportviewer.axd/instance...

i am unable to find that logo in my images folder also.
Kindly help how to track the image path. i need to remove that image and put another image.
Stef
Telerik team
 answered on 31 Jan 2013
2 answers
132 views
I have a silverlight project and am setting up the separate project for the reports.  There are about 500 to build, upsizing from an old desktop program.  Is there a max number or size limitation in the report project/dll I should watch for?
Jo-Anne
Top achievements
Rank 1
 answered on 30 Jan 2013
1 answer
160 views
I'm implementing several reports that have sub-reports (for many-to-one relations). Originally I designed the sub-reports as separate .trdx files and linked them; unfortunately I need to have the sub-reports in-line in the xml code of the main report for them to work within our application.

When they're initially laid out as referenced files the spacing is fine; once I drop the code in line the right margins of the report are pushed out. I verified the sizes are correct for both the sub-reports and the layout panels I used (again, it previewed fine when the sub-reports were referenced files) and that there was no extra padding or margin information. It's clear that this is being caused by the sub-reports as the main design area (where the sub-reports are) is pushed out but the header and footer (which contain no sub-reports) are the correct width.

The only thing I could think of is that the sub-reports are inheriting margin information from the main report; could you verify if this is the case? If so, how can I prevent this? (i.e., can I insert margin information at the end of the sub-report that will override the inherited margins?). If margin information is not inherited by the sub-reports, can you suggest a cause and fix?
Stef
Telerik team
 answered on 30 Jan 2013
1 answer
55 views
I'm planning on creating a reportbook containing a set of  separate one-page reports, some of which contain charts.  Separate reports for each page because each page is completely different.

Handily, I have a report table already given to me containing these fields:

Report Key -- each user will only be able to see particular sets of data
Report page number: 1 to X
Report row number: 1 to about 30
Report column 1
Report column 2
Report column 3
.
.
.
etc to Report column 16.  Some pages have 16 columns across, others have fewer.  On the printed page, I have to insert literal values like:

Heading
        Subheading
                 Description      --- then the columns for row 1 
                 Other               ---- then the columns for row 2 etc

All I really have to do is transfer the columns for row 1 into row 1 of the page I'm working on, then row 2, etc.

What's the simplest way to go about this in Telerik Reports?  I'm thinking I may have to have one subreport for each row.
Elian
Telerik team
 answered on 30 Jan 2013
1 answer
89 views
I'm considering in purchase Telerik Reporting for my company, but I want to clear the following questions:

* Reports created with Report Builder 3.0 (2012) are supported?
* If I have deployed those reports in the ReportServer, the Telerik ReportViewer can load them in my ASP.NET Webform application?
* Currently I'm using ReportViewer control for Visual Studio, how much differ Telerik's control from this one? I can pass the Path to the control to render it?
* Does Telerik support Remote processing?

Thanks in advance!
Peter
Telerik team
 answered on 30 Jan 2013
1 answer
268 views
I'm trying to display the value of a datetime in a testbox, and I want to vary the format based on a grouping parameter, so I use a binding like this to the format:

=Iif(Parameters.DateGroupFlag.Value = 1, "{0:Y}", Iif(Parameters.DateGroupFlag.Value = 2, "{0:d}", Iif(Parameters.DateGroupFlag.Value = 3, "{0:Y}", Iif(Parameters.DateGroupFlag.Value = 4, "{Y}", Iif(Parameters.DateGroupFlag.Value = 5, "{0:t}", Iif(Parameters.DateGroupFlag.Value = 6, "{0:t}", Iif(Parameters.DateGroupFlag.Value = 7, "{0:Y}", "{0:Y}")))))))

and this basically works, but I don't see how I can handle two special cases.
One is to display the year(eg "2013") only, and the other is to display the day only("Thursday").
Any ideas welcome
Joe
Top achievements
Rank 1
 answered on 30 Jan 2013
0 answers
60 views
Hello

We just converted to this version of Telerik and are having problems with all of our reports that use subreports.
I have looked at several options that people have suggested but so far no luck. 

Can someone please help?

Here is the code that we are using --

We set SubReportDS with
  MainReport report1 = new MainReport();
  report.SubReportDS = MyData;

and define SubReprtDS with --

public object SubReportDS
{
   set {   
    MainReport report1 = new MainReport();  

       Telerik.Reporting.SubReport subReport1 = 
        (Telerik.Reporting.
SubReport)report1.Items.Find("subReport", true)[0];

    Telerik.Reporting.InstanceReportSource
        (Telerik.Reporting.
InstanceReportSource) subReport1.ReportSource;  

    Telerik.Reporting.Report sub2 = (Telerik.Reporting.Report)irs.ReportDocument;

 

    sub2.DataSource =  value;
    }
}

The end result of this is a report that contains that main section which is populated.  It also
subReport sections but none of the subReport sections have data in them. 

Any help will be appreciated.
Thank you - Raka.

 

Raka
Top achievements
Rank 1
 asked on 29 Jan 2013
1 answer
211 views
I have parameters:
Reporting-Parameters-Combobox01.png

Also I receive it
Reporting-Parameters-Combobox02.png

Reporting viersion is 6.2.13.110. and VS2010 SP1
How can i get a combobox?
ADM-IT Denis Pujdak
Top achievements
Rank 1
 answered on 26 Jan 2013
1 answer
290 views
Report Constructor code
=======================
           //chart 
            DataTable dtStudent = new DataTable();
            //Columns of data table            
            dtStudent.Columns.Add("Name", typeof(string));
            dtStudent.Columns.Add("Date", typeof(DateTime));
            dtStudent.Columns.Add("Value", typeof(int));
  
            //rows in the data table
            //date1
            dtStudent.Rows.Add("Multiplication", "2013-01-12",  25);
            dtStudent.Rows.Add("division", "2013-01-12",  10);
            dtStudent.Rows.Add("Addition", "2013-01-12", 15);
            //date2
            dtStudent.Rows.Add("Multiplication", "2013-01-13",  30);
            dtStudent.Rows.Add("division", "2013-01-13",  11);
            dtStudent.Rows.Add("Addition", "2013-01-13",  14);
            //date3
            dtStudent.Rows.Add("Multiplication", "2013-01-14",  28);
            dtStudent.Rows.Add("division", "2013-01-14",  23);
            dtStudent.Rows.Add("Addition", "2013-01-14",  25);
            //date4
            dtStudent.Rows.Add("Multiplication", "2013-01-15",  40);
            dtStudent.Rows.Add("division", "2013-01-15",  49);
            dtStudent.Rows.Add("Addition", "2013-01-15",  18);
  
            Telerik.Reporting.Chart defChart = new Telerik.Reporting.Chart();
            defChart.BitmapResolution = 96F;
            defChart.ImageFormat = System.Drawing.Imaging.ImageFormat.Emf;
            defChart.IntelligentLabelsEnabled = false;
            defChart.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0.32, ((Telerik.Reporting.Drawing.UnitType)(Telerik.Reporting.Drawing.UnitType.Cm))), new Telerik.Reporting.Drawing.Unit(1.8, ((Telerik.Reporting.Drawing.UnitType)(Telerik.Reporting.Drawing.UnitType.Cm))));
            defChart.PlotArea.EmptySeriesMessage.Appearance.Visible = true;
            defChart.PlotArea.EmptySeriesMessage.Visible = true;
            defChart.PlotArea.XAxis.AxisLabel.Visible = true;
            defChart.PlotArea.YAxis.AxisLabel.Visible = true;
            defChart.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(15, ((Telerik.Reporting.Drawing.UnitType)(Telerik.Reporting.Drawing.UnitType.Cm))), new Telerik.Reporting.Drawing.Unit(10, ((Telerik.Reporting.Drawing.UnitType)(Telerik.Reporting.Drawing.UnitType.Cm))));
  
  
            defChart.ChartTitle.Visible = false;
  
            var distinctResult = (from row in dtStudent.AsEnumerable()
                                  select row.Field<string>("Name")).Distinct();
  
            foreach (string name in distinctResult)
            {
  
                var dataResult = from row in dtStudent.AsEnumerable()
                                 where row.Field<string>("Name") == name
                                 select new
                                 {
                                     Name = row.Field<string>("Name"),
                                     Date = row.Field<DateTime>("Date"),
                                     Value = row.Field<int>("Value")
                                 };
  
  
                Telerik.Reporting.Charting.ChartSeries chartSeries = new Telerik.Reporting.Charting.ChartSeries();
                chartSeries.Type = Telerik.Reporting.Charting.ChartSeriesType.Line;
                chartSeries.Name = name;
                chartSeries.Appearance.LabelAppearance.Visible = false;
  
                defChart.Legend.Visible = false;
  
                foreach (var record in dataResult)
                {
                    ChartSeriesItem item = new ChartSeriesItem();
                    item.XValue = record.Date.ToOADate();
                    item.YValue = record.Value;
                    chartSeries.AddItem(item);
                }
                defChart.Series.Add(chartSeries);
            }
            defChart.PlotArea.XAxis.Appearance.ValueFormat = Telerik.Reporting.Charting.Styles.ChartValueFormat.ShortDate;
            defChart.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 315;
            defChart.PlotArea.XAxis.Appearance.LabelAppearance.Position.AlignedPosition = Telerik.Reporting.Charting.Styles.AlignedPositions.TopLeft;
            defChart.PlotArea.XAxis.LayoutMode = Telerik.Reporting.Charting.Styles.ChartAxisLayoutMode.Inside;
            defChart.PlotArea.XAxis.IsZeroBased = false;
            defChart.PlotArea.XAxis.AutoScale = true;
            defChart.PlotArea.XAxis.LabelStep = 1;
  
            //Margins
            Telerik.Reporting.Charting.Styles.ChartMargins chartMargins2 = new Telerik.Reporting.Charting.Styles.ChartMargins();
            chartMargins2.Bottom = new Telerik.Reporting.Charting.Styles.Unit(40D, Telerik.Reporting.Charting.Styles.UnitType.Percentage);
            chartMargins2.Top = new Telerik.Reporting.Charting.Styles.Unit(5D, Telerik.Reporting.Charting.Styles.UnitType.Percentage);
            chartMargins2.Right = new Telerik.Reporting.Charting.Styles.Unit(20D, Telerik.Reporting.Charting.Styles.UnitType.Percentage);
            chartMargins2.Left = new Telerik.Reporting.Charting.Styles.Unit(5D, Telerik.Reporting.Charting.Styles.UnitType.Percentage);
            defChart.PlotArea.Appearance.Dimensions.Margins = chartMargins2;
  
            this.detail.Items.AddRange(new Telerik.Reporting.ReportItemBase[] { defChart });
  
  
Calling aspx page:
==============
Student.aspx
===============
 <telerik:ReportViewer ID="ReportViewer1" runat="server" Height="580px" Width="1080px"></telerik:ReportViewer>
  
Code behind
================
 Telerik.Reporting.InstanceReportSource instanceReportSource = new Telerik.Reporting.InstanceReportSource();
             
            StudentLineReport objRep = new StudentLineReport();
  
 instanceReportSource.ReportDocument = objRep;
            this.ReportViewer1.ReportSource = instanceReportSource;

I m rendering a line chart from the report viewer as well as design preview. The design preview is showing the complete chart, but while running it in the report viewer, the chart is not displayed completely(see attachments). Also while exporting the chart to the PDF, it is rendered in different size.

Please find the attached snapshots and the code for the scenario.

Please let me know how to show the chart completely in the telerik report viewer. Also the chart should appear of same size in both telerik report viewer and exported pdf file. kindly help me on this one.

Stef
Telerik team
 answered on 25 Jan 2013
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?