I've successfully put together a custom extension by using IRenderingExtension and I'm able to choose the option from the dropdown, select export, and get results in a format that I need. I've added parameters to the new extension in the web config, but I can't find them when I debug. They don't seem to be within the report, renderingcontext, or deviceinfo variables. I even just tested out with simple names and values such as "test". Is there something I'm missing?
Thanks,
Chuck
Hello,
I like to make a crosstab but i have two problems and you can see the image that i attached.First one is that i want to group the names of both rows and columns by asc order i tried to do it but it doesnt work . Second problem is that i am trying to match them . I have the informations of who choose who and the choice order . For example , esra's first choice is omer and i want to write 1 to that cell . Would be grateful of any advice .
Thanks.
I create a report but a i have this error
Error de servidor en la aplicación '/'.
Referencia a objeto no establecida como instancia de un objeto.Descripción: Excepción no controlada al ejecutar la solicitud Web actual. Revise el seguimiento de la pila para obtener más información acerca del error y dónde se originó en el código.
Detalles de la excepción: System.NullReferenceException: Referencia a objeto no establecida como instancia de un objeto.
Error de código fuente:
Se ha generado una excepción no controlada durante la ejecución de la solicitud Web actual. La información sobre el origen y la ubicación de la excepción pueden identificarse utilizando la excepción del seguimiento de la pila siguiente.
Seguimiento de la pila:
[NullReferenceException: Referencia a objeto no establecida como instancia de un objeto.]
Telerik.Reporting.Processing.Table.ForEachCell(Action`1 action) +161
Telerik.Reporting.Processing.Table.MeasureDataItemContent(IMeasureContext context, SizeRF availableClientSize) +320
Telerik.Reporting.Processing.DataItem.MeasureContent(IMeasureContext context, SizeRF availableClientSize) +149
Telerik.Reporting.Processing.LayoutElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +289
Telerik.Reporting.Processing.VisualElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +141
Telerik.Reporting.Processing.ProcessingElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +135
Telerik.Reporting.Processing.LayoutElement.Measure(IMeasureContext context, SizeRF availableSize) +121
Telerik.Reporting.Processing.AbsolutePositionLayout.MeasureChildItems(IMeasureContext context, SizeRF availableClientSize) +134
Telerik.Reporting.Processing.AbsolutePositionLayout.MeasureContent(IMeasureContext context, SizeRF availableClientSize) +65
Telerik.Reporting.Processing.ReportSectionBase.MeasureContent(IMeasureContext context, SizeRF availableClientSize) +126
Telerik.Reporting.Processing.LayoutElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +289
Telerik.Reporting.Processing.VisualElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +141
Telerik.Reporting.Processing.ProcessingElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +135
Telerik.Reporting.Processing.LayoutElement.Measure(IMeasureContext context, SizeRF availableSize) +121
Telerik.Reporting.Processing.StackLayout.MeasureContent(IMeasureContext context, SizeRF availableClientSize) +261
Telerik.Reporting.Processing.Group.MeasureContent(IMeasureContext context, SizeRF availableClientSize) +123
Telerik.Reporting.Processing.LayoutElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +289
Telerik.Reporting.Processing.VisualElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +141
Telerik.Reporting.Processing.ProcessingElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +135
Telerik.Reporting.Processing.LayoutElement.Measure(IMeasureContext context, SizeRF availableSize) +121
Telerik.Reporting.Processing.StackLayout.MeasureContent(IMeasureContext context, SizeRF availableClientSize) +261
Telerik.Reporting.Processing.Report.MeasureContent(IMeasureContext context, SizeRF availableClientSize) +201
Telerik.Reporting.Processing.LayoutElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +289
Telerik.Reporting.Processing.VisualElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +141
Telerik.Reporting.Processing.ProcessingElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +135
Telerik.Reporting.Processing.LayoutElement.Measure(IMeasureContext context, SizeRF availableSize) +121
Telerik.Reporting.Processing.LayoutElement.MeasureElement(LayoutElement elementToMeasure, IMeasureContext context) +109
Telerik.Reporting.Html5Rendering.Html5ReportInteractive.MeasureReportCore(Report report, IMeasureContext measureContext) +51
Telerik.Reporting.BaseRendering.RenderingExtensionBase.MeasureReport(Report report, Hashtable deviceInfo) +90
Telerik.Reporting.BaseRendering.RenderingExtensionBase.Render(Report report, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback) +419
Telerik.Reporting.Processing.ReportProcessor.RenderCore(ExtensionInfo extensionInfo, IList`1 reports, Hashtable deviceInfo, IRenderingContext renderingContext, CreateStream createStreamCallback) +1372
Telerik.Reporting.Processing.ReportProcessor.RenderCore(String format, IList`1 reports, Hashtable deviceInfo, IRenderingContext renderingContext, CreateStream createStreamCallback) +103
Telerik.ReportViewer.WebForms.ReportPageOperation.RenderReport(String format, IList`1 processingReports, Hashtable deviceInfo, IRenderingContext renderingContext) +122
Telerik.ReportViewer.WebForms.ReportRenderOperation.PerformOperationOverride() +340
Telerik.ReportViewer.WebForms.ReportPageOperation.PerformOperationOverride() +173
Telerik.ReportViewer.WebForms.HandlerOperation.PerformOperation(HttpContext context, ICacheManager cacheManager) +74
Telerik.ReportViewer.WebForms.BasicHandler.ProcessRequest(HttpContext context) +276
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +341
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69
the code is:
Report miReporte =
new
Report();
//Se asignan los parametros si es necesario
if
(param.Count > 0)
foreach
(ParametrosSP mid
in
param)
{
if
(mid._direccion)
{
miReporte.ReportParameters.Add(mid._nombre, mid._tipoReporte,
null
);
rrv_VistaReporte.ParametersAreaVisible =
true
;
}
}
//Se asigna el ancho al reporte
miReporte.Width = Telerik.Reporting.Drawing.Unit.Inch(4);
//se declara el uso de la seccion de detalle en el reporte
Telerik.Reporting.DetailSection ds_Seccion =
new
DetailSection();
//Se asigna un alto al detalle
ds_Seccion.Height = Telerik.Reporting.Drawing.Unit.Inch(0.2);
//Se declara una tabla para introducirla al detalle del reporte
Telerik.Reporting.Table tabla =
new
Telerik.Reporting.Table();
//Obtenemos los valores de filas y columnas
int
filas = ds.Tables[0].Rows.Count;
int
columnas = ds.Tables[0].Rows[0].ItemArray.Length;
//Se crea un arreglo de textbox que estaran colocados en las celdas de la tabla
Telerik.Reporting.TextBox[] titulos =
new
Telerik.Reporting.TextBox[columnas];
//Se crea un arreglo de grupos de tabla para empezar a asignar valores
Telerik.Reporting.TableGroup[] tg_Grupos =
new
TableGroup[columnas];
Telerik.Reporting.TableGroup tg_General =
new
TableGroup();
//Se obtienen los nombres de las columnas para el reporte
string
[] nombres = ConexionSQL.ParametrosSalidaObtenidos[0].ToString().Split(
','
);
//Se le otorga una posición a la tabla
tabla.Location =
new
Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(1.7000001668930054D), Telerik.Reporting.Drawing.Unit.Inch(1.1000000238418579D));
//Se le asigna un Nombre a la tabla
tabla.Name =
"TablaReporte"
;
//Se declaran los textbox del contenido
Telerik.Reporting.TextBox[] contenido =
new
Telerik.Reporting.TextBox[columnas];
//Se Agrega una nueva fila a la tabla
tabla.Body.Rows.Add(
new
Telerik.Reporting.TableBodyRow(Telerik.Reporting.Drawing.Unit.Inch(0.2916666567325592D)));
for
(j = 0; j < columnas; j++)
{
//Se inician cada uno de los valores que va a ir como titulos de las tablas
titulos[j] =
new
Telerik.Reporting.TextBox();
//Se le asigna un nombre al textbox
titulos[j].Name = nombres[j];
//Se le asigna un tamaño al textbox
titulos[j].Size =
new
Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(1D), Telerik.Reporting.Drawing.Unit.Inch(0.2916666567325592D));
//Se le asigna el valor al textbox
//en este caso como prueba es generico
titulos[j].Value = nombres[j];
//Se crean las columnas de la tabla
tabla.Body.Columns.Add(
new
Telerik.Reporting.TableBodyColumn(Telerik.Reporting.Drawing.Unit.Inch(1.0000002384185791D)));
//Se inician cada uno de los grupos por columna
tg_Grupos[j] =
new
TableGroup();
//Se asigna un nombre a cada uno de los grupos
tg_Grupos[j].Name = nombres[j];
//Se asigna un textBox para recibir los datos
tg_Grupos[j].ReportItem = titulos[j];
//Se agregan los grupos a la tabla
tabla.ColumnGroups.Add(tg_Grupos[j]);
//Se agregan los textbox a la tabla
//tabla.Items.Add(titulos[j]);
//Se asigna un nuevo textbox a cada celda del arreglo
contenido[j] =
new
Telerik.Reporting.TextBox();
//Se le asigna un nombre al textbox
contenido[j].Name =
"tb_Celda"
+ j.ToString();
//Se le asigna un tamaño al textbox
contenido[j].Size =
new
Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(1D), Telerik.Reporting.Drawing.Unit.Inch(0.2916666567325592D));
//Se le asigna el valor al textbox
contenido[j].Value =
"=Fields.["
+ nombres[j] +
"]"
;
//Se asigna el textbox a cada celda de la tabla
tabla.Body.SetCellContent(i, j, contenido[j]);
//Se agrega el textbox a la tabla
tabla.Items.Add(contenido[j]);
}
tg_General.Groupings.Add(
new
Telerik.Reporting.Grouping(
null
));
tg_General.Name =
"detailTableGroup"
;
tabla.DataSource = ds.Tables[0];
tabla.RowGroups.Add(tg_General);
tabla.Size =
new
Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(3.0000002384185791D), Telerik.Reporting.Drawing.Unit.Inch(0.58333331346511841D));
//Se agrega la tabla a la seccion
ds_Seccion.Items.Add(tabla);
//Se agrega la seccion de detalle al reporte
miReporte.Items.Add(ds_Seccion);
//Se asigna el reporte al visualizador
rrv_VistaReporte.ReportSource = miReporte;
//Se refresca la vista
//rrv_VistaReporte.RefreshReport();
I can't see the report, i calculate a dataset to send it at report datasourse but i can't see anything, this is the code:
Report miReporte = new Report();
if(param.Count>0)
foreach (ParametrosSP mid in param)
{
miReporte.ReportParameters.Add(mid._nombre, mid._tipo, null);
}
miReporte.Width = Telerik.Reporting.Drawing.Unit.Inch(4);
Telerik.Reporting.DetailSection detailSection = new Telerik.Reporting.DetailSection();
detailSection.Height = Telerik.Reporting.Drawing.Unit.Inch(0.2);
miReporte.Items.Add(detailSection);
Telerik.Reporting.Table tabla = new Telerik.Reporting.Table();
tabla.DataSource = ds.Tables[0];
detailSection.Items.Add(tabla);
rrv_VistaReporte.ReportSource = miReporte;
rrv_VistaReporte.RefreshReport();
param is an ArrayList that has the parameters, rrv_VistaReporte is the Telerik.ReportViewer
I am trying to set up a Start Date / End Date Parameter for a report based on the following example but I can't get it to work.
http://www.telerik.com/blogs/telerik-reporting-filtering-your-reports-using-report-parameters
Using the AdventureWords DB, I setup the parameters and filters per the example for Employee Hire Date and Employee ID.
If I attach the DataSource to the Report it returns all results not the filtered ones. If I remove the DataSource from the report it doesn't return any results.
Can you provide a demo of how it should be configured.
Thank you,
Jason
When I create telerik report following problem is occur,
Repeated same details 4 time.please refer the screen shot
Hi,
Is it possible to display pre-formatted text within a report?
What I am trying to do is to allow a user to edit a document through a RadRichTextBox then save the document to database using a HtmlFormatProvider to obtain properly formatted HTML. However, when I try to display the contents of the field within an HtmlTextBox, either nothing displays or all of the formatting is lost.
What I would really like to do, is to allow the user to import their source file directly into the RadRichTextBox and save that data to database and display within a report to preserve the formatting 100%.
Thanks,
Ryan
Hi.
I have configured the Water Mark text in properties but the water mark text was not displayed in pdf.
How can we resolve this issue.
Hi,
System Set UP : VS 2010 (I know, I know out of my control here), Silverlight 4 with Telerik Reports Upgrade Wizard to Q2 2012.
I have been tasked with upgrading the reports in my project to the latest version. I have done this by using the Wizard which was pretty close to perfect but needed me to make a few changes to get it functional.
As part of the reports the existing software passes a load of parameters to the reports by using the event
public void BeginRender(RenderBeginEventArgs args)
I have debugged this and seen all of the properties being populated nicely. The problem occurs when actually in the report and trying to access some of the report parameters. All of the values are null and I cannot work out why?
I have a semi work around -:
void TNAnalysisReport_ItemDataBinding(object sender, EventArgs e)
{
_aCollectionOfParameters = (sender as Telerik.Reporting.Processing.Report).Parameters;
}
However this does not work when populating subreports.... I really need a fix as to why the parameter values are being populated but not passed? Is there anything I can check to see why?
Any pointers would be most appreciated.