Telerik Forums
Reporting Forum
1 answer
112 views
Hi,
I am new to telerik.
I want to export the report into PDF repeatedly with different parameters (sales of the year)
Instead of changing the parameters and clicking the export each time, is there any quicker way to do? Like any buttons or programming.

Many thanks
Regards
Bill
Stef
Telerik team
 answered on 04 Jan 2013
7 answers
439 views
In what section of the report should a CrossTab be added?

In Crystal, we have the following CrossTab we need to convert.

{Fields.DSort1[Sort/Hidden]} Total
{Fields.A1[Display]}
{Fields.A7} {Count(Fields.A7)} {Count(Fields.A7)}
Total {Count(Fields.A7)} {Count(Fields.A7)} Is the above doable?  You provide for 4 boxes with optional groups for a crosstab.

I have tried placing the crosstab in various sections, and in all cases, the generation hangs for about 5 to 10 seconds and then renders an around 27 page report   The Crystal Reports version is only a few lines.  I have attached the result from Crystal.


We also want to pass the "Total" phrase as a field for language translation.

Peter
Stef
Telerik team
 answered on 04 Jan 2013
3 answers
1.2K+ views
We inherited a project from another company; they use Telerik for reporting. The project has several report files in it; but I am unable to view or modify them in Visual Studio. I have the appropriate Telerik dlls referenced, but I never actually installed anything from Telerik. Do I need to actually install something to view Telerik reports in design time?

I'm using Visual Studio 2010 Premium; the error I'm getting is:

To prevent possible data loss before loading the designer, the following errors must be resolved: 

Value cannot be null. Parameter name: instance 

Steve
Telerik team
 answered on 04 Jan 2013
3 answers
152 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
414 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.3K+ 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
208 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
434 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
284 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
117 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
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?