Telerik Forums
Reporting Forum
18 answers
389 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
196 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
410 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
265 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
104 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
107 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
311 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
88 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
2 answers
152 views
I am trying to deploy a simple report to an Azure website. I have the report working fine locally and on the azure website. What I don't have is the export functions working. From what I have read so far on the forums this was a problem in the past because of Azure's trust issues. But I have also read that this should no longer be an issue.

Is there anything in particular I need to set or configure in my project to avoid the "out of memory" exception whenever I go to export the report to excel or pdf.
Richard
Top achievements
Rank 1
 answered on 31 Dec 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?