Telerik Forums
Reporting Forum
3 answers
667 views
Hi Team,
I am using Telerik Version 2014 Q1. I wanted to Show some data along with Line Chart in Telerik Reporting. My main concern is to generated PDF file for Export option. Now I have Line Chart in the Reporting. But I am unable to draw the Lines over the chart. Can you please provide me some stuffs or guide to generate Line chart on Reporting. My output has to come as below attached image shows.

my requirement is based on Hit Counter on each Page of our website. Which are all the pages has got number of hits daily. we are generating this data for last week (any past 7days) & any past one month (any past 30 days).

X axis should be Number of Hits
Y axis should be dates (either 7 days or 30 days)
Lines should be drawn for each page.

I am binding the data from database (please refer the attached image) to the list & am looping it with ChartSeries and its ChartSeriesItem.

Please help me out, how to generate the Line Chart in Reporting(from C# code behind) with lines for each pages(items). Let me know if required any more information from my side.


Clarify me - for line chart which we need to use "ChartSeries" or "LineChartSeries"


thanks lot in advance your input.

Ivan Hristov
Telerik team
 answered on 21 Jan 2015
3 answers
1.4K+ views
Hi,  
     I use stored procedures and sql queries to get data for my report parameters and the report data. The idea is to let user select from dropdown values and filter the required data. In one of the html styled text box, I need to present the user selected multi-values of a dropdown...

I used this..

Schools: {Join('; ', Parameters.SchoolNames.Value)}

that just works fine....

But the problem is the parameter values some times may contain '&'.. Thats throwing me an error.. Then I realised that I have to escape it for HTML Text box....

How can I do this in my scenario.. I have tried, the following with no luck..

Schools: {Join('; ',Replace(Parameters.SchoolNames.Value,'&','&'))}     







Nasko
Telerik team
 answered on 20 Jan 2015
4 answers
262 views
The Telerik provided example for the report viewer style is below.
<style>
#reportViewer1 {
position: absolute;
left: 5px;
right: 5px;
top: 120px;
bottom: 5px;
overflow: hidden;
font-family: Verdana, Arial;
}
</style>

The question is, how can the report viewer use relative pathing? No matter how the style is changed, the report will disappear if not exactly as above.
Stef
Telerik team
 answered on 20 Jan 2015
3 answers
194 views
Hello,

I want to define the scale of the y-axis dynamically based on my data source. My current implementation uses the ItemDataBound event from the graph-object. It is the earliest moment, when the data are bound to the subreport. At this moment the scale is not properly set.

var dataItem = (Telerik.Reporting.Processing.DataItem)sender;
var list = dataItem.DataSource as IList<InclinationProfileItemModel>;
 
if (list == null) return;
 
list = new List<InclinationProfileItemModel>(list.OrderBy(l => l.InclinationInDistanceUnitToStart));
var minY = list.First().InclinationInDistanceUnitToStart;
var maxY = list.Last().InclinationInDistanceUnitToStart;
var inclMax = Math.Abs(maxY - minY);
 
if (inclMax < 1)
    this.UnitToStartLineSeriesGraphAxisY.Scale = new NumericalScale
    {
        MajorStep = 0.25,
        MinorStep = 0.25,
        Minimum = Math.Min(0, Math.Floor(minY)),
        Maximum = Math.Max(1, Math.Ceiling(maxY))
    };
else if (inclMax < 5)
    this.UnitToStartLineSeriesGraphAxisY.Scale = new NumericalScale
    {
        MajorStep = 1,
        MinorStep = 1,
        Minimum = Math.Min(0, Math.Floor(minY)),
        Maximum = Math.Max(1, Math.Ceiling(maxY))
    };
else if (inclMax < 20)
    this.UnitToStartLineSeriesGraphAxisY.Scale = new NumericalScale
    {
        MajorStep = 5,
        MinorStep = 5,
        Minimum = Math.Min(0, Math.Floor(minY)),
        Maximum = Math.Max(1, Math.Ceiling(maxY))
    };
else
    this.UnitToStartLineSeriesGraphAxisY.Scale = new NumericalScale
    {
        MajorStep = 10,
        MinorStep = 10,
        Minimum = Math.Min(0, Math.Floor(minY)),
        Maximum = Math.Max(1, Math.Ceiling(maxY))
    };

How can I solve my problem? Is there a way to set the properties of NumericalScale to an earlier moment? Any other solution for dynamically define a NumericalScale? Binding?

Best regards,
Roland
Nasko
Telerik team
 answered on 20 Jan 2015
1 answer
516 views
I'm looking for a Reporting Sample from a C# Object where the Datasource for a report is a generic collection of say a Sales Class.
Just a couple of fields on a report is all I'm looking for. Is there any sample code out there on this site that can help me.
Thanks

--Pat Brown
Nasko
Telerik team
 answered on 20 Jan 2015
1 answer
188 views
Hi
I noticed that when I use Reportviewer with Clientmode=Static, the toolbar's history-back button doesn't work correctly anymore. Instead of navigating to the previous page, it now shows the print-dialog.
Telerik, can you check this. Is this a bug or am I doing something wrong?

Note, I use Telerik Reporting 2014Q3 version 8.2.14.1204

Best regards,
Frank
Stef
Telerik team
 answered on 20 Jan 2015
1 answer
119 views
I have a NavigateToReportAction assigned to a TextBox in a GroupHeaderSection of my report. In the code I assign the DataSource of my ReportSouce to this.DataSource. This works locally but the SubReports is blank on the testing server.

I am running an out-of-proc session. I made changes for other DataSource assignments to account for this but, no matter what I try, I can't seem to bind the NavigateToReportAction DataSource.

Here's what I have right now:

public ParentReport()
{
    InitializeComponent();
    ItemDataBinding += ReportDataBinding;
}
 
public void ReportDataBinding(object sender, EventArgs e)
{
    var processingReport = (Telerik.Reporting.Processing.Report)sender;
    var report = (Telerik.Reporting.Report)processingReport.ItemDefinition;
    GroupHeaderArea2 = (Telerik.Reporting.GroupHeaderSection)report.Items.Find("GroupHeaderArea2", true)[0];
    GroupHeaderArea2.ItemDataBinding += AssignSubReportDataSource;
}
 
public void AssignSubReportDataSource(object sender, EventArgs e)
{
    Telerik.Reporting.Processing.GroupSection groupSection = (Telerik.Reporting.Processing.GroupSection)sender;
    Telerik.Reporting.Processing.TextBox txtName = (Telerik.Reporting.Processing.TextBox)groupSection.ChildElements.Find("txtName", true)[0];
    NavigateToReportAction action = (NavigateToReportAction)((Telerik.Reporting.TextBox)txtName.ItemDefinition).Action;
    InstanceReportSource subReportSource = (InstanceReportSource)action.ReportSource;
    ((Telerik.Reporting.Report)subreportSource.ReportDocument).NeedDataSource += subReport_NeedDataSource;
}
 
protected void subReport_NeedDataSource(object sender, EventArgs e)
{
    ((Telerik.Reporting.Processing.Report)sender).DataSource = this.DataSource;
}

I have tried to use a Binding in my SubReport to assign the DataSource as suggested in:
http://www.telerik.com/forums/how-to-bind-the-datasource-of-a-subreport-in-the-designer.

If anyone has any tips on how to do that properly that would be helpful. Any insight is appreciated as I have been working on this issue for a while. Again, this is working locally, but not on the server.

Thanks!
Hinata
Top achievements
Rank 1
 answered on 20 Jan 2015
4 answers
664 views
Following the documentation here:
http://www.telerik.com/help/reporting/designing-reports-parameters-using-multivalue-parameter.html

It says, "In order to have multiple values selected, you should set the Value property of the parameter to an IEnumerable instance containing the desired values. This can be done using the code behind or an expression."

My question is:  How do you specify one or more default values using an "expression"?


Thanks - Wayde
KS
Top achievements
Rank 1
 answered on 20 Jan 2015
5 answers
389 views
Is there a way to remove the <select all> option in a multi-value report parameter?
Stef
Telerik team
 answered on 20 Jan 2015
1 answer
95 views
Hi
Is there any way to add many documents (each one may be from a different report) into a Report Viewer?

Best regards
Tasos Sarris
Nasko
Telerik team
 answered on 19 Jan 2015
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?