Telerik Forums
Reporting Forum
1 answer
396 views
I have a textbox in the report footer that is summing a decimal field.  How can I get that field to show only two decimal places?  The below does not format at all.

Total Regulated Miles: {Format( "{{0:N2}}", CStr(Sum(Fields.MILES)))}
Elian
Telerik team
 answered on 02 Nov 2012
1 answer
109 views
Hi,

We were recently using the Telerik Reporting from within VS2010 and had our Reporting Solutions in TFS. I could not find anything online that specified if the new stand alone reporting tool is compatible with TFS?

Thanks.
IvanY
Telerik team
 answered on 01 Nov 2012
1 answer
210 views
Hello,

When using the standalone designer with parametrized Reports, it would in some cases be convenient if I could define a "No Data" message. Currently, when the report is empty, it just shows the first page, which is generally OK.

Trouble begins when I use Functions like Iif(Len(Fields.MyField)>0,"/","")) to concatenate Text. These will throw error messages if no rows are returned by the datasource. I could probably code additional conditions explicitly testing for NULL etc. But this can be a bit cumbersome.
What are your strategies to prevent ugly error messages thrown when a report returns no data?

Regards
Erwin
Peter
Telerik team
 answered on 01 Nov 2012
1 answer
89 views
Hi, using telerik reports I would like to apply following logical condition:

= IIf(Fields.MAESTROT.BLINVEHIS.Where(c => c.CA007 == 'A').Count() > 0, 'SI X', 'SI')

How can I do to do this?
Peter
Telerik team
 answered on 01 Nov 2012
1 answer
299 views
Hi.  I'm using Telerik Reporting Q2 2012 in Visual Studios 2010.  I have a report with 5 tables and a chart in the detail section set up in 3 rows of 2 across. All tables and graphs fit well within the page size.  The page settings for the report are: paper size = letter; orientation = Portrait; width 8.5in. and height 11 in.  In the report the detail section size is width = 8.4 in., height 8.3 in.

The report displays fine in the Report Viewer.  When exported to PDF, each page contains only approximately half  of the data width wise, roughly 3.5 inches.  The detail section has PageBreak set to none.

Most of the posts I have read concerning exporting to PDF address the way the export type (PDF; Excel; HTML; etc) deals with pagination.  I understand that HTML and Excel will deal with this differently than PDF which does pagination.  In my case the paging is happening in the mddle of the page, even when the settings should accomodate the entire page.  I don't understand what is making the PDF page half way across the first page. 

Can someone clue me in?  What do I need to do to get this to export thr way it should?

Thanks,
Kevin
Top achievements
Rank 1
 answered on 31 Oct 2012
3 answers
332 views
I'm trying my hand at a custom aggregate class.  The report is bound directly to the datasource, and I put a text box in the report footer using the custom aggregate.  I was expecting the class to be instantiated once and accumulate values like all the examples show.  But in tracing the code execution in VS, I find that a new instance of the class is instantiated for every row in the dataset, meaning that no actual accumlation happens in the Accumulate method. 
The report has two levels of grouping, and I tried moving the text box to the footer of the inner group to see if it was an issue with being on the report footer.  No difference.

Can someone from Telerik please explain this?  Seems like if the function is called at the report level, there should be one instance of the class that accumulates the values for the whole bound data set.  Otherwise, all the code examples you have wouldn't work (i.e. this: http://blogs.telerik.com/blogs/posts/10-04-29/dynamic-sorting-of-reporting-crosstabs-using-a-custom-aggregate-function.aspx ) because the accumulation is actually held in a class level variable.

I'm pretty confused.
Peter
Telerik team
 answered on 31 Oct 2012
1 answer
93 views
Hello,
Good afternoon, I have a report with more than one subreport in the preview is displayed on a single page was not necessary to move between pages when printed and conformed to the number of leaves, when you switch to the version and update the project Control_Panel_Q2_SP1_2012_v6_1_12_820 leave to do so, each subreport shows me every page in subreport properties have active "KeepTogether = True" and subreports are in the area of "reportFooter" I need to have this functionality as I do.

greetings and thanks
IvanY
Telerik team
 answered on 31 Oct 2012
0 answers
141 views
I'm exporting to excel using biff format and I need to implement the below.
1) How do I group ceratin column names and assign a group name to them. This group header name needs to span the columns grouped and appear at the top. Please see my sample excel sheet attached.

2) how do I specify different colors for different columns in the exported excel sheet while exporting to excel in radgrid. I do not want to use html formatting due to excel warning message.

Please help with code.
Attached files
ZR
Top achievements
Rank 1
 asked on 30 Oct 2012
1 answer
105 views

Hi.

I'm using Telerik Reporting Q2 2012.
I want to create a chart which like attached image(chart.png).

Following is DataSource:
YEAR        MARKET            AMOUNT         RATE
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
2005        MARKET_A              38.98       
2005        MARKET_B              326.9       
2006        MARKET_A              48.36          24%
2006        MARKET_B             367.89          13%
2007        MARKET_A              59.13          22%
2007        MARKET_B             476.44          30%
2008        MARKET_A              75.27          27%
2008        MARKET_B             594.79          25%
2009        MARKET_A              92.75          23%
2009        MARKET_B             723.68          22%
2010        MARKET_A              25.15         -73%
2010        MARKET_B             192.56         -73%
I create four chartSeries objects (for two bars and two lines).
And set chart.DataGroupColumn to column "MARKET".

Designer.cs

private void InitializeComponent()
{
    // variable initialize and detail design code
    // ...
    this.chart1.Bindings.Add(new Telerik.Reporting.Binding("DataSource", "= Fields.Data"));
    this.chart1.DataGroupColumn = "MARKET";
    this.chart1.DataSource = this.objectDataSource1;
    this.chart1.Docking = Telerik.Reporting.DockingStyle.Fill;
    this.chart1.IntelligentLabelsEnabled = true;
    this.chart1.Name = "chart1";
    this.chart1.PlotArea.XAxis.AutoScale = false;
    this.chart1.PlotArea.XAxis.DataLabelsColumn = "YEAR";
    // create ChartSeries
    chartSeries1.DataYColumn = "AMOUNT";
    chartSeries1.Name = "Series 1";
    chartSeries2.DataYColumn = "AMOUNT";
    chartSeries2.Name = "Series 4";
    chartSeries3.DataYColumn = "RATE";
    chartSeries3.Name = "Series 2";
    chartSeries3.YAxisType = Telerik.Reporting.Charting.ChartYAxisType.Secondary;
    chartSeries4.DataYColumn = "RATE";
    chartSeries4.Name = "Series 3";
    chartSeries4.YAxisType = Telerik.Reporting.Charting.ChartYAxisType.Secondary;
    this.chart1.Series.AddRange(new Telerik.Reporting.Charting.ChartSeries[] 
    {
        chartSeries1, chartSeries2, chartSeries3, chartSeries4
    });
    // objectDataSource1
    this.objectDataSource1.DataMember = "Data";
    this.objectDataSource1.DataSource = typeof(SFuture.Common.Service.ReportModel);
    this.objectDataSource1.Name = "objectDataSource1";
      
    // Report1 design code
    // ...
}

But it's not work.
Please take a look into the attached image(bad_chart.png).

Any idea?
Thank you for the support!

Elian
Telerik team
 answered on 30 Oct 2012
2 answers
280 views
I am Having a really difficult time with this, it seems like it should be so simple. I wish there were better/more complete examples. It seems a lot of post about this but not a lot of info.

Here is what I am trying to do. I have an aspx page with a report viewer control. I have a simple report built in it's own class that has a SqlDataSource. The SqlDataSorce have one parameter for the record ID. In my aspx page I get a QueryString for the records ID and want to pass it to the SqlDataSource. I have tried both the Report Parameter method and trying to pass straight to the SqlDataSource.

Here is my code in my report that sets the SQL Param:
Public Property Param1() As Integer
        Get
            Return DirectCast(Me.SqlDataSource1.Parameters("@wo_id").Value, Integer)
        End Get
        Set(ByVal value As Integer)
            Me.SqlDataSource1.Parameters("@wo_id").Value = value
        End Set
    End Property

And Here is what I have on my aspx page:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim wo_id As String = Request("wo")
Dim rpt = New WorkRequestRpt()
Dim instanceReportSource = New Telerik.Reporting.InstanceReportSource()
instanceReportSource.ReportDocument = rpt
rpt.Param1 = CInt(wo_id)
Me.ReportViewer1.ReportSource = instanceReportSource 'New WorkRequestRpt()
ReportViewer1.RefreshReport()
End Sub

This is slight different than the examples I saw because I kept getting an error that certain methods were now obsolete.

Every time I open the report it is just blank. I don't know if I need to use the Need_DataSource event or what. Also, do I need some parameter on the report? If I remove the parameter and just have a straight query it work fine. Something is not passing the vale to the SqlDataSource.

A real good example with all of the steps would be great (the video is hard to follow, especially with some of the methods becoming obsolete). I think it would also help a lot of other out.


Thanks,
Craig
IvanY
Telerik team
 answered on 30 Oct 2012
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?