This is a migrated thread and some comments may be shown as answers.

Errors Upgrading from v3 to v4

0 Answers 44 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Steven
Top achievements
Rank 1
Steven asked on 01 Feb 2011, 12:26 PM
Hi All,

Our company has recently taken over a C# project that uses Telerik Reporting as the previous developer is retiring. However, we are having a couple of problems and as we are not experienced Telerik users we dont really know how to solve them, so im hoping that someone in the community might be able to help!

Our first problem is that one of our reports has simply broken and no longer works. When trying to view the report "invoice", either through visual studio preview, or in development build, or in actual installed product, we simply get the message "An error has occurred while processing Report 'Invoice': Method ctor() not found.

So, I went into the invoice.cs file and checked out the constructor code:

namespace TInvoice {
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;
    using Telerik.Reporting;
    using Telerik.Reporting.Drawing;
    using System.Collections.Generic;
 
    /// <summary>
    /// Summary description for Invoice.
    /// </summary>
    internal partial class Invoice : Telerik.Reporting.Report {
 
        const int LINES_PER_PAGE = 17;
 
        public Invoice( ) {
 
            /// <summary>
            /// Required for telerik Reporting designer support
            /// </summary>
            InitializeComponent( );
 
            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }
 
        internal Invoice( BL_TInvoice bl ) {
            //int inooflines;
 
            InitializeComponent( );
            //_bl = bl;
            //_ilrep = new InvoiceLine( _bl );
            //subReport1.ReportSource = _ilrep;
            //inooflines = _ilrep._bl.listinvlines.Count;
            //inoofpages = inooflines / LINES_PER_PAGE;
            //if ( inooflines != inoofpages * LINES_PER_PAGE )
            //    inoofpages++;
            //double fnet = 0;
            //for ( int i = 0; i < inoofpages; i++ ) {
            //    int startindex = i * LINES_PER_PAGE;
            //    int endindex = startindex + 16;
            //    for ( int i1 = startindex; i1 <= endindex; i1++ ) {
            //        if ( i1 < _ilrep._bl.listinvlines.Count )
            //            fnet += _ilrep._bl.listinvlines[ i1 ].amount;
            //    }
            //    listcf.Add( fnet );
            //}
        }

As part of my attempt to track down the problem, I commented out everything that was none essential, including all code within each method bound to an item on the report. However, this did not fix the problem. Only when I commented out the "InitialiseComponent" methods did I stop getting the error and was just left with a blank page. This leads me to believe that the problem must lie in the difference between version 3 (which previous developer was using) and version 4 (Q3 2010) which we have recently purchased. The reason I believe this is all the code within the "InitialiseComponent" function is auto-generated.

I have run the upgrade wizard within Visual Studio but that didnt fix the problem. Any help would be appreciated.


The second problem we are having is with a quoting report. The report displays perfectly, everything in the correct place and with all lines of the quote exactly as we'd expect. It simply reads lines from our database and then displays them. However, when we click "print", the printout is incorrect. The printout actually doubles every line of our report. For example, we have one line of the report which says "Sales Labour: 1 fitter x 12 hours £100". The next line is "Supervisor: 1x supervisor x 5 hours £70" and then at the bottom of the report we have totals etc. However, on the printout we get "Sales Labour: 1 fitter x 12 hours £100" printed out twice, replacing the supervisor line, but then the totals at the bottom counts the fitter line twice plus the supervisor line twice, despite the supervisor line not displaying. We havent fully investigated this problem yet but I was wondering if this was a more general issue with an easy solution before I have to delve into it.

Many thanks!

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
Steven
Top achievements
Rank 1
Share this question
or