or
if (tipoLegame != -1) { switch (tipoLegame) { case 0:
subReportAnagrafica.ReportSource = new SubPersonaFisica(); break; case 1:
subReportAnagrafica.ReportSource = new SubPersonaGiurica(); break; case 2:
subReportAnagrafica.ReportSource = new SubSCO(); break; } subReportAnagrafica.ReportSource.DataSource = dettagli; SetField(dettagli.Field); var risultatoDomande = reportFactory.GetListaDomandeRisposteUtente(IDUtente, IDQuestionario); this.table1.DataSource = risultatoDomande;... public ReportGen(int idQuestionario,int idCliente) { InitializeComponent(); this.IDQuestionario = idQuestionario; this.IDCliente = idCliente; reportViewer.ReportServiceClientFactory = this; reportViewer.Report = myreport; if (CanUserExportToExcel()) { btnEsporta.Visibility = System.Windows.Visibility.Visible; } else { btnEsporta.Visibility = System.Windows.Visibility.Collapsed; } this.reportViewer.RenderBegin += new RenderBeginEventHandler(reportViewer_RenderBegin); this.Closed += new EventHandler<WindowClosedEventArgs>(DettaglioReportCliente_Closed); } private void reportViewer_RenderBegin(object sender, RenderBeginEventArgs args) { args.ParameterValues[STR_PARAM_QUESTIONARIO] = IDQuestionario; args.ParameterValues[STR_PARAM_IDUSER] = App.UtenteLoggato.IDInterno; args.ParameterValues[STR_PARAM_IDCLIENTE] = IDCliente; }
Dim report As Telerik.Reporting.Report = DirectCast(Me.ReportViewer1.Report, Telerik.Reporting.Report)
Dim txt As Telerik.Reporting.TextBox = TryCast(report.Items.Find("titleTextBox", True)(0), Telerik.Reporting.TextBox)
txt.Value = "
Updated Title Text"
How would I do the equivalent for the Datasource name, connection string or select command?
I need a clue as to the syntax and form, as the above "find" for a text control doesn't seem to apply.
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; } } }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 // } } }