Telerik Forums
Reporting Forum
3 answers
72 views
Hello,
I am using sub-reports. I have a report containing two sub-report. Each sub report points to different business data object. 
In the sub-reports how can we arrange data so that it makes more sense?
In the report you can see the data appears mixed, please refer attachment.
First nine columns are from (Column A to J) subreport1 and last four columns  (Column K to N) are from subreport2.
Can we do some arrangements so that the data is separated as per red markings?
I want data item 2 to start in subrepor1 after we are finished displaying data for data item 1 in subreport2. 
Please advice.
Regards,
Sandeep
Stef
Telerik team
 answered on 08 Oct 2014
5 answers
1.2K+ views
Hi,
I'm trying to generate a labeling report form which contains several text boxes, a bar-code section and quantity.
What I would like to do is that setting up a column and create a loop to iterate the column as much an exact number the quantity values.
(FYI : the column has a two sided labels.)

I think, all I need to do is create a loop only in Detail section/OR create a loop WITH Detail section.
So, I generated a form and put all boxes and a barcode in the detail section.
I wrote a code behind by using method; ReportItemBase[] ItemCollection in C#

http://www.telerik.com/community/forums/reporting/telerik-reporting/loop-through-all-controls.aspx

Unfortunately, I can not create a loop to iterate the column as much an exact number of the quantity values.

Change settings, conditional formatting and code behind
Any concerns and comments would be appreciated it.

Sincerely,
H

bob
Top achievements
Rank 1
 answered on 08 Oct 2014
2 answers
71 views
Hi

I am trying to build a report programmatically. In this report I try to add a textbox on PageHeader.
But the report is still empty. 

I search solution in forum, but I didn't see someone needing help to this problem.

This is a part of what I did, it might be something wrong, I dont know.

Panel PanelMonth = Construct_Panel("PanelMonth", this.Width.Value, 0.2, 0, 0);
TextBox LblMonth= Construct_TextBox("LblMonth", this.Width.Value, 0.2, 0, 0, " October");
PanelMonth.Items.Add(LblMonth);
this.pageHeaderSection1.Items.Add(PanelMonth);

Please, can you help me, thanks in advance

Paul S.

Pauline
Top achievements
Rank 1
 answered on 07 Oct 2014
2 answers
115 views
Hi

I'm trying to set a background image on a bubble chart, but I haven't managed to get it to appear. It works fine if I set a background on the overall graph, but not on the plotareastyle.

The code generated from the designer is below, any idea where I'm going wrong.

Another quick question, I'm trying to use a background image instead of Marked Zones, as these don't seem to be supported on the Graph object - are they hiding on the Graph object under another name anywhere?

Thanks

---

namespace ReportTest
{
partial class Report1
{
#region Component Designer generated code
/// <summary>
/// Required method for telerik Reporting designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
Telerik.Reporting.GraphGroup graphGroup1 = new Telerik.Reporting.GraphGroup();
Telerik.Reporting.GraphGroup graphGroup4 = new Telerik.Reporting.GraphGroup();
Telerik.Reporting.GraphTitle graphTitle1 = new Telerik.Reporting.GraphTitle();
Telerik.Reporting.NumericalScale numericalScale1 = new Telerik.Reporting.NumericalScale();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Report1));
Telerik.Reporting.NumericalScale numericalScale2 = new Telerik.Reporting.NumericalScale();
Telerik.Reporting.DataColumn dataColumn1 = new Telerik.Reporting.DataColumn();
Telerik.Reporting.DataColumn dataColumn2 = new Telerik.Reporting.DataColumn();
Telerik.Reporting.DataColumn dataColumn3 = new Telerik.Reporting.DataColumn();
Telerik.Reporting.DataColumn dataColumn4 = new Telerik.Reporting.DataColumn();
Telerik.Reporting.GraphGroup graphGroup2 = new Telerik.Reporting.GraphGroup();
Telerik.Reporting.GraphGroup graphGroup3 = new Telerik.Reporting.GraphGroup();
Telerik.Reporting.Drawing.StyleRule styleRule1 = new Telerik.Reporting.Drawing.StyleRule();
this.detailSection1 = new Telerik.Reporting.DetailSection();
this.graph1 = new Telerik.Reporting.Graph();
this.cartesianCoordinateSystem1 = new Telerik.Reporting.CartesianCoordinateSystem();
this.graphAxis1 = new Telerik.Reporting.GraphAxis();
this.graphAxis2 = new Telerik.Reporting.GraphAxis();
this.csvDataSource1 = new Telerik.Reporting.CsvDataSource();
this.lineSeries1 = new Telerik.Reporting.LineSeries();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
// detailSection1
//
this.detailSection1.Height = Telerik.Reporting.Drawing.Unit.Cm(11.795207977294922D);
this.detailSection1.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
this.graph1});
this.detailSection1.Name = "detailSection1";
//
// graph1
//
graphGroup1.Name = "seriesGroup";
this.graph1.CategoryGroups.Add(graphGroup1);
this.graph1.CoordinateSystems.Add(this.cartesianCoordinateSystem1);
this.graph1.DataSource = this.csvDataSource1;
this.graph1.Docking = Telerik.Reporting.DockingStyle.Fill;
this.graph1.Legend.Style.LineColor = System.Drawing.Color.LightGray;
this.graph1.Legend.Style.LineWidth = Telerik.Reporting.Drawing.Unit.Cm(0D);
this.graph1.Legend.Style.Visible = false;
this.graph1.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Cm(0D), Telerik.Reporting.Drawing.Unit.Cm(0D));
this.graph1.Name = "graph1";
this.graph1.PlotAreaStyle.BackgroundImage.ImageData = ((System.Drawing.Image)(resources.GetObject("graph1.PlotAreaStyle.BackgroundImage.ImageData")));
this.graph1.PlotAreaStyle.BackgroundImage.MimeType = "image/png";
this.graph1.PlotAreaStyle.BackgroundImage.Repeat = ((Telerik.Reporting.Drawing.BackgroundRepeat)((Telerik.Reporting.Drawing.BackgroundRepeat.RepeatX | Telerik.Reporting.Drawing.BackgroundRepeat.RepeatY)));
this.graph1.PlotAreaStyle.LineColor = System.Drawing.Color.LightGray;
this.graph1.PlotAreaStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Cm(0D);
this.graph1.PlotAreaStyle.Visible = true;
this.graph1.Series.Add(this.lineSeries1);
graphGroup4.Groupings.Add(new Telerik.Reporting.Grouping("=Fields.Label"));
graphGroup4.Name = "labelGroup";
graphGroup4.Sortings.Add(new Telerik.Reporting.Sorting("=Fields.Label", Telerik.Reporting.SortDirection.Asc));
this.graph1.SeriesGroups.Add(graphGroup4);
this.graph1.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Cm(17.799999237060547D), Telerik.Reporting.Drawing.Unit.Cm(11.795207977294922D));
this.graph1.Style.BackgroundImage.MimeType = "image/png";
this.graph1.Style.Padding.Bottom = Telerik.Reporting.Drawing.Unit.Pixel(10D);
this.graph1.Style.Padding.Left = Telerik.Reporting.Drawing.Unit.Pixel(10D);
this.graph1.Style.Padding.Right = Telerik.Reporting.Drawing.Unit.Pixel(10D);
this.graph1.Style.Padding.Top = Telerik.Reporting.Drawing.Unit.Pixel(10D);
graphTitle1.Position = Telerik.Reporting.GraphItemPosition.TopCenter;
graphTitle1.Style.LineColor = System.Drawing.Color.LightGray;
graphTitle1.Style.LineWidth = Telerik.Reporting.Drawing.Unit.Cm(0D);
graphTitle1.Text = "October 2014";
this.graph1.Titles.Add(graphTitle1);
//
// cartesianCoordinateSystem1
//
this.cartesianCoordinateSystem1.Name = "cartesianCoordinateSystem1";
this.cartesianCoordinateSystem1.XAxis = this.graphAxis1;
this.cartesianCoordinateSystem1.YAxis = this.graphAxis2;
//
// graphAxis1
//
this.graphAxis1.MajorGridLineStyle.LineColor = System.Drawing.Color.LightGray;
this.graphAxis1.MajorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D);
this.graphAxis1.MinorGridLineStyle.LineColor = System.Drawing.Color.LightGray;
this.graphAxis1.MinorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D);
this.graphAxis1.MinorGridLineStyle.Visible = false;
this.graphAxis1.Name = "graphAxis1";
numericalScale1.Maximum = 10D;
numericalScale1.Minimum = 0D;
this.graphAxis1.Scale = numericalScale1;
this.graphAxis1.Title = "X - Label";
//
// graphAxis2
//
this.graphAxis2.MajorGridLineStyle.LineColor = System.Drawing.Color.LightGray;
this.graphAxis2.MajorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D);
this.graphAxis2.MajorGridLineStyle.Visible = true;
this.graphAxis2.MinorGridLineStyle.LineColor = System.Drawing.Color.LightGray;
this.graphAxis2.MinorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D);
this.graphAxis2.MinorGridLineStyle.Visible = false;
this.graphAxis2.Name = "graphAxis2";
numericalScale2.Maximum = 10D;
numericalScale2.Minimum = 0D;
this.graphAxis2.Scale = numericalScale2;
this.graphAxis2.Title = "Y - Label";
//
// csvDataSource1
//
dataColumn1.Name = "A";
dataColumn1.Type = Telerik.Reporting.SimpleType.Integer;
dataColumn2.Name = "B";
dataColumn2.Type = Telerik.Reporting.SimpleType.Integer;
dataColumn3.Name = "C";
dataColumn3.Type = Telerik.Reporting.SimpleType.Integer;
dataColumn4.Name = "Label";
this.csvDataSource1.Columns.Add(dataColumn1);
this.csvDataSource1.Columns.Add(dataColumn2);
this.csvDataSource1.Columns.Add(dataColumn3);
this.csvDataSource1.Columns.Add(dataColumn4);
this.csvDataSource1.FieldSeparators = new char[] {
','};
this.csvDataSource1.HasHeaders = true;
this.csvDataSource1.Name = "csvDataSource1";
this.csvDataSource1.RecordSeparators = new char[] {
'\r',
'\n'};
this.csvDataSource1.Source = "A,B,C,Label\r\n1,2,3,Item One\r\n2,3,5,Item Two\r\n5,4,9,Item Three\r\n8,6,14,Item Four";
//
// lineSeries1
//
graphGroup2.Name = "seriesGroup";
this.lineSeries1.CategoryGroup = graphGroup2;
this.lineSeries1.CoordinateSystem = this.cartesianCoordinateSystem1;
this.lineSeries1.DataPointLabel = "=Fields.Label + \",\" + Sum(Fields.C)";
this.lineSeries1.DataPointLabelStyle.Visible = true;
this.lineSeries1.DataPointStyle.Visible = true;
this.lineSeries1.LegendItem.Value = "C";
this.lineSeries1.LineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D);
this.lineSeries1.LineStyle.Visible = false;
this.lineSeries1.MarkerMaxSize = Telerik.Reporting.Drawing.Unit.Pixel(50D);
this.lineSeries1.MarkerMinSize = Telerik.Reporting.Drawing.Unit.Pixel(5D);
this.lineSeries1.MarkerSize = Telerik.Reporting.Drawing.Unit.Pixel(5D);
this.lineSeries1.MarkerType = Telerik.Reporting.DataPointMarkerType.Circle;
this.lineSeries1.Name = "lineSeries1";
graphGroup3.Groupings.Add(new Telerik.Reporting.Grouping("=Fields.Label"));
graphGroup3.Name = "labelGroup";
graphGroup3.Sortings.Add(new Telerik.Reporting.Sorting("=Fields.Label", Telerik.Reporting.SortDirection.Asc));
this.lineSeries1.SeriesGroup = graphGroup3;
this.lineSeries1.Size = "=Sum(Fields.C)";
this.lineSeries1.X = "=Sum(Fields.A)";
this.lineSeries1.Y = "=Sum(Fields.B)";
//
// Report1
//
this.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
this.detailSection1});
this.Name = "Report1";
this.PageSettings.Margins = new Telerik.Reporting.Drawing.MarginsU(Telerik.Reporting.Drawing.Unit.Mm(25.399999618530273D), Telerik.Reporting.Drawing.Unit.Mm(25.399999618530273D), Telerik.Reporting.Drawing.Unit.Mm(25.399999618530273D), Telerik.Reporting.Drawing.Unit.Mm(25.399999618530273D));
this.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.A4;
styleRule1.Selectors.AddRange(new Telerik.Reporting.Drawing.ISelector[] {
new Telerik.Reporting.Drawing.TypeSelector(typeof(Telerik.Reporting.TextItemBase)),
new Telerik.Reporting.Drawing.TypeSelector(typeof(Telerik.Reporting.HtmlTextBox))});
styleRule1.Style.Padding.Left = Telerik.Reporting.Drawing.Unit.Point(2D);
styleRule1.Style.Padding.Right = Telerik.Reporting.Drawing.Unit.Point(2D);
this.StyleSheet.AddRange(new Telerik.Reporting.Drawing.StyleRule[] {
styleRule1});
this.Width = Telerik.Reporting.Drawing.Unit.Cm(17.799999237060547D);
((System.ComponentModel.ISupportInitialize)(this)).EndInit();

}
#endregion

private Telerik.Reporting.DetailSection detailSection1;
private Telerik.Reporting.Graph graph1;
private Telerik.Reporting.CartesianCoordinateSystem cartesianCoordinateSystem1;
private Telerik.Reporting.GraphAxis graphAxis1;
private Telerik.Reporting.GraphAxis graphAxis2;
private Telerik.Reporting.CsvDataSource csvDataSource1;
private Telerik.Reporting.LineSeries lineSeries1;

}
}


Stef
Telerik team
 answered on 07 Oct 2014
3 answers
93 views
Hello

i follow this sample to create a report multi column.

http://www.telerik.com/help/reporting/advanced-creating-multi-column-reports.html


But i have the column on top to bottom , not the left to right,
i try with 2 columns or 3 Columns or 4 , it's the same,

What is the good way to get a good report multi column ? like this

http://demos.telerik.com/reporting/product-tags/demo.aspx

thanks for your help
Nasko
Telerik team
 answered on 07 Oct 2014
1 answer
769 views
Hi,

I am using HTML 5 report viewer in my web site which has a fixed width of 1024px. I want my reports to occupy full width of the report viewer and fits on to an A4 sheet when printing.

 I have adjusted the columns to fit an A4 sheet but this makes the report to only take half of the report viewer width. How can manage both layouts?
Stef
Telerik team
 answered on 07 Oct 2014
2 answers
118 views
Using Telerik.Reporting, Version=8.1.14.804.
Visual Studio solution in C# with report designer.
Data from database returns column 'Field1' of SQL type REAL.
Textbox on report with expression : 
= Abs(Fields.Field1)

In preview a red exception box is shown with message : 'Specified cast is not valid.'

As a workaround we now have:

= Abs(CDbl(Fields.Field1))

Should it work with a real (Single in C#?) from the database? Or are we doing something wrong?


Nasko
Telerik team
 answered on 07 Oct 2014
1 answer
294 views
I am building a report which is going to be used as a sub-report from within several other master reports.  The sub-report is pretty simple: one Table in the details section bound to a data source displaying a bunch of records, and a few header rows displaying column headers.  I want to include a header which displays some information about the records on the page such as 'Records #1 through #20" on page 1 and "Records #21 through #40" on page 2, etc.  This seems like the perfect application for the 'PageExec' function, however since I am using this as a sub-report anything in the Page Header and Footer will not be displayed.  Is there a way to do such a header value on each page of a sub-report?

I also tried looking into using the 'RunningValue' function but was unable to figure out a 'scope' value which would allow me to do such a thing.  Is it possible via some other method?
Hinata
Top achievements
Rank 1
 answered on 06 Oct 2014
1 answer
456 views
Hi! I am new to telerik reporting and creating simple report using stored procedure which takes one parameter. I am designing my report in standalone report designer using sqldatasource and using generated .trdx file in my ASP.Net MVC application in VS 2012. I already tried to create simple report using sql query/ stored procedure without parameter as shown in your article, this works great but when I am trying to use stored procedure with parameter it's not working. Report content like header and other static information is displaying in report but data coming from stored procedure is not displaying. There is no issue in Stored Procedure as I checked it's working in Sql server. I am using following code to pass parameter

@{
        var DataSource = new UriReportSource() { Uri = ViewBag.TemplateName };
       DataSource.Parameters.Add(new Telerik.Reporting.Parameter("SiteID", 1));        
    }

    @(Html.TelerikReporting().ReportViewer()    
       .Id("reportViewer1")
       .ServiceUrl("/api/reports/")
       .TemplateUrl("/ReportViewer/templates/telerikReportViewerTemplate-8.1.14.804.html")
       .ReportSource(DataSource)
       .ViewMode(ViewModes.INTERACTIVE)
       .ScaleMode(ScaleModes.SPECIFIC)
       .Scale(1.0)
       .PersistSession(false)
       ) 

This is working code and works with sql query/stored procedure without parameter but not working when I use stored procedure with parameter. 

Thanks......










Swapnil
Top achievements
Rank 1
 answered on 06 Oct 2014
1 answer
119 views
Hi everyone,
I am deploying a custom winform application that will use a database table to lookup reports that a user is allowed access to.
The table is just 3 fields
rptID, rptName, and rptDescription

On load of the Report  Form I query the database using the users ID and pull in the 3 fields above to create a group of radio buttons on the form.
What I need to be able to do is then load another form with a reportviewer on it when the user selects a radio button.

Is there anyway to take the string value of rptName and dynamically load it into the ReportViewer on the called form?

I am using instancereportsource with a compiled DLL of reports.

I can hard code the reports and use a Select Case on reportname but I would rather have it be dynamic so that I can add reports later on after the application is deployed by just replacing the reports DLL file.

The code I currently use for the hard coded select case is
Select Case ReportName
            Case "IncidentListingReporting" 
                Dim FullnameRpt2 As New Telerik.Reporting.InstanceReportSource 
                FullnameRpt2.ReportDocument = New Reporting.IncidentListingReport
                FullnameRpt2.Parameters.Add(New Telerik.Reporting.Parameter("SDate", Param2))
                FullnameRpt2.Parameters.Add(New Telerik.Reporting.Parameter("EDate", Param3))
                FullnameRpt2.Parameters.Add(New Telerik.Reporting.Parameter("PNUM", Param4))
                ReportViewer2.ReportSource = FullnameRpt2
End Select

What I would like is to be able to do something like
                FullnameRpt2.ReportDocument = Param1

Thanks for any help!


Nasko
Telerik team
 answered on 06 Oct 2014
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?