Telerik Forums
Reporting Forum
1 answer
191 views
Hi there,

First let me preface this that I using Telerik Reporting Q2 2013 Internal Build v7.1.13.726.
When I try to instantiate run my report against an object data source that is tied to a repository pattern that is backed by code-first entity framework (which is the closest I've come to getting this to work) I receive this error. Any ideas where I should look to solve this error.
My app.config in the reporting project has the correct connection string defined for the DbContext so I'm a little confused.



Stef
Telerik team
 answered on 02 Sep 2013
1 answer
153 views
We are using CRM 4.0 which requires IE to be run in compatibility mode.  If I put the meta tag

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

On my report viewer page then the reports will show up.  If that isn't there, then the page is empty except for the toolbar.  Problem is with that meta tag in place when the user navigates back to another CRM page then they don't display properly.

So, is there a way to turn that back off when a user leaves the reports page, or what modifications can I do so the report viewer will display correctly even if compatibility mode is enabled?

Thanks,
Adam


Edit:
Adding this to the windows.onload allows the reports to show.  Not sure if this is the best resolution, but it does work for now.
document.getElementById('ReportViewer1ReportFrame').style.width = '1000px';

Adam
Peter
Telerik team
 answered on 02 Sep 2013
1 answer
84 views
I'm trying to build a report programmatically due to the complexity and dynamic nature of the requirement I am faced with.
The best way I can think is to have one 'shell' report that composes many different child reports.

However when I just try to do a light version of the above with a simple (not data-bound) child report that just prints 'hello world!' I get nothing rendered out. When I run the Child report on it's own I receive the expected results.

Below is my code for the shell report

private Telerik.Reporting.Report Build()
{
    Telerik.Reporting.Report mainReport = new Telerik.Reporting.Report();
    Telerik.Reporting.DetailSection detail = new Telerik.Reporting.DetailSection();
 
    mainReport.Items.Add(detail);
 
    Unit unitX = Unit.Inch(0.1);
    Unit unitY = Unit.Inch(0.1);
    SizeU size = new SizeU(Unit.Inch(1), Unit.Inch(0.5));
 
    List<Telerik.Reporting.Report> childrenReports = new List<Telerik.Reporting.Report>();
 
    ExecutiveSummarySection executiveSummary = new ExecutiveSummarySection();
    childrenReports.Add(executiveSummary);
     
    foreach (Telerik.Reporting.Report child in childrenReports)
    {
        Telerik.Reporting.SubReport sub = new Telerik.Reporting.SubReport
        {
            Location = new PointU(unitX, unitY),
            Size = size
        };
        unitY = unitY.Add(Unit.Inch(1));
        Telerik.Reporting.InstanceReportSource childInstanceReportSource = new InstanceReportSource();
        childInstanceReportSource.ReportDocument = child;
        sub.ReportSource = childInstanceReportSource;
        detail.Items.Add(sub);
    }
    detail.Height = Unit.Inch(childrenReports.Count + 2D);
    return mainReport;
    //return executiveSummary;
}


and the 'ExecutiveSumarySection' report:

using AGP.Data.Repositories;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Telerik.Reporting;
using Telerik.Reporting.Drawing;
 
namespace AGP.Reports
{
    public class ExecutiveSummarySection : Report
    {
 
        public ExecutiveSummarySection()
        {
            InitializeComponent();
            //DataBindControls();
        }
 
        private void DataBindControls()
        {
             //going to data bind later to EF5 backed repository
            //ModelContextUnitOfWork uow = new ModelContextUnitOfWork();
            //DocumentEFRepository docRepo = new DocumentEFRepository(uow);
 
            //this.DataSource = docRepo.All.ToList();
        }
 
        #region Component Designer generated code
        /// <summary>
        /// Required method for telerik Reporting designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            Telerik.Reporting.Drawing.StyleRule styleRule1 = new Telerik.Reporting.Drawing.StyleRule();
            this.pageHeaderSection1 = new Telerik.Reporting.PageHeaderSection();
            this.detail = new Telerik.Reporting.DetailSection();
            this.pageFooterSection1 = new Telerik.Reporting.PageFooterSection();
            this.panel1 = new Telerik.Reporting.Panel();
            this.textBox1 = new Telerik.Reporting.TextBox();
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
            //
            // pageHeaderSection1
            //
            this.pageHeaderSection1.Height = Telerik.Reporting.Drawing.Unit.Inch(2D);
            this.pageHeaderSection1.Name = "pageHeaderSection1";
            //
            // detail
            //
            this.detail.Height = Telerik.Reporting.Drawing.Unit.Inch(2.1000001430511475D);
            this.detail.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
            this.textBox1});
            this.detail.Name = "detail";
            //
            // pageFooterSection1
            //
            this.pageFooterSection1.Height = Telerik.Reporting.Drawing.Unit.Inch(2D);
            this.pageFooterSection1.Name = "pageFooterSection1";
            //
            // panel1
            //
            this.panel1.Name = "panel1";
            this.panel1.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(2D), Telerik.Reporting.Drawing.Unit.Inch(1D));
            //
            // textBox1
            //
            this.textBox1.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(0D), Telerik.Reporting.Drawing.Unit.Inch(0D));
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(1.2000001668930054D), Telerik.Reporting.Drawing.Unit.Inch(0.40000024437904358D));
            this.textBox1.Value = "Hello World!";
            //
            // ExecutiveSummarySection
            //
            this.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
            this.pageHeaderSection1,
            this.detail,
            this.pageFooterSection1});
            this.Name = "Report1";
            this.PageSettings.Margins = new Telerik.Reporting.Drawing.MarginsU(Telerik.Reporting.Drawing.Unit.Inch(1D), Telerik.Reporting.Drawing.Unit.Inch(1D), Telerik.Reporting.Drawing.Unit.Inch(1D), Telerik.Reporting.Drawing.Unit.Inch(1D));
            this.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.Letter;
            this.Style.BackgroundColor = System.Drawing.Color.White;
            styleRule1.Selectors.AddRange(new Telerik.Reporting.Drawing.ISelector[] {
            new Telerik.Reporting.Drawing.TypeSelector(typeof(Telerik.Reporting.TextItemBase)),
            new Telerik.Reporting.Drawing.TypeSelector(typeof(Telerik.Reporting.HtmlTextBox))});
            styleRule1.Style.Padding.Left = Telerik.Reporting.Drawing.Unit.Point(2D);
            styleRule1.Style.Padding.Right = Telerik.Reporting.Drawing.Unit.Point(2D);
            this.StyleSheet.AddRange(new Telerik.Reporting.Drawing.StyleRule[] {
            styleRule1});
            this.Width = Telerik.Reporting.Drawing.Unit.Inch(6D);
            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
 
        }
        #endregion
 
        private Telerik.Reporting.PageHeaderSection pageHeaderSection1;
        private Telerik.Reporting.DetailSection detail;
        private Panel panel1;
        private TextBox textBox1;
        private Telerik.Reporting.PageFooterSection pageFooterSection1;
    }
}


Not totally sure what I'm doing wrong here but I was following many similar examples provided in the forums by Telerik Reporting team on doing this type of report.
Peter
Telerik team
 answered on 02 Sep 2013
1 answer
106 views
Hi,

I'm trying to create a report, with an ObjectDataSource that has a couple Nullable<Datetime> fields. I'm attempting to use these in a textbox.
Here's an example of the sort of expression I'm using:

This report covers the period from {IIf(Fields.ReportConfiguration.StartDate is null, "the beginning of time", Fields.ReportConfiguration.StartDate.Date.ToString("D"))} to {IIf(Fields.ReportConfiguration.EndDate is null, "the end of time", Fields.ReportConfiguration.EndDate.Date.ToString("D"))}.

Both StartDate and EndDate are of type Nullable<DateTime>. If they have both have a value then it works correctly, but if either of them are null then I get an "Object reference not set to an instance of an object" error. Should this work, and if not, how do I do it?

I'm using 2013 Q2 SP1.

Thanks,

Richard
Squall
Top achievements
Rank 1
 answered on 02 Sep 2013
1 answer
77 views
Hello,
I am using Reporting Q2 2011 and working with the Invoice example. The PageExec values work correctly and are visible when viewed in Preview but are not visible when viewed in HTML Preview. I am using IE 9.

Thanks,
Peter
Telerik team
 answered on 02 Sep 2013
1 answer
243 views
I'm attempting to set up my report like the following:

Parent Group
Child Group 1
Items
Child Group 2 Items Child Group 3 So basically I want parent group to have multiple children without nesting them, so how can I setup a group with multiple parallel children without using "Subreport"? Are there any easy ways to achieve that in the designer?
Squall
Top achievements
Rank 1
 answered on 30 Aug 2013
5 answers
238 views

"Microsoft JScript runtime error: Object expected":  Here's the first line that is causing the error:

ToolbarImageButton(

'ReportViewer1_ReportToolbar_NavGr_FirstPage_Button','FirstPage',false,'NormalButton','DisabledButton','PushButton',false);

 

 I'm using 2009 Q1.  This is a .net 3.5 web application.  I tried reinstalling Telerik Reporting and I still get the error.  Any ideas?

Stef
Telerik team
 answered on 30 Aug 2013
3 answers
39 views
Hi,

I implemented a simple sample in which I'd like to meet better the report's features. So, in theh sample I noticed the report is very slow when it goes to render on the MVC page.

I was able to see that It the problem is my query brings a lot of records, then I was imagining that report would do the paging correctly. However It is not working.

Furthermore, when I click the next page button, I have a impression the report is doing the same query: returning all the records  and then it applies the paging.

I think it would be better if the paging occured during the query not after the query results.

There is a manner to intervene the paging, such as some property, method or event that I implement the paging or change the query?

Thank you very much for all the attention.

Carlos
IvanY
Telerik team
 answered on 30 Aug 2013
1 answer
562 views
Hello everyone,
I'm sure this is an issue with my IIS 8.0 configuration but I haven't been able to work around it.  I can run my web app and generate reports from Visual Studio with no problems but I'm having problems with the reporting component (version 7.1.13.802) 
under IIS 8.0.   I started with a clean install of IIS and I am using the Default App Pool (.Net V4.0 Integrated) using the ApplicationPoolIdentity.   I have added permissions to my apps bin folder where the Telerik.ReportViewer.WebForms.dll are located and my web app functions except for displaying reports.   I get the following error:

The http handler needed by the Report Viewer has not been registered in the application's web.config file.  Add <add name="Telerik.ReportViewer.axd_*" path="Telerik.ReportViewer.axd" verb="*" type ="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=7.1.13.802, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" preCondition="integratedMode"/> to the system.webServer/handlers section of the configuration file.


Of course, this handler is already set up in my web.config file.   I believe this is a permission issue since I can change the Default App Pool to run under my user id and it does function correctly.    I am running IIS on my machine so I can make any adjustments that I need; however, I'd like to run this using the ApplicationPoolIdentity user because that is what I will likely have to use when it goes into production.  I know that this should work under Medium Trust (allthough Full Trust would be better).  I've tried to configure that but I'm not sure if I have been successful or not.  My root web.config file contains the following:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.web>
      <securityPolicy>
        <trustLevel name="Full" policyFile="internal"/>
        <trustLevel name="High" policyFile="web_hightrust.config"/>
        <trustLevel name="Medium" policyFile="web_mediumtrust.config"/>
        <trustLevel name="Low" policyFile="web_lowtrust.config"/>
        <trustLevel name="Minimal" policyFile="web_minimaltrust.config"/>
      </securityPolicy>
      <trust level="Full" originUrl=""/>
    </system.web>
</configuration>

Any suggestions as to what I'm missing in my configuration ?   

Thanks in advance -- Jeff Gaiche
Stef
Telerik team
 answered on 30 Aug 2013
3 answers
249 views
Hi,

We are working on a project which provide user defined reports using data in database. Currently we are using other vendor controller that support upload user defined template to our system and it applies styles, headers, static images and footer section to dynamically generate sections. We want to move our project to telerik reports. But I couldn't find this feature on your products. I found some forums that saying this feature will be provided in future versions but unable to find it. We are not expecting report designers. We can achieve what ever we want using code behind. What we want is apply user template to reports.

Appreciate if telerik team has solution for this.

Regards
Chap
 
Peter
Telerik team
 answered on 29 Aug 2013
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?