Telerik Forums
Reporting Forum
2 answers
311 views

Hi,

In telerik Report , can i calculate age from DOB that i get for each record in my query.

Is there any datetime functions or formula fields available like in crystal reports for doing above thing?

Please reply me as soon as possible.

Thanks in advance.
Kaushal Shah
Top achievements
Rank 1
 answered on 27 Aug 2009
4 answers
344 views
Hi, guys.

I have the following scenario.

My report has 2 parameters and uses NeedDataSoure event. In this event I get DataTable with my data and assign to DataSource property of the report. On the page where ReportViewer is I have UI for my 2 parameters and a button. Click event of this button assigns parameters for my report.

As the result I see my report but without data bound in details section. DataTable contains data (check while debugging) for sure but not bound. When I hit Refresh, all is fine.

I've seen this schenario in some video tutorial and there in click event handler was a call of ReportViewer.RefreshReport method. But I cannot find this method now in web form ReportViewer for Q2 2009. Is it replaced by some new one?

Please advise.
Steve
Telerik team
 answered on 27 Aug 2009
5 answers
383 views
I am trying to find the best way to pass a parameter to a report in my web app. Here is what I have done so far:

I have built a seperate class that holds my reports called "MyTelerikLib".
I built a report called "DepartmentReport.vb"
I added a SqlDataAdapter to the report called "SqlDataAdapter1"
    I configured the adapter to use an existing stored procedure that has a parameter called "@DepartmentID"
    If I hard code the SqlDataAdapter parameter value it works fine in preview mode
 
I have a webform in my main project with a ReportViewer on it and I assigned  "DepartmentReport.vb" as it's report.
I would like to be able to dynamically add the value to SqlDataAdapter1 during the reports OnLoad event.

I really want to get the parameter from a session variable but Hard Coded it to 7 here to test it.
Here is what I have been trying on the reports webform Page_Load event:
Protected  
 
   
 
Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load   
 
    Dim rv As Telerik.Reporting.Report = New DepartmentReport()   
    rv.ReportParameters("DepartmentID").Value = 7   
    Me.ReportViewer1.Report = rv   
 End Sub   
 
   
AkAlan
Top achievements
Rank 2
 answered on 26 Aug 2009
1 answer
99 views
Hello,
I'm trying to use the Telerik Reporting and I've created a dataset via visual studio 2008.
I've to use an old set of store procedures that have columns name with spaces and . (I know it's an horror, I tried to ask the DBA for a change but no way).
The problem is that Telerik Reporing doesn't like the . in the column name (I receive an out of boundaries exeption) ... is there a way to escape it?
Thanks

Paolo
Milen | Product Manager @DX
Telerik team
 answered on 26 Aug 2009
2 answers
398 views
I have a problem with report generation.  I am currently getting 2 pages with the same data, instead of just one.  There are 2 lines in the report and they appear on page1 and page 2.  There should only be a page 1.  Does anyone know why this is happening?

Thanks in adavance!
Marty Smithhart
Top achievements
Rank 2
 answered on 26 Aug 2009
1 answer
108 views
If I give my report a DataTable with no rows as a DataSource, the web ReportViewer simply displays nothing at all.  I would expect to see at least the report header, date, etc, maybe even labels, but with no detail rows.  Barring this, I would like a message that no data was found, but I can find no properties on the Report or on the ReportView to handle this.  Do I have to do it myself, and create a 'sister report', that looks the same, but has a message, and divert to that one if my DataTable is empty?
Steve
Telerik team
 answered on 26 Aug 2009
1 answer
91 views

I have a requirement to create reports which string together full details of items (accommodation in this case). Here is an example of the content: http://www.housingcare.org/downloads/facilities/generated-brochures/15763-oak-lodge-sutton-england.pdf
i.e. So a report would contain maybe 10 of these, so somethign similar to this http://demos.telerik.com/reporting/product-catalog/demo.aspx.
The one important factor is that the amount of content per item will vary considerably, making the height of each item variable.

Now the crucial point here is layout, and how many items fit per page. All items must neatly fit onto a page (i.e an item cannot overlap onto the next page, if it does a page break is needed). Sometimes a page can fit 3 items per page, sometimes only 1, it depends on the content (which is variable).

Can telerik reporting handle this kind of complexity and automatically create reports which do this not only for display but MOST IMPORTANTLY for printing (the client is obsessed with printing!!!!).

I have already done this bespokely but the client is obsessed with printing and I can no way of programming this kind of complexity in given the variable nature of the heights of each iterm.

Thanks

Steve
Telerik team
 answered on 26 Aug 2009
1 answer
147 views
Hi,

I am developing reports using version 2009 Q2 sp1 through the use of the web report viewer.
I would like to have all my reports that are exported to PDF to have the setting of "FontEmbedding" set to "None".
I know this can be done via the configuration as explained here: http://www.telerik.com/help/reporting/configuring-telerik-reporting.html
My problem is that I can't add this code to the web.config. It is a team decision not to add such code to the configuration files. 
The WinForms version of the ReportViewer has a export event that could probably be used. What about the web ReportViewer?
Is there a work around for this?

Naphtali

 
Steve
Telerik team
 answered on 26 Aug 2009
1 answer
46 views
Is it not possible to set the value of the EmptySeriesMessage?  This code:

chart1.PlotArea.EmptySeriesMessage =

"No data to display.";

 


results in the error:

Property or indexer 'Telerik.Reporting.Charting.ChartPlotArea.EmptySeriesMessage' cannot be assigned to -- it is read only.

Any way to do this?
Thanks.
Dan
Dan
Top achievements
Rank 2
 answered on 25 Aug 2009
1 answer
154 views
Hello,
I've inserted a pie chart inside my report and it does a sum of some percentage....with other reporting tool I was able to set at 0-cost the legend to match the seriesitem portion of the pie... here I'm not able to.. here's the code I use:

 private void chart1_NeedDataSource(object sender, EventArgs e) 
        { 
            Telerik.Reporting.Processing.Chart procChart = (Telerik.Reporting.Processing.Chart)sender; 
 
            List<AccountPositionDetail> accountPositionDetailList = GetAccountPositionDetailFromDataSet(this.DataSource as DataSet); 
            ChartSeries cs = new ChartSeries(); 
            cs.Type = ChartSeriesType.Pie; 
            var groupedAccountPosition = accountPositionDetailList.GroupBy(o1 => o1.ClassMifid); 
 
            chart1.Legend.Clear(); 
            foreach (IGrouping<int, AccountPositionDetail> igp in groupedAccountPosition) 
            { 
                ChartSeriesItem csi = new ChartSeriesItem(igp.Sum(o1 => o1.PercOnCTV)); 
 
               cs.Items.Add(csi); 
 
            } 
            chart1.Series.Add(cs); 
 
 
        } 

I've got only a legend Item called "Series XX"... in other chart type (BAR for example) I add different Series and it show...here not...any suggestion?

I've also found this enumerator, but I don't know where to set it : ChartSeriesLegendDisplayMode.ItemLabels;

Thanks
Schlurk
Top achievements
Rank 2
 answered on 25 Aug 2009
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?