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

Master-detail report problem

0 Answers 93 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Cristian
Top achievements
Rank 1
Cristian asked on 26 Sep 2011, 08:14 PM
Hi, guys I'm trying to create a master detail report like invoice report and I'm getting the next error mesagge when I try to set de subreport reportsource. "Constructor on type 'Reportes.CriterioReporte' not found". The main report is named "RepConcentrado" and the two reports that will be master and detail are named 'CriterioReporte' wich has 3 parameters(string status, DateTime date1,DateTime date2) and "reoTotales which has (int CountryId,DateTime date1, DateTime date2).

 I followed the subreport video from telerik tv but in At the moment I try to set the report datasource the message comes out.
Here's the code for each report
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using Telerik.Reporting;
using Telerik.Reporting.Drawing;
using ModeloSolicitudesGuarderias;
using System.Linq;
namespace Reportes
{
   
     
    /// <summary>
    /// Summary description for CriterioReporte.
    /// </summary>
    public partial class CriterioReporte : Telerik.Reporting.Report
    {
        short claveEdo, claveCd;
  
        public CriterioReporte(string Estatus,DateTime fecha,DateTime fecha2)
        {
             
       
            InitializeComponent();
            ////
            
            var bdsseguaReporte = new BD_SSEGUAEntities();
            Report.DataSource = from m in bdsseguaReporte.Menores
  
                                where (m.Solicitud.CTEdoSolicitud.fcDescEdoSol == Estatus && (m.fdFchRegMenor>=fecha &&m.fdFchRegMenor<= fecha2 ))
                                select m;
            textBox25.Value = "Periodo: del" +" "+ fecha.ToShortDateString() +" "+ "al" +" "+ fecha2.ToShortDateString();
            textBox24.Value = "Fecha:"+" "+DateTime.Now.ToShortDateString();
            textBox31.Value = "Registradas/En Lista de Espera";
            // TODO: Add any constructor code after InitializeComponent call
            //
        }
  
          
        private void textBox8_ItemDataBound(object sender, EventArgs e)
        {
  
            claveEdo = Convert.ToInt16((sender as Telerik.Reporting.Processing.TextBox).Value);
            var bdinstContext = new BD_INSTEntities();
            var estado = (from edo in bdinstContext.Cat_Edo
                          where edo.cve_edo == claveEdo
                          select edo).First();
  
            (sender as Telerik.Reporting.Processing.TextBox).Value = estado.nom_edo;
  
  
            
              
        }
  
        private void textBox9_ItemDataBound(object sender, EventArgs e)
        {
            claveCd = Convert.ToInt16((sender as Telerik.Reporting.Processing.TextBox).Value);
            var bdinstContext = new BD_INSTEntities();
            var ciudad = (from cd in bdinstContext.Cat_cd
                          where (cd.cve_cd == claveCd) && (cd.cve_edo == claveEdo)
                          select cd).First();
  
            (sender as Telerik.Reporting.Processing.TextBox).Value = ciudad.nom_cd;
        }
  
        
  
          
    }
}
This part willbe the master section
 And this the detail section
namespace Reportes
{
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;
    using Telerik.Reporting;
    using Telerik.Reporting.Drawing;
    using System.Linq;
    using ModeloSolicitudesGuarderias;
  
  
    /// <summary>
    /// Summary description for ReoTotales.
    /// </summary>
    public partial class ReoTotales : Telerik.Reporting.Report
    {
        public ReoTotales(int Circuito,DateTime fecha,DateTime fecha2)
        {
             
            //
            // Required for telerik Reporting designer support
            //
            InitializeComponent();
            ////
            
            var bdsseguaReporte = new BD_SSEGUAEntities();
            Report.DataSource = from m in bdsseguaReporte.Menores
  
                                where (m.Solicitud.CTEdoSolicitud.fcDescEdoSol == "Registrada" && (m.fdFchRegMenor>=fecha &&m.fdFchRegMenor<= fecha2 )&& m.Solicitud.fiCircuito==Circuito)
                                select m;
            textBox13.Value = "Solicitudes recibidas durante el periodo"+" "+"del" +" "+ fecha.Date.ToShortDateString() + "al" +" "+ fecha2.Date.ToShortDateString();
            //table1.DataSource = Report.DataSource;
            //table1.Visible = true;
            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }
    }
}


Hope you could help.

No answers yet. Maybe you can help?

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