Telerik Forums
Reporting Forum
2 answers
476 views

I have escaped the ampersand but still get this error

the unit.Description is "something something & something something"

I then run the following code;

var unit = HttpUtility.HtmlEncode(unit.Description);

which returns "something something & something something"

this is bound to a field in a HtmlTextBox

Provider: {=Fields.Description.ToUpper()} ({=Fields.Identifier})

which causes (see the attachment)

when I manually remove the ampersand the report renders just fine

I have read other threads on this suggesting to escape it but this is not working. Any ideas?

Telerik Version : Q2 2013 7.1.13.705

 

 

 

 

 

Jono
Top achievements
Rank 1
 answered on 25 Aug 2015
4 answers
126 views
I am trying to learn how to use your data access and reporting modules by creating a very basic project in VS2013 that accesses an oracle database, but i keep coming up with an error.
Here is what i am doing
(just using default names as provided by wizards)
new project -> class library -> add new item -> telerik data access domain model -> select populate from database, backend = oracle -> next -> choose connection -> I have a connection created already from server explorer which works -> name is "connection" -> next -> select the schema i want to use -> select the table i want to use -> next->next->finish -> project gets reloaded -> build solution
add new item -> telerik report q3 2014 wizard -> table wizard -> ok -> add new data source -> select Open Access Data Source -> ok -> choose "connection" as data connection -> choose "ClassLibrary1" and "EntitiesModel1" as object context -> next -> choose IQueryable method that is same name as my table as object context member -> finish -> next -> add my fields (only have 2, one is primary key) -> next -> select normal as style -> next -> finish
report designer is shown -> select preview tab -> get following error
Type is enhanced and registered, but not available from the database class meta data. this can be caused by a wrong connection id or configuration. Parameter name: type Actual value was ClassLibrary1.COURT (COURT is the name of my table)

What am I doing wrong,











Stef
Telerik team
 answered on 24 Aug 2015
1 answer
537 views
Hi:
 We have a MVC project that to load a summary table (e.g a list of ​staff, with its role and location) When each row is click, it ​needs to print out a detail report directly to the local printer​, can I ask it is possible to do this with telerik reporting on a MVC project? (There is no need to view the generated report)

Many thanks

William
Nasko
Telerik team
 answered on 24 Aug 2015
8 answers
974 views
Hi,
I'm really new to Telerik and really love what this thing has done to me so far.

I have a question about Master and SubReport. How can I hide subreport if the subreport do not have the data. Right now the Master and the subreports work well, but if one or two of the sub reports do not have the data from the master report, how do i hide it? because it display an error that should not be seen by the end user....

I really need some help for it in VB because recently i only found them in C#. Thank you.
Stef
Telerik team
 answered on 24 Aug 2015
1 answer
515 views
Can I know how to add column group in telerik report?
Nasko
Telerik team
 answered on 24 Aug 2015
3 answers
183 views

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

Nasko
Telerik team
 answered on 24 Aug 2015
2 answers
144 views

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.  

Gökhan
Top achievements
Rank 1
 answered on 22 Aug 2015
0 answers
449 views

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();

Carlos
Top achievements
Rank 1
 asked on 21 Aug 2015
9 answers
1.1K+ views

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

Carlos
Top achievements
Rank 1
 answered on 21 Aug 2015
3 answers
942 views

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

Jason
Top achievements
Rank 1
 answered on 21 Aug 2015
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?