Telerik Forums
Reporting Forum
3 answers
146 views
I am trying to format the YAxis and YAxis2 scale as a percentage on a Stacked Bar 100 chart object and it is not working as expected.  I am applying the Office 2007 skin to the chart and trying to set the custom formatting after the InitializeComponent method.

Here is my source code:

this.compareCityAvgReport.PlotArea.YAxis.AutoScale = false;
this.compareCityAvgReport.PlotArea.YAxis.LabelStep = 1;
this.compareCityAvgReport.PlotArea.YAxis.AddRange(0, 100, 10);
this.compareCityAvgReport.PlotArea.YAxis.Appearance.ValueFormat = Telerik.Reporting.Charting.Styles.ChartValueFormat.Percent;
this.compareCityAvgReport.PlotArea.YAxis.Appearance.CustomFormat = "#%";
 
this.compareCityAvgReport.PlotArea.YAxis2.Visible = Telerik.Reporting.Charting.Styles.ChartAxisVisibility.True;
this.compareCityAvgReport.PlotArea.YAxis2.AutoScale = false;
this.compareCityAvgReport.PlotArea.YAxis2.AddRange(0, 100, 10);
this.compareCityAvgReport.PlotArea.YAxis2.Appearance.Color = System.Drawing.Color.Black;
this.compareCityAvgReport.PlotArea.YAxis2.Appearance.ValueFormat = Telerik.Reporting.Charting.Styles.ChartValueFormat.Percent;
this.compareCityAvgReport.PlotArea.YAxis2.Appearance.CustomFormat = "#%";

I aslo want to get rid on the 2.5 increment marker and just have the 10 increment maker in the report.  I have marked up the image attached to this post with what I want to accomplish.
Elian
Telerik team
 answered on 04 Jan 2013
18 answers
399 views
I have an issue with printing a report book.  All the reports in the reportbook have an orientation of landscape, however, when you go to print, it always prints out portrait.  Yes, I can go into the print dialog and change it manually to landscape, but I don't consider that a good option for my customers.

If I pass to the report viewer one report only, the page settings are respected and the report prints correctly.  For a report book, the page settings are null, so when printing it doesn't know to print in landscape.

I really like your reportbook option, but frankly, with this problem, it really makes the option of using a report book unusable and sometimes subreports aren't a good option.  I'm really hoping there's something I'm missing here, because otherwise, I have to set up individual reports where really only one report is wanted and needed.
Steve
Telerik team
 answered on 03 Jan 2013
4 answers
1.2K+ views
When I dbl-click a report to open it in the designer, I am getting an error:

To prevent possible data loss before loading the designer, the following errors must be resolved:
Value cannot be null. Parameter name: instance
Instances of this error (1)
1.
at System.ComponentModel.TypeDescriptor.AddAttributes(Object instance, Attribute[] attributes)
at Microsoft.VisualStudio.Design.VSDesignSurface.CreateDesigner(IComponent component, Boolean rootDesigner)
at System.ComponentModel.Design.DesignerHost.AddToContainerPostProcess(IComponent component, String name, IContainer containerToAddTo)
at System.ComponentModel.Design.DesignerHost.PerformAdd(IComponent component, String name)
at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)

What does this mean and how do I fix it?
Thanks, Simon
Peter
Telerik team
 answered on 03 Jan 2013
0 answers
201 views
I have a report with the following layout

PageHeader
GroupHeader - Repeat on every page
  - SubReport
DetailsSection
  - Table1
  - Table2
  - Table3
PageFooter


The subreport was sitting above Table1 within the DetailsSection, but I needed it to repeat on every page so it was moved to a GroupHeader with Expression "= True" with no databinding so that it will always group the report.  The report is not databound, but Table1, Table2 and Table3 are bound to their own datasources. 

My problem now is that my even pages are blank and I'm assuming a page break is being inserted before the GroupHeaders as this was not happening when the SubReport was in the detailSection.

The Keep Together is set to FALSE and PageBreak is set to NONE.

Is there any tricks that I can do to find out what issue is causing the pageBreak.


--------------------------------------------
Nevermind - The issue was with my table width exceeding the page width.    All is right with the world.
Steven
Top achievements
Rank 1
 asked on 02 Jan 2013
3 answers
417 views
Hi, I'm trying to figure out if it's possible to conditionally change the ReportSource of a Subreport in my Detail section. So, based on some value in my main datasource, I want to display a different report as the subreport.

So my thought was to wire up the ItemDataBound event of the detail section, check the value, get a reference to the subreport and set the ReportSource to the appropriate one based on the value. Like this ...

private void detail_ItemDataBound(object sender, EventArgs e)
{
    var item = sender as ReportItemBase;
    var foo = ((string)item.DataObject["Foo"]);
    var subReport = item.ChildElements.Find("SubReport1", true).FirstOrDefault() as SubReport;
 
    if (foo== "Bar") {
        var fooReport = new FooReport();
        subReport.ReportSource = fooReport;
    } else {
        // etc...
    }
}

The problem is that the SubReport that I can cast to from the item.ChildElements.Find() call is a Telerik.Reporting.Processing.SubReport. That class does not allow setting the ReportSource property. But it won't let me cast to a Telerik.Report.SubReport which is what I need to set the ReportSource. So is this even possible? If not, is there another recommended approach for this type of scenario?

Thanks,
Kevin
Steven
Top achievements
Rank 1
 answered on 02 Jan 2013
3 answers
273 views
Hello, 
I am trying to create a template that will serve as the base for all the reports in our application. So far I have created a reports for each section. ex layout is as follows.

page header 
report header
body - this will vary depending on the report.
report footer
page footer

each of these is its own report that I wish to call from a master template that has blank sections and just calls the other reports to generate the headers/footers. 

the problem I have is that I can simply set the pageHeaderSection1 to an instance of the headerTemplate.cs report as they are of different types.

How could I accomplish this?

Thank you for your time.

EDIT: I have it working by calling the reports from within a sub-report on the main template. I am having some display issues still though. not all the sub-reports show when displayed on the main template. they work just fine on their own in the designer preview however.

EDIT 2: Got that working too. looks like the sub-reports don't like it if you have a header section defined in the ReportSource it points to. I just moved all content to the detail section and set all other sections to visibility=false. I now have an issue where it is pushing my report header to the end of the report but only on the print preview or if I actually print. The preview is fine. see attachments for detail.
Elian
Telerik team
 answered on 02 Jan 2013
1 answer
105 views
When I look at the Data Explorer, I can't tell which fields are being used in the report.

We have about 100+ fields in our dataset, some reports use a portion of those.   In Crystal Reports or Visual Studio/Crystal Reports integration, the "Field list" puts a green check mark over those fields that have been used.

Peter
Elian
Telerik team
 answered on 02 Jan 2013
1 answer
133 views
A month ago I had installed Telerik Reporting Q2, and everything worked fine, now that I've upgraded to Q3 I have a serious problem, the Report toolbar not working, the icons are not displayed and I do not generate the report. This happens when I publish it in IIS 7.0, locally from the. NET 2010 if it works. I appreciate your help pretty please. I attached a screenshot.
Hadib Ahmabi
Top achievements
Rank 1
 answered on 02 Jan 2013
9 answers
314 views
When I export a report to excel with date values at some columns the displayed values are not correct.
Ex: "24/10/2007 10:54:36" on the report viewer, this value is displayed as "39379,45" on the report exported to Excel.
At pdf export the values is displayed correctly.

Is there some workaround for this? some property to set?

Thanks.
Elian
Telerik team
 answered on 01 Jan 2013
1 answer
110 views
Does anyone know if there is a way to set the report delimiter programatically.  We have a web application that is used in the UK and Spain, UK uses CSV, Spain uses a semi-colon.  The Telerik.Reporting.Extensions in the web.config is a global setting.
Hadib Ahmabi
Top achievements
Rank 1
 answered on 01 Jan 2013
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?