Telerik Forums
Reporting Forum
0 answers
153 views
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.
Cristian
Top achievements
Rank 1
 asked on 26 Sep 2011
1 answer
106 views
One website the reports show up perfectly; however, on another website (because we have clients on the other side of the world so we have 2 sites with same exact code) i get the error "one or more parameters are not set or have invalid values".

I have compared the web.config files and they are the same also, except for sql server names based on which website it is...no cross domain stuff going on.

So why would this happen? Are there configuration issues that the website host needs to resolve or????

Other data displays work great it is just when I try to display a report.

Thanks,
Richard

Steve
Telerik team
 answered on 26 Sep 2011
1 answer
151 views
Hi, telerik team.

i'm exploring the telerik reporting features and I have the follow doubt:
The scenario:I have a reporting with grouping items and separated by section.
I will like that, to the export, the items grouped should be placed in a separated worksheet, in excell, and separated pages in PDF files.

Kind regards,
Giuliano.
Steve
Telerik team
 answered on 26 Sep 2011
1 answer
173 views
Hi..
I have a report with 3 columns.Is it now possible to order the data left to right.. instead of top down?
thx
Steve
Telerik team
 answered on 26 Sep 2011
1 answer
144 views
Hi..
Where and how do I run the conversion util to convert an ActiveReport to Telerik?
thx
Steve
Telerik team
 answered on 26 Sep 2011
1 answer
128 views
Hi,

I have a static class that I would like to use with ObjectDataSource. However, the class does not show up in the report wizard.

How do I get it to show up?
Ivan
Telerik team
 answered on 26 Sep 2011
5 answers
176 views
Hi
I'm trying out the new Reporting tool, but the tutorials doesn't fit Visual Studio 2010. In step 3 "Displaying Reports in the Windows Viewer" of the Quickstart the ReportViewer can't see any RDLC files even though the two projects are referenced as documented. Do I have to do something in addition to use external files in .NET 4.0?

Re
Dennis
Steve
Telerik team
 answered on 26 Sep 2011
1 answer
150 views
We are having trouble adding more than one ChartMarkedZone object in a chart implemented in a Windows Server 2003 and therefore with IIS6, the messages from a error says something like "Attempted to read or write protected memory. This is an indication That Often other memory is corrupt. "or else "A generic error occurred in GDI +"
This problem does not occur in IIS7 but we can not force the client to update the version of Internet Information Services.

ReportPrueba.cs
namespace SmartWork.ReportsManagementControl.ReportsLogic
{
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;
    using Telerik.Reporting;
    using Telerik.Reporting.Drawing;
    using Telerik.Reporting.Charting;
    using System.Collections.Generic;

    /// <summary>
    /// Summary description for ReportPrueba.
    /// </summary>
    public partial class ReportPrueba : Telerik.Reporting.Report
    {
        public ReportPrueba()
        {
            //
            // Required for telerik Reporting designer support
            //
            InitializeComponent();
            chart_MesMinisterio.DataSource = null;
        }

        private void chart_MesMinisterio_NeedDataSource(object sender, EventArgs e)
        {
            List<PruebaObject> lstPrueba = new List<PruebaObject>();
            lstPrueba.Add(new PruebaObject() { Codigo = 1, Dia = 1, Value = 24 });
            lstPrueba.Add(new PruebaObject() { Codigo = 2, Dia = 5, Value = 48 });
            lstPrueba.Add(new PruebaObject() { Codigo = 3, Dia = 10, Value = 32 });

            chart_MesMinisterio.DataSource = lstPrueba;
            chart_MesMinisterio.Series[0].DataLabelsColumn = "Value";
            chart_MesMinisterio.Series[0].DataXColumn = "Dia";
            chart_MesMinisterio.Series[0].DataYColumn = "Value";
            chart_MesMinisterio.IntelligentLabelsEnabled = true;
            chart_MesMinisterio.Series[0].Appearance.ShowLabelConnectors = true;
            chart_MesMinisterio.Series[0].Appearance.LineSeriesAppearance.Width = 3;
            chart_MesMinisterio.Series[0].Appearance.LineSeriesAppearance.Color = Color.LightSteelBlue;

            chart_MesMinisterio.PlotArea.YAxis.AutoScale = false;
            chart_MesMinisterio.PlotArea.YAxis.MinValue = 0;
            chart_MesMinisterio.PlotArea.YAxis.MaxValue = 100;
            chart_MesMinisterio.PlotArea.XAxis.AutoScale = false;
            chart_MesMinisterio.PlotArea.XAxis.MinValue = 1;
            chart_MesMinisterio.PlotArea.XAxis.MaxValue = 31;
            chart_MesMinisterio.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 270;
            chart_MesMinisterio.PlotArea.Appearance.Dimensions.Margins.Bottom
                = new Telerik.Reporting.Charting.Styles.Unit(14, Telerik.Reporting.Charting.Styles.UnitType.Percentage);
            chart_MesMinisterio.PlotArea.Appearance.Dimensions.Margins.Top
                = new Telerik.Reporting.Charting.Styles.Unit(10, Telerik.Reporting.Charting.Styles.UnitType.Percentage);
            chart_MesMinisterio.PlotArea.Appearance.Dimensions.Margins.Left
                = new Telerik.Reporting.Charting.Styles.Unit(8, Telerik.Reporting.Charting.Styles.UnitType.Percentage);
            chart_MesMinisterio.PlotArea.Appearance.Dimensions.Margins.Right
                = new Telerik.Reporting.Charting.Styles.Unit(5, Telerik.Reporting.Charting.Styles.UnitType.Percentage);

            ChartMarkedZone maxMin = new ChartMarkedZone();
            maxMin.ValueStartY = 75;
            maxMin.ValueEndY = 75;
            maxMin.Label.TextBlock.Text = "Maximo: 75";
            maxMin.Appearance.Border.Color = Color.Green;
            maxMin.Appearance.Border.Width = 2;
            chart_MesMinisterio.PlotArea.MarkedZones.Add(maxMin);

            ChartMarkedZone avgMin = new ChartMarkedZone();
            avgMin.ValueStartY = 50;
            avgMin.ValueEndY = 50;
            avgMin.Label.TextBlock.Text = "Promedio: 50";
            avgMin.Appearance.Border.Color = Color.Red;
            avgMin.Appearance.Border.Width = 2;
            chart_MesMinisterio.PlotArea.MarkedZones.Add(avgMin);
        }
    }

    public class PruebaObject
    {
        public int Codigo { get; set; }
        public int Dia { get; set; }
        public int Value { get; set; }
    }
}

Steve
Telerik team
 answered on 26 Sep 2011
1 answer
98 views
Hi,

We create reports by filling dataset with values using stored procedures and formatting Telerik report using the data from dataset. We feel this method take quite long time to display the report. Instead is there any method to display reports directly from stored procedure to Telerik reports?

Thanks in advance
Ilyas.
Steve
Telerik team
 answered on 26 Sep 2011
4 answers
149 views
Hi,

Please help.

I created a statistics report with a sub-report that has a chart. The main report shows the client in each page and the sub-report shows the filings made by a particular client in different countries for different years in a series of pie charts. The report runs fine when using the regular "Preview" (see attached image). However, when using the "Html Preview", it shows only the first painted chart for all pages.

The attached image is actually 2 pages of the report in regular "Preview". The "Html Preview" shows only the first chart for all pages. The chart were created programmatically based on parameters passed from the main report.

Thank you.

Steve
Telerik team
 answered on 26 Sep 2011
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?