Telerik Forums
Reporting Forum
4 answers
150 views
If I start a new project and add a Telerik Report to it, then try and view the Report Wizard, I get the following two message boxes, one after another:

An error occurred while processing this command.

Object reference not set to an instance of an object.


And then:

Object reference not set to an instance of an object.

What is causing this? I can't access the Report Wizard at all.

Petio Petkov
Telerik team
 answered on 20 Jul 2012
5 answers
99 views
Hi,

Nowadays I'm using another trademark of .NET components where I want to implement a specific scenario that I cannot do with them. So, I turned to you to know if with Telerik components can do it or not.

I want to implement Self-Hosted Reporting WCF Service using File Session State Provider using .NET 3.5 SP1 and after reading the documentation I think that is possible but I prefer to confirm!. Can I do this?

Thanks,
Gorka.
Peter
Telerik team
 answered on 20 Jul 2012
2 answers
276 views

Hello,

I am using C# and Asp.NET in the issue described below.

I have a Website which I access to using the following Url: http://localhost:8349.

This Website has the following folder at its root level: Reporting
Reporting folder hosts another folder: Reports
Finally, Reports also hosts a folder: Styles

The Styles folder contains one file called Style.xml. This file is a Stylesheet that I got by exporting the Style set on a previously existing report. Its build action is set to Content and its Copy to Output Directory is set to Do not copy.

Inside the Reports folder, I have a Telerik report called Report1.cs. It has a single textbox with its StyleName property set to a value from within the Style.xml. The report itself has one External StyleSheet that corresponds to the file in the Styles folder. The Kind is set to Relative.

At the root level of my Website I have an aspx page called MyReport.aspx. It contains a single report viewer. In the Page_Load method of the page, I have the following code:

Report1 report = new Report1();
ReportManagementViewer.Report = report;

All namespaces are correctly added.

There is no other files or folders except those created by default by Visual Studio. I am using all default settings for the files, project and the solution as well as Visual Studio.

When I open the report in the designer mode, the style I want is correctly applied. When I run the Website and access to MyReport.aspx (http://localhost:8349/MyReport.aspx), the style is also correctly applied.

Now, in the Reporting folder I create a new aspx Webform called MyReport.aspx. This page also has a single report viewer as its only component and its Page_Load method contains the same code as above. All namespaces are correctly added.

When I open the report in designer mode, my style is still correctly applied. But when I access this new page (http://localhost:8349/Reporting/MyReport.aspx) the style is ignored. In Visual Studio, if I open Report1.Designer.cs and I change the following line:

this.ExternalStyleSheets.Add(new Telerik.Reporting.Drawing.ExternalStyleSheet("Reporting\\Reports\\Styles\\Style.xml"));

to this

this.ExternalStyleSheets.Add(new Telerik.Reporting.Drawing.ExternalStyleSheet("..\\Reporting\\Reports\\Styles\\Style.xml"));

I can correctly see my style applied when I access the report from the second Url. But when I want to access the report from the designer in Visual Studio it crashed with the following error message:

"The service Telerik.Reporting.Design.Interfaces.IRootDesignerPresenter already exists in the service container. Parameter name: serviceType"

If I try to update the same line of code to this:

if (!DesignMode)
{
    this.ExternalStyleSheets.Add(new Telerik.Reporting.Drawing.ExternalStyleSheet("..\\Reporting\\Reports\\Styles\\Style.xml"));
}
else
{
    this.ExternalStyleSheets.Add(new Telerik.Reporting.Drawing.ExternalStyleSheet("Reporting\\Reports\\Styles\\Style.xml"));
}

it crashes with the following error message:

"The designer cannot process the code at line 64: [the whole code above] The code within the method 'InitializeComponent' is generated by the designer and should not be manually modified. Please remove any changes and try opening the designer again".

If I run the application and try to access the page hosting my report in the sub-folder, the style is correctly applied.

I've also tried to prefix the path to the Style in the designer.cs with ~ or use the Style as a resource but in both cases it ends up working whether in the designer or in the live application but never for both at the same time.

My question:

How can I access to a report with an External Style Sheet both in the live application and in the designer when the ASPX page hosting the report viewer is not located at the root level of my Website?

Thanks for your help

Additional information:
- Visual Studio 2010 SP1 and .NET 4
- Windows XP SP3. Regional settings; English (United States). Same for the language.
- Version of Telerik Reporting: 6.0.12.215. This is also the version of Telerik reporting used by the original report from which the style has been extracted.
- Browser: Internet Explorer 8.0.6001.18702
- I don't use any external plugin except Telerik Reporting and RadControls for Silverlight (not used in this project). ReSharper is installed on my machine but not activated. No NuGet or other stuffs like that. No customization of any kind in Visual Studio.
Guillaume
Top achievements
Rank 1
 answered on 20 Jul 2012
4 answers
185 views
Hi,

I have been using Telerik Reporting for the past couple of years. I upgraded my applications to use Q2 2012 and as a result some of the functionality that I had in place no longer works and I can't find a working alternative.

Structure:

- Master report with 3 subreports.
- Each subreport has a chart
- I set the chart series in the Page_Load event of the ASPX page that renders the report

Problem:

This doesn't work anymore - the Items collection for the SubReport is always empty. Before upgrading to Q2 2012 this worked fine.
// Get the chart from the subreport
    var individualContributionsReportChart = (Telerik.Reporting.Chart)individualContributionsReport.ReportSource.Report.Items["labelsGroupHeader"].Items["chart1"];


Code Example (I stripped out application logic that has nothing to do with the reports):
protected void Page_Load(object sender, EventArgs e)
{
    if (IsPostBack)
    {
        TotalContributionsOverviewReport report = new TotalContributionsOverviewReport();
 
        var individualContributionsReport = ((Telerik.Reporting.SubReport)(report.Items["reportFooter"].Items["IndividualContributionsSubReport"]));
        GetIndividualContributionsChart(individualContributionsReport, startDate, endDate, categoryNameFilter, categoryIdFilter);
 
        ReportViewer1.Report = report;
    }
}
 
private void GetIndividualContributionsChart(Telerik.Reporting.SubReport individualContributionsReport,
            DateTime startDate, DateTime endDate, string categoryNameFilter, string categoryIdFilter)
{
    // Get the chart from the subreport
    var individualContributionsReportChart = (Telerik.Reporting.Chart)individualContributionsReport.ReportSource.Report.Items["labelsGroupHeader"].Items["chart1"];
 
    // Get the chart data
    var records = PersistenceFactory.GetRecords();
 
    var categoryGroups = records.GroupBy(r => r.CategoryName);
    foreach (var g in categoryGroups)
    {
        // Create a ChartSeries and assign its name and chart type
        ChartSeries chartSeries = new ChartSeries();
        chartSeries.Name = g.Key;
        chartSeries.Type = ChartSeriesType.Line;
        // add new items to the series,
        // passing a value and a label string
        foreach (var c in g)
        {
            ChartSeriesItem item = new ChartSeriesItem()
            {
                XValue = c.ContributionDate.ToOADate(),
                YValue = Convert.ToDouble(c.Amount)
            };
            chartSeries.Items.Insert(chartSeries.Items.Count, item);
        }
 
        // add the series to the Chart Series collection
        individualContributionsReportChart.Series.Add(chartSeries);
 
        // format the chart axis
        FormatChartAxis(individualContributionsReportChart, startDate, endDate, step);
    }
}

Aaron
Top achievements
Rank 1
 answered on 19 Jul 2012
3 answers
554 views
hi telerik team,

I'm using telerik reports for time sheet report,

in that report we have total hours column for particular task,

we need to display sum of the total hours column.

Employee Name
  Task-1     3.30
  Task-2     4.00
  Task-3     5.50
              --------------
                  13.20 hrs


please provide me sum calculation for sum of fields

Thanks in advance
Malcolm
Top achievements
Rank 1
 answered on 19 Jul 2012
2 answers
199 views
Hi, Telerik Team.
I have a following definition for my XAxix:

defChart.PlotArea.XAxis.DataLabelsColumn = "DoubleDateTime"; 
defChart.PlotArea.XAxis.IsZeroBased =
false;
defChart.PlotArea.XAxis.AutoScale = true;
defChart.PlotArea.XAxis.Appearance.ValueFormat = ChartValueFormat.LongDate;
defChart.PlotArea.XAxis.Appearance.CustomFormat = "dd HH:mm";
defChart.PlotArea.XAxis.LayoutMode = ChartAxisLayoutMode.Inside;

The DateTime objects was converted to ToOADate().

The data source is something like this:
Date             Value
2012-07-11 09:40 22
2012-07-11 09:41 15
2012-07-11 09:43 16
2012-07-11 09:43 17
2012-07-11 09:44 16

Note that, the 09:42 is missing and I have duplicate value to 09:43.

So, I have  problem to show a timeline for DateTime in XAxi (a timeline with one entry for each minute).
I realy need include into data source a entry to 09:42 and agregate the 09:43, to obtain a timeline?

Thanks
Giuliano Caetano
             


Giuliano Caetano
Top achievements
Rank 1
 answered on 19 Jul 2012
1 answer
483 views
Hello,

I followed the wizzard and made no changes to the report layout besides what the wizzard did and when I export to Excel there are two extra blank rows between every row of data.  What is causing this?

The report has a labels group header and detail...

How to avoid blank rows? Its urgent.

Thank you
Jayanthi

IvanY
Telerik team
 answered on 19 Jul 2012
1 answer
369 views
I am settings multiple textboxes text from code file.The textboxes are arranged vertically.The textboxes working fine when there is small text is set but when large strings are set the spaces between textboxes increase to much actually the height of textboxes increases so it looks that  like spaces between two textboxes increases which is not looks good.Is there any possible solution for this?
I  already set CanGrow and CanShrink property to true but didn't get the result i want. 
for example:-

With Small texts

StudentName : john,sarah,William
Subject: Science, Maths,English


With large text

StudentName : john,sarah,William,
                         j....jjj..j..
                         j....fafafakuk.,kffkdgkf
                         f gdfg/gsgsg.sgsg.sg
                        gsgsdg


Subject: Science, Maths,English 
Hrisi
Telerik team
 answered on 19 Jul 2012
7 answers
487 views
Is there a way I can embed the Telerik Report viewer and not have it conform to the in-built paging. In simple words have all the pages of the report extend down the viewer in the webpage. Meaning not getting a Page by Page output.
Elian
Telerik team
 answered on 19 Jul 2012
1 answer
213 views
How do I filter charts using Report parameters? Do you have any sample project? I am new to telerik reporting.. :(.. Please help me to create chart and filter using report parameters..
Peter
Telerik team
 answered on 19 Jul 2012
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
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?