Telerik Forums
Reporting Forum
1 answer
442 views

I have an HTML Textbox in my report with the expression {HtmlDecode(Fields.RAW_HTML)} and it works in most cases EXCEPT

when the RAW_HTML field contains "&" in the literal string: ex) <span>Jack & Jill</span>

I have tried replacing "&" with "&amp;" on the SQL query, however i get the same error.

"An error ocurred while parsing EntityName"

1 answer
205 views

I have  a Invoice Report in which I have added a textbox in its Page Footer section for page number i.e.="Page " + PageNumber + " of "+ PageCount. and set my Page Number property to 'ResetNumberingAndCount'.

Now, when I am trying to generate multiple reports, it show continues page number for example, if I generate 3 reports each having 2 pages, it shows like page 1 of 6,page 2 of 6, page 3 of 6 and so on.

I want to reset page number after every report for example, it should show like page 1 of 2,  page 2 of 2, for second report page 1 of 2 , page 2 of 2 and so on.

Dimitar
Telerik team
 answered on 05 Jun 2023
0 answers
128 views
I have created Blazor(.Net7) MAUI Windows application and used Telerik Reporting for Reports.


@if (SourceOptions != null)
            {
                <ReportViewer ViewerId="ReportView"
                          ServiceUrl="@ReportSetting.ReportRestServicePath"
                          ReportSource="@SourceOptions"
                          Parameters="@(new ParametersOptions { Editors = new EditorsOptions { MultiSelect = EditorType.ComboBox, SingleSelect = EditorType.ComboBox } })"
                          ScaleMode="@(ScaleMode.Specific)"
                          @ref="__refReportViewer"
                          ParametersAreaVisible=false
                          Scale="1.0" />
            }
    @code{
        [Parameter] public TerlrikReportOptions ReportSetting { get; set; }

        [Parameter] public EventCallback CloseReportDelegate { get; set; }

        private ReportSourceOptions SourceOptions;

        private ReportViewer __refReportViewer;

        public BLReportViewer()
        {
        }

        protected override Task OnParametersSetAsync()
        {
            SourceOptions = new ReportSourceOptions();
            SourceOptions.Report = ReportSetting.ReportName;
            SourceOptions.Parameters = ReportSetting.ReportParameters;
            return base.OnParametersSetAsync();
        }
}

I am using this as a separate razor component by passing some parameters from the parent razor file. but quite often the reports that we are showing on this Telerik report viewer have some issues. time to time report data are not showing, a blank page only can be seen. sometimes header and footer of the page are only showing but the content has been missed. Even if the report doesn't have any issues, some report-building errors are shown by the red color text box.

once I get this issue, always I have to close the application and open it again and reload the report. after that, any issues are not there and all are working fine. most of the time we are getting this issue when we publish a new version of the app and install it for the very first time. From my point of view, I think it should be a cache issue.

I tried to find some solution for this. but I couldn't find it, please help me to resolve it.
Buddhi
Top achievements
Rank 1
 asked on 05 Jun 2023
1 answer
294 views

I have read https://docs.telerik.com/reporting/report-items/report-item/report-headers-footers regarding report headers and footers..  ("the report header will be rendered once at the top of the entre report and after the first page header section (if any)")

This is totally counter intuitive! I want a report header to appear once at the beginning of my report and then a page header to appear UNDER the report header and then again at the top of each subsequent page. Is this doable?

It seems backwards to me.

 

Thanks,

Dave

Momchil
Telerik team
 answered on 02 Jun 2023
1 answer
613 views

Introduction

Based on the below json sample, I am trying to define a Telerik report using both a main report and a sub-report, where se second is fed with a subset of the main report json data.

Basically, data flow mimics something like:

  1. Application injects base json data into main report's jsonData(string) parameter;
  2. jsonData is binded as report datasource;
  3. Json data selector is applied;
  4. Json selected data Employes node is injected into a sub-report, which will also use it as a json data source.

Troubles arose on step 4, where I am getting an [Invalid value of report parameter 'jsonData'] error when main report is rendered.

It seems Telerik Report is unable to convert a selected json node field data into a proper string.

Full context

For full context:

  • On both reports:

    • There is a jsonData report parameter of string datatype;

    • There is a JsonDataSource defined;

    • Binding between the string jsonData parameter and main JsonDataSource is based upon:

      • Property path: Datasource.Source
      • Expression: = Parameters.jsonData.Value
  • On main report:

    • JsonDatasource $.Companies data selector is being used, resulting in a list representing containing de the companies list, each instance having:
  • Name, a string representing the company name;

  • Employes, an object containing the company employes list.

    • Full sample json data is injected thru jsonData parameter;
  • On sub-report:

    • There is also a jsonData report parameter of string datatype;
    • JsonDataSource $ data selector is being used, which should result in:
      • A list of the following fields:
        • Name, a string representing the name of the employe;
        • Wage, a numeric value representing employe's wage.
  • Again on main-report, I am using the following sub-report parameters mapping:

    • Parameter Name: jsonData
    • Parameter Value: Fields.Employes
  • I am using Telerik Report Designer v15.1.21.716 (Desktop)

It seems that data selector converts json Employes node date into a System.Object[], which is giving me a nice hard time figuring out how to convert it back to a json string.

I have alread extensively searched on documentation, web, ChatGPT and alikes for a valid solution. So far, no luck.

Before you help me

Although I have the most appreciation for anyones effort trying to helping me:

  • I am pursuing a json only data source solution. I mean, I am not interested on any other alternative suported Telerik Reporting datasources;
  • Solution must work in both design-time and runtime.
{
    "Companies": [
        {
            "Name": "Company1",
            "Employes": [
                {
                    "Name": "Joe",
                    "Wage": 1000
                },
                {
                    "Name": "Jack",
                    "Wage": 2000
                }
            ]
        },
        {
            "Name": "Company2",
            "Employes": [
                {
                    "Name": "Mary",
                    "Wage": 3000
                },
                {
                    "Name": "Mike",
                    "Wage": 4000
                }
            ]
        }
    ]
}
Momchil
Telerik team
 answered on 02 Jun 2023
1 answer
681 views

We have a Telerik HTML5  report designer integrated in a .net 4.8 MVC application . Our requirement is to design cross tab reports. Data is populated from  stored procedures.  Around 40 - 45 columns need to be added in the row group of cross tab.  The issue is, after adding 30 columns, getting the below error message. Also it does not allow to save report.

Could not save 'Reportxxx.trdp'. An error has occurred. The reader's MaxDepth of 64 has been exceeded.

Any option to set max depth in .net 4.8?

Screenshot given below.

Momchil
Telerik team
 answered on 01 Jun 2023
1 answer
202 views

Hi,

We use Telerik WinUI report viewer. We need to have freezing column headers and row headers in some reports. Table Header Freezing in Detail - Telerik Reporting says how to do that in HTML5 based report viewer, but it does not work in WinUI report viewer. If there is a limitation, when the Telerik's plan to implement that functionality? 

 

Thanks.

1 answer
308 views

We have a custom report screen that uses multiple reporting frameworks to render reports as files (typically Excel). The available reports are loaded dynamically at runtime, the user picks a report which retrieves and displays the report parameters for the users to enter values, and then the report can be rendered to the file type that they choose.

We will be creating single reports (.trdp files) and report books (.trbp files) and uploading those onto the server for use with this screen. We are currently using the R1 2023 Reporting framework. Our application is written in c# and uses .NET Framework 4.8.

I have almost everything working with the Telerik framework but cannot find anywhere to create a ReportBook object from a .trbp file. The closest I found was this forum post (https://www.telerik.com/forums/reportbook-by-path-name)and this article on Deserializing from XML (https://docs.telerik.com/reporting/embedding-reports/program-the-report-definition/serialize-report-definition-in-xml). This does not work and I assume things have totally changed given the post was over 10 years old.

Using the code below gives the exception "Data at the root level is invalid. Line 1, position 1." The .trbp file that we are attempting to load was designed using the Telerik Standalone Report Designer.

var reportBook = new Telerik.Reporting.ReportBook();

using (System.IO.FileStream stream = new System.IO.FileStream(reportPath, System.IO.FileMode.Open))
{
    Telerik.Reporting.XmlSerialization.ReportXmlSerializer xmlSerializer = new Telerik.Reporting.XmlSerialization.ReportXmlSerializer();                    
    reportBook = (Telerik.Reporting.ReportBook)xmlSerializer.Deserialize(stream);
}

Is it possible to load a .trbp file into a ReportBook object? If so, how?

Thanks,

Jason

1 answer
136 views

How can I put the x-axis 0 exactly at the origin?

I am using the Telerik Reporting Designer inside Visual Studio 2022

Platform:

Telerik Reporting R3 2022, using Telerik for .Net

.Net Framework 4.5.2

Visual Studio 2022, 64 bit

 

Todor
Telerik team
 answered on 24 May 2023
1 answer
148 views

Hello,

we've upgraded to VS2022 and .NET 7.

The reports are giving us a lot of problems, it looks like we have too rebuild them in the Standalone Report Designer. Import fails

The default Telerik WPF ReportViewer has this


<tr:ReportViewer Grid.Row="0" x:Name="ReportViewer1" HorizontalAlignment="Stretch" EnableAccessibility="true">
        <tr:ReportViewer.ReportSource>
		<telerikReporting:UriReportSource Uri=""/>
	</tr:ReportViewer.ReportSource>
</tr:ReportViewer>

 

 

Can we change the Uri programmatically in a MVVM project? Something like


<tr:ReportViewer Grid.Row="0" x:Name="ReportViewer1" HorizontalAlignment="Stretch" EnableAccessibility="true">
    <tr:ReportViewer.ReportSource>
	<telerikReporting:UriReportSource Uri="{Binding ReportSource}"/>
    </tr:ReportViewer.ReportSource>
</tr:ReportViewer>


where reportsource is ExampleReport.trdp

 

Jeroen

Jeroen
Top achievements
Rank 1
Iron
 answered on 23 May 2023
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?