Telerik Forums
Reporting Forum
1 answer
180 views
hi

How to design report with lines according to row and column
i am getting an  alignment problem.  it not properly align
please give me the solution ASAP.

Regards

Rahul k



Steve
Telerik team
 answered on 10 Jan 2009
1 answer
131 views

 

 

 

Hello,

I have a weird problem while displaying my image in "detail" section.
I have a specific routine to display my images in a column mode.

I pick up all data via a Web Service.
I display correctly information in the header section.

So when it comes to display pictures in the detail section here it bugs. For example if my dataset returns 2 images or more, i can see my orginal images duplicated many times. 

Example 1 (with 1 image):
Image1    --> It works fine with one image

Example 2 (with 2 images):
Image1    Image2
Image1    Image2    --> here's the error. These images shoudln't be displayed

Example 3 (with 3 images):
Image1    Image2    Image3
Image1    Image2    Image3 --> here's the error. These images shoudln't be displayed
Image1    Image2    Image3 --> here's the error. These images shoudln't be displayed also! 

Any help would be appreciated

Thank you

Paul


Here's my code:

 

namespace

 

PO_Tracking_Report.Production

 

{

 

using System;

 

 

using System.ComponentModel;

 

 

using System.Drawing;

 

 

using System.Windows.Forms;

 

 

using Telerik.Reporting;

 

 

using Telerik.Reporting.Drawing;

 

 

using System.Data;

 

 

/// <summary>

 

 

 

 

 

/// Summary description for Report1.

 

 

 

 

 

/// </summary>

 

 

 

 

 

public partial class rptSpecsHeader : Telerik.Reporting.Report

 

 

 

 

{

 

private

 

int _SpecsHeaderId;

 

 

private int _RevisionNumber;

 

 

private int _NumberOfColumn;

 

 

public int SpecsHeaderId

 

{

 

get

 

 

 

 

{

 

return _SpecsHeaderId;

 

}

 

set

 

 

 

 

{

_SpecsHeaderId =

value;

 

}

}

 

public int RevisionNumber

 

{

 

get

 

 

 

 

{

 

return _RevisionNumber;

 

}

 

set

 

 

 

 

{

_RevisionNumber =

value;

 

}

}

 

public int NumberOfColumn

 

{

 

get

 

 

 

 

{

 

return _NumberOfColumn;

 

}

 

set

 

 

 

 

{

_NumberOfColumn =

value;

 

}

}

 


public

 

void ExecuteReport()

 

{

 

// -----------------------------------------------------------------------------------

 

 

// Specs Header & Color

 

 

// -----------------------------------------------------------------------------------

 

 

DataSet ds = new DataSet();

 

PO_Tracking_WS.

Service v_service = new PO_Tracking_WS.Service();

 

ds = v_service.GetProductionSpecsColor(

this.SpecsHeaderId, this.RevisionNumber);

 

 

this.DataSource = ds;

 

 

float v_max_width = 50;

 

 

float v_space_x = 10;

 

 

float v_space_y = 10;

 

 

float v_position_x = 0;

 

 

float v_position_y = 0;

 

 

this.UnitOfMeasure = UnitType.Pixel;

 

 

this.txtSpecsColorId.Visible = true;

 

 

int v_counter = 0;

 

 

foreach (DataRow dataRow in ds.Tables[0].Rows)

 

{

v_counter = v_counter + 1;

 

this.txtSpecsColorId.Value = "Number of images = " + v_counter.ToString();

 

Telerik.Reporting.

PictureBox v_picture = new Telerik.Reporting.PictureBox();

 

v_picture.Sizing = Telerik.Reporting.Drawing.

ImageSizeMode.AutoSize;

 

v_picture.Value = dataRow[

"Path"].ToString();

 

v_picture.Visible =

true;

 

 


v_picture.Left = (Telerik.Reporting.Drawing.Unit.Pixel(v_position_x));

 

v_picture.Top = (Telerik.Reporting.Drawing.

Unit.Pixel(v_position_y));

 

if ((v_position_x + v_picture.Width.Value + v_picture.Left.Value) <= v_max_width)

 

{

v_position_x = v_space_x + v_picture.Width.Value + v_picture.Left.Value;

v_position_y = v_position_y;

}

 

else

 

{

v_position_x = 0;

v_position_y = v_space_y + v_picture.Height.Value + v_picture.Top.Value;

}

detail.Items.Add(v_picture);

}

 

 

 

 

}

 

public rptSpecsHeader()

 

{

 

/// <summary>

 

 

/// Required for telerik Reporting designer support

 

 

/// </summary>

 

InitializeComponent();

 

//

 

 

// TODO: Add any constructor code after InitializeComponent call

 

 

//

 

 

// Only for test

 

 

this.NumberOfColumn = 3;

 

 

this.RevisionNumber = -1;

 

 

this.SpecsHeaderId = 13083;

 

 

this.ExecuteReport();

 

}

 

}

}

Steve
Telerik team
 answered on 10 Jan 2009
1 answer
290 views
Hi all,

It's the first time to use telerik reports, I want to realize a simple vertical histogram and the histogram has no use for binding the database. In other words, I want to the vertical histogram display special data from calcuate but not through SQL language. I have refer to the demo from "Reporting Q3 2008 Exmple", but I have no idea. In addition, the title shoud be change, for example, "10% Growth", "10%" can change according the data.

 

If there is a live example please send me link, either please help.

Thanks

Steve
Telerik team
 answered on 09 Jan 2009
3 answers
177 views
We can use UserFunctions in reports, which is static function defined on same report if I understand it correctly. Now what if I want to use same function that is in some library class in more then one report?

Also, have you considered allowing use of instance members of report?

Thx in advance.

Daniel
Svetoslav
Telerik team
 answered on 08 Jan 2009
1 answer
103 views
Hello, I have to create a report that has so many conditions that can´t make it in the traditional way.
I was wondering if there is a way with telerik reporting to make a report with for example a html lenguaje, so I can make all the report programaticaly, with the structure I need.

If I can´t do that, how can I modify the columns the columns of the report programaticaly?

Any help will be great.
Thanks
Steve
Telerik team
 answered on 08 Jan 2009
1 answer
223 views
On the 2008 Q2 release I had a couple reports made where I had a vertical list of text boxes.  Occasionally the text boxes would need to be hidden, and everything below them moved up into their place.  I set the box visible property to false programmatically and everything below it would move up to where it should automatically.  Now I've installed the Q3 sp1 release and the formatting has gone crazy.  When a textbox or other control is set to invisible everything moves up to far to compensate and it's overlapping other items above it.  Am I the only one noticing this issue?

Steve
Telerik team
 answered on 08 Jan 2009
3 answers
127 views

Hi iam trying to do the below but it doesnt work

Should i use something else that detailsection ?


 

        private void groupFooterSection1_ItemDataBound(object sender, System.EventArgs e)  
        {  
            Telerik.Reporting.Processing.DetailSection  procDetail = sender as Telerik.Reporting.Processing.DetailSection;  
            DataRowView dataRowView = (DataRowView)procDetail.DataItem;  
            if ((decimal)dataRowView["calculation_bruttoAvance"]==0)  
            {  
                Telerik.Reporting.Processing.TextBox procTxtColor = procDetail.Items["lbBrutto"] as Telerik.Reporting.Processing.TextBox;  
                Telerik.Reporting.Processing.TextBox procLblColor = procDetail.Items["txtBrutto"] as Telerik.Reporting.Processing.TextBox;  
                procTxtColor.Visible = false;  
                procLblColor.Visible = false;  
            }  
        } 

Steve
Telerik team
 answered on 07 Jan 2009
1 answer
159 views
Hi!

First, I apologize if I don't write something well. I installed the Visual Studio in spanish, so maybe I don't know "the name of the things" in english.

I converted a CrystalReports with the Telerik Report Wizard. Everything looks well, more or less. But in the preview I got the message "The source of the report definition has not been specified". In CrystalReport I had the datasource specified; so, my first question is... why was it missed in the conversion? Anyway, I went to the designer, I opened the "datasource" property of the Telerik.Reporting.report, and I clicked in the "Add Project Datasource" link. At the end, I can see my DataSet in the Solution Explorer. It looks ok, cause if I see the Dataset designer and I have a look of the data in "Data See Preview", it's perfect.

My problem is, when I finish creating the datasource, I can't choose it in the datasource list, even if I made it with the "Add Project Datasource" link of that property.

Thanks a lot for your attention.
Steve
Telerik team
 answered on 07 Jan 2009
1 answer
165 views
Does your pie chart support a 'collected' or 'other' slice and if so, how do you implement it?

A lot of the pie chart components out there support the concept of an 'other' slice which allows you to rollup values in a a single slice.  For eaxmple, the first 4 slices in a pie chart may represent 90% of the data, while the remaining 10% of the data would take up many tiny slices, which would just clutter up the graph and legend - in this case, it is best to use a 'collected' or 'other' slice to rollup the rest of the data.

Thanks,
Kevin
Steve
Telerik team
 answered on 07 Jan 2009
1 answer
151 views
Hi

I have reports which all have the SAME Setup_Report routine
eg. to determine the visibility of report items, groups etc.
(This routine is called in the NEW constructor)

Example:
-------------------------
Public Sub New()
    InitializeComponent()
    Me.Setup_Report()
End Sub
Public Sub Setup_Report()
        If Me.ReportParameters("Group1").Value = eGroup.None Then
            ' No grouping, so clear Groups
            Me.Report.Groups.Clear()
            Me.TextBoxGroupTitle.Visible = False
-------------------------
This works fine, but I want to move the setup routine
to a Public class so that I can keep all the common code in one place

Example.
-------------------------
IN THE REPORT....
-------------------------
Private Shared myFunc As New MyFunctions    ' Global Functions
Public Sub New()
    InitializeComponent()
    myFunc.Setup_Report(Me)
End Sub
-------------------------
IN A GLOBAL.VB ...
-------------------------
Public Class MyFunctions
    Public Sub Setup_Report(ByVal Report As Telerik.Reporting.Report)
            MyReport.ReportParameters.Add("CompanyName", ReportParameterType.String, "Bloggs Limited")
            Dim TextBoxGroupTitle As TextBox = Report.Items("TextBoxGroupTitle")
            TextBoxGroupTitle.Visible = False
-------------------------
In the example above
1) The ReportParameters.Add works
2) The reference to the textbox fails with exception "object reference not set"

Your help greatly appreciated, as this would save massive duplication of setup code....

Kind Regards

Martin
Martin
Top achievements
Rank 1
 answered on 07 Jan 2009
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?