Telerik Forums
Reporting Forum
1 answer
229 views
Is it possible to do this?  What is the easiest way to do this?
Peter
Telerik team
 answered on 09 May 2013
3 answers
697 views
I am building a report with quite a few tables in it. Based on the data used to populate the report, I need to be able to show or hide the header row of the tables at runtime. How can this be achieved?
Elian
Telerik team
 answered on 09 May 2013
1 answer
72 views
Hi
Is the ChartMarkedZone supported in the ASP.NET Ajax HTML5 Charts?
Thanks
Danail Vasilev
Telerik team
 answered on 09 May 2013
1 answer
501 views
My report layout is attached
I need to have this in a4 sheet

Section 1 - Constant Height (Bottom of A4)
Section 2 - It will vary its height according to list of data (Above section 1)
Section 3 - Picture should occupy remaining A4 page sheet (Remaining part of the paper)

What is did was
Section 1 is docked bottom
Section 2 is docked bottom (above section 1)
Section 3 is docked fill

Attached my output

When my Section 2 is bigger then details are showed by generating the second page
I need to fit all in a single page by reducing the picture size(section 3)


Is there any way to get the size of the table while setting the size of the picture.
private void InitializeComponent()
        {
            Telerik.Reporting.TableGroup tableGroup1 = new Telerik.Reporting.TableGroup();
            Telerik.Reporting.TableGroup tableGroup2 = new Telerik.Reporting.TableGroup();
            Telerik.Reporting.TableGroup tableGroup3 = new Telerik.Reporting.TableGroup();
            Telerik.Reporting.TableGroup tableGroup4 = new Telerik.Reporting.TableGroup();
            Telerik.Reporting.Drawing.TextWatermark textWatermark1 = new Telerik.Reporting.Drawing.TextWatermark();
            Telerik.Reporting.Drawing.StyleRule styleRule1 = new Telerik.Reporting.Drawing.StyleRule();
            this.textBox1 = new Telerik.Reporting.TextBox();
            this.textBox3 = new Telerik.Reporting.TextBox();
            this.textBox4 = new Telerik.Reporting.TextBox();
            this.pageHeaderSection1 = new Telerik.Reporting.PageHeaderSection();
            this.detail = new Telerik.Reporting.DetailSection();
            this.panel11 = new Telerik.Reporting.Panel();
            this.pictureBox1 = new Telerik.Reporting.PictureBox();
            this.table1 = new Telerik.Reporting.Table();
            this.textBox5 = new Telerik.Reporting.TextBox();
            this.textBox6 = new Telerik.Reporting.TextBox();
            this.textBox7 = new Telerik.Reporting.TextBox();
            this.pageFooterSection1 = new Telerik.Reporting.PageFooterSection();
            this.objectDataSource1 = new Telerik.Reporting.ObjectDataSource();
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
            //
            // textBox1
            //
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(0.79998695850372314D), Telerik.Reporting.Drawing.Unit.Inch(0.29996046423912048D));
            this.textBox1.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.Solid;
            this.textBox1.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
            //
            // textBox3
            //
            this.textBox3.Name = "textBox3";
            this.textBox3.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(0.79998695850372314D), Telerik.Reporting.Drawing.Unit.Inch(0.29996046423912048D));
            this.textBox3.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.Solid;
            this.textBox3.Style.BorderStyle.Left = Telerik.Reporting.Drawing.BorderType.None;
            this.textBox3.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
            //
            // textBox4
            //
            this.textBox4.Name = "textBox4";
            this.textBox4.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(0.79998695850372314D), Telerik.Reporting.Drawing.Unit.Inch(0.29996046423912048D));
            this.textBox4.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.Solid;
            this.textBox4.Style.BorderStyle.Left = Telerik.Reporting.Drawing.BorderType.None;
            this.textBox4.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
            //
            // pageHeaderSection1
            //
            this.pageHeaderSection1.Height = Telerik.Reporting.Drawing.Unit.Inch(0.30000004172325134D);
            this.pageHeaderSection1.Name = "pageHeaderSection1";
            //
            // detail
            //
            this.detail.Height = Telerik.Reporting.Drawing.Unit.Inch(8.99375057220459D);
            this.detail.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
            this.panel11,
            this.pictureBox1,
            this.table1});
            this.detail.Name = "detail";
            this.detail.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.Inset;
            //
            // panel11
            //
            this.panel11.Bindings.Add(new Telerik.Reporting.Binding("Location", "= Rexroth.Hydraulics.PumpsAndMotors.CalculationPrograms.Leist.Views.Report11.RepositionPanelFactor(Fields.ObjData.Count, ReportItem)"));
            this.panel11.Docking = Telerik.Reporting.DockingStyle.Bottom;
            this.panel11.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(0D), Telerik.Reporting.Drawing.Unit.Inch(7.8937501907348633D));
            this.panel11.Name = "panel11";
            this.panel11.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(6.2677168846130371D), Telerik.Reporting.Drawing.Unit.Inch(1.1000001430511475D));
            this.panel11.Style.BackgroundColor = System.Drawing.Color.Silver;
            this.panel11.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.Inset;           
            //
            // table1
            //
            //this.table1.Anchoring = Telerik.Reporting.AnchoringStyles.Top;
            this.table1.Docking = Telerik.Reporting.DockingStyle.Fill;
            this.table1.Bindings.Add(new Telerik.Reporting.Binding("DataSource", "=Fields.ObjData"));
            this.table1.Bindings.Add(new Telerik.Reporting.Binding("Location", "= Rexroth.Hydraulics.PumpsAndMotors.CalculationPrograms.Leist.Views.Report11.RepositionTableFactor(Fields.ObjData.Count,ReportItem)"));
            this.table1.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(Telerik.Reporting.Drawing.Unit.Inch(0.79998701810836792D)));
            this.table1.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(Telerik.Reporting.Drawing.Unit.Inch(0.79998701810836792D)));
            this.table1.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(Telerik.Reporting.Drawing.Unit.Inch(0.79998701810836792D)));
            this.table1.Body.Rows.Add(new Telerik.Reporting.TableBodyRow(Telerik.Reporting.Drawing.Unit.Inch(0.29996046423912048D)));
            this.table1.Body.SetCellContent(0, 0, this.textBox5);
            this.table1.Body.SetCellContent(0, 1, this.textBox6);
            this.table1.Body.SetCellContent(0, 2, this.textBox7);
            tableGroup1.ReportItem = this.textBox1;
            tableGroup2.ReportItem = this.textBox3;
            tableGroup3.ReportItem = this.textBox4;
            this.table1.ColumnGroups.Add(tableGroup1);
            this.table1.ColumnGroups.Add(tableGroup2);
            this.table1.ColumnGroups.Add(tableGroup3);
            this.table1.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
            this.textBox5,
            this.textBox6,
            this.textBox7,
            this.textBox1,
            this.textBox3,
            this.textBox4});
            this.table1.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(0.067756019532680511D), Telerik.Reporting.Drawing.Unit.Inch(7.2937507629394531D));
            this.table1.Name = "table1";
            tableGroup4.Groupings.Add(new Telerik.Reporting.Grouping(null));
            tableGroup4.Name = "DetailGroup";
            this.table1.RowGroups.Add(tableGroup4);
            this.table1.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(2.39996075630188D), Telerik.Reporting.Drawing.Unit.Inch(0.599920928478241D));
            this.table1.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.Solid;
            //
            // pictureBox1
            //
            this.pictureBox1.Docking = Telerik.Reporting.DockingStyle.Top;
            this.pictureBox1.Bindings.Add(new Telerik.Reporting.Binding("Size", "= Rexroth.Hydraulics.PumpsAndMotors.CalculationPrograms.Leist.Views.Report11.ResizePictureFactor(Fields.ObjData.Count,ReportItem)"));
            this.pictureBox1.Bindings.Add(new Telerik.Reporting.Binding("Value", "=Fields.MyImage"));
            //this.pictureBox1.Bindings.Add(new Telerik.Reporting.Binding("Location", "= Rexroth.Hydraulics.PumpsAndMotors.CalculationPrograms.Leist.Views.Report11.RepositionPictureFactor(Fields.ObjData.Count,ReportItem)"));
            this.pictureBox1.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(0.0067756019532680511D), Telerik.Reporting.Drawing.Unit.Inch(3.9418537198798731E-05D));
            this.pictureBox1.MimeType = "";
            this.pictureBox1.Name = "pictureBox1";
            this.pictureBox1.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(6.1999607086181641D), Telerik.Reporting.Drawing.Unit.Inch(7.1999607086181641D));
            this.pictureBox1.Sizing = Telerik.Reporting.Drawing.ImageSizeMode.Stretch;
            this.pictureBox1.Style.BorderColor.Default = System.Drawing.Color.Maroon;
            this.pictureBox1.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.Solid;
            this.pictureBox1.Style.BorderWidth.Default = Telerik.Reporting.Drawing.Unit.Point(1D);
            this.pictureBox1.Value = "=Fields.MyImage";
            //
            // textBox5
            //
            this.textBox5.Name = "textBox5";
            this.textBox5.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(0.79998695850372314D), Telerik.Reporting.Drawing.Unit.Inch(0.29996046423912048D));
            this.textBox5.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.Solid;
            this.textBox5.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
            this.textBox5.Value = "=Fields.Speed";
            //
            // textBox6
            //
            this.textBox6.Name = "textBox6";
            this.textBox6.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(0.79998695850372314D), Telerik.Reporting.Drawing.Unit.Inch(0.29996046423912048D));
            this.textBox6.Style.BorderStyle.Bottom = Telerik.Reporting.Drawing.BorderType.Solid;
            this.textBox6.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.None;
            this.textBox6.Style.BorderStyle.Right = Telerik.Reporting.Drawing.BorderType.Solid;
            this.textBox6.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
            this.textBox6.Value = "=Fields.Power";
            //
            // textBox7
            //
            this.textBox7.Name = "textBox7";
            this.textBox7.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(0.79998695850372314D), Telerik.Reporting.Drawing.Unit.Inch(0.29996046423912048D));
            this.textBox7.Style.BorderStyle.Bottom = Telerik.Reporting.Drawing.BorderType.Solid;
            this.textBox7.Style.BorderStyle.Default = Telerik.Reporting.Drawing.BorderType.None;
            this.textBox7.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
            this.textBox7.Value = "=Fields.Torque";
            //
            // pageFooterSection1
            //
            this.pageFooterSection1.Height = Telerik.Reporting.Drawing.Unit.Inch(0.2999996542930603D);
            this.pageFooterSection1.Name = "pageFooterSection1";
            //
            // objectDataSource1
            //
            this.objectDataSource1.DataSource = typeof(Reports.MyObjects);
            this.objectDataSource1.Name = "objectDataSource1";
            //
            // Report1
            //
            this.DataSource = this.objectDataSource1;
            this.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
            this.pageHeaderSection1,
            this.detail,
            this.pageFooterSection1});
            this.Name = "Report11";
            this.PageSettings.Landscape = false;
            this.PageSettings.Margins = new Telerik.Reporting.Drawing.MarginsU(Telerik.Reporting.Drawing.Unit.Inch(1D), Telerik.Reporting.Drawing.Unit.Inch(1D), Telerik.Reporting.Drawing.Unit.Inch(1D), Telerik.Reporting.Drawing.Unit.Inch(0D));
            this.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.A4;
            textWatermark1.Text = "Approved";
            this.PageSettings.Watermarks.Add(textWatermark1);
            this.Style.BackgroundColor = System.Drawing.Color.White;
            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.Inch(6.2677168846130371D);
            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
 
        }
Elian
Telerik team
 answered on 09 May 2013
7 answers
165 views
Hi,
I am using telerik trial version an try to create a test report. I spend 3 days to do this but did not success.

My scenario is like:
1) I have a WCF Project called "ReportWCF" which is use to connect mysql database and collect data and return in generic list method say "lstGetOrder".

2) I have another project "ReportLibrary" which contain "OrderReport1.cs" and "OrderList.cs" which is use to hold data returned from WCF call back.

Till now everything is fine.
But before my WCF execution is finished my report viewer is appeared in my Silverlight application. I think but not sure it is for Async call because if I put a break point on the "OrderList.cs" after a while the break point will hit but the blank report already rendered in Silverlight?

I use objectdatasource hear.

**************************************************************

How can I do this to overcome this problem.
I was already tried the "ReportServiceClient" implementation in Silverlight page but there is an error called:
Could not find default endpoint element that references contract 'Telerik.Reporting.Service.SilverlightClient.IReportService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

Use like Report.xaml.cs:
ReportServiceClient IReportServiceClientFactory.Create(System.Uri remoteAddress)
        {
            var binding = new BasicHttpBinding() // or BasicHttpBinding(BasicHttpSecurityMode.Transport) overload if SSL is used
            {
                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);
        }

private void LayoutRoot_Loaded(object sender, RoutedEventArgs e)
{
          ReportServiceClient client = new ReportServiceClient();
}

In this case how to fix the error and how to call WCF method?
and how can I call my wcf method with this "client" proxy object. My WCF method is CreateReport();
I want to use like client.CreateReportCompleted += .........  ;  client.CreateReportAsync();

Can you please send me a sample application to do get data from WCF call back and populate report?

I have see all the sample but unable to understand.
like : http://www.telerik.com/help/reporting/silverlight-report-viewer.html
http://www.telerik.com/help/reporting/silverlight-wcf-service-overview.html
etc.
Please send me solution asap.
Thanks in advance
Chandan
Peter
Telerik team
 answered on 08 May 2013
4 answers
1.1K+ views
Where are Connection Strings stored after adding in Report Designer?

I have searched my local drive after adding a new entry and can't seem to find the config file anywhere.

Thanks
-Justin
Consinco S/A
Top achievements
Rank 1
 answered on 07 May 2013
3 answers
239 views
Hello telerik

According to your examples, you know the location of elements, their values and element count.
But when I create report, I don't know how many columns will be in my report. Usually 20-40 columns.
A piece of code: (I write by hand, to don't copy the entire code)

//by default standard portrait A4
private void BuilderReport(Telerik.Reporting.IReportDocument report)
{
    report.Width = new Unit(Columns.Count * 1.2, UnitType.Inch); // ≈ 20-25 Inch
 
    // ...
     
    foreach (var column in Columns)
    {
        var dataTextBox = new TextBox { /* Size, Location etc */ };
        report.Items["detail"].Items.Add(dataTextBox);
 
        // ...
        var footerTextBox = new TextBox { /* Size, Location etc */ };
        footerTextBox.Value = string.Format(@"=PageExec(""{0}"", Count(Fields.{0}))", column.Name);
 
        // pageFooter is Telerik.Reporting.PageFooterSection
        report.Items["pageFooter"].Items.Add(footerTextBox);
    }
}


Only each first page contains correctly aggregate values, other pages contsins 0
If replace PageFooterSection to Telerik.Reporting.GroupFooterSection all aggregate items is equals 0

How correctly calculate aggregates, when have too many columns and they are transferred on other pages?

Thanks
Stef
Telerik team
 answered on 07 May 2013
1 answer
69 views
Hi
When I publish the report page, It could't show icon in toolbar,but it work fine in my development environment.
Just like attachment.

<system.webServer>
<handlers>
      <add name="Telerik.ReportViewer.axd_*" type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=6.1.12.611, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" path="Telerik.ReportViewer.axd" verb="*"  preCondition="integratedMode,runtimeVersionv2.0"/>
 
</handlers>
</system.webServer>
 
<system.web>
<httpHandlers>
 
    <add path="Telerik.ReportViewer.axd" verb="*" type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=6.1.12.611, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" validate="false"/>
 
</httpHandlers>
</system.web>

 
Stef
Telerik team
 answered on 07 May 2013
1 answer
171 views
I am using Telerik Reporting Q1 2013.  I need to create a crosstable that shows the colums and rows in a specific order.  I cannot use the ascending or descending format.  I am using pre and post data.  Is it possible to specify the order of the row and column data.  I have attached an image of the table that I want to create.  As you can see, I can not order them alphabetically.

Thanks,
Jennifer
IvanY
Telerik team
 answered on 06 May 2013
0 answers
122 views
Hello Telerik,

First of all I am using Q2 2012 version of reporting but I am sure this affects the Q2 2012 SP1 as well. My report is made of a crosstab with a first column which has the following properties enabled : Cangrow, Multiline, TextWrap.
Now the behavior doesn't have any problem when I preview (pic1) the report but when I do the Html rendering (pic2) (which is used in the asp reportviewer it seems) it won't grow normally, some lines will grow a little, others won't grow at all, hiding the text beneath.
So from what I understand, Multiline and Textwrap works well, but Cangrow don't. Also you can see here that the relative size of the text is not the same, being taller in the html rendering, but I can live with that.

Edit : The behavior described above won't apply when the asp ReportViewer is wrapped in an ASP web page, so problem solved.

Thanks in advance for any help,
Cheers.
Jean-Francois
Top achievements
Rank 1
 asked on 06 May 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?