Telerik Forums
Reporting Forum
1 answer
700 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
760 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
240 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
358 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
178 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
189 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
Iron
 answered on 23 May 2023
1 answer
576 views

We have a JSON dataset where one of the nodes is a list of products. We have generated a DataSource based on this product list. Within each product node, there is an AdditionalInfos node, which is a list of data that complements each product. Find example attached.


        "ProductList": {
           "Product": [
          {
            "@Item": "Item1",
            "@BeginDate": "17/05/2023",
            "@Total": 253054.99,
            "AdditionalInfos": {
              "AdditionalInfo": [
                {
                  "@Key": "Vehiculo",
                  "@Value": "MCG02"
                },
                {
                  "@Key": "Terminal",
                  "@Value": "TERMINAL A"
                },
 
              ]
            }
          },
          {
            "@Item": "Item2",
            "@BeginDate": "16/05/2023",
            "@Total": 1234678.12,
            "AdditionalInfos": {
              "AdditionalInfo": [
                {
                  "@Key": "Vehiculo",
                  "@Value": "MCG03"
                },
                {
                  "@Key": "Terminal",
                  "@Value": "TERMINAL B"
                },
 
              ]
            }
          },
          {
            "@Item": "Item3",
            "@BeginDate": "15/05/2023",
            "@Total": 5646548.35,
            "AdditionalInfos": {
              "AdditionalInfo": [
                {
                  "@Key": "Vehiculo",
                  "@Value": "MCG04"
                },
                {
                  "@Key": "Terminal",
                  "@Value": "TERMINAL B"
                },
 
              ]
            }
          },
         ]
	}

Our goal is to generate a graphical representation of the product lines grouped by the AdditionalInfo lines with the Key "Terminal." The desired output should be as follows:

Terminal A
        Item1      17/05/2023       253054.99
Terminal B
        Item2     16/05/2023       1234678.12
Item3     15/05/2023       5646548.35

We would like to know the best approach to achieve this in Telerik Reporting Standalone. Is it possible to generate a DataSource with all the information at the same level and then perform grouping based on it?

Any guidance or examples would be highly appreciated. Thank you in advance for your assistance!

1 answer
736 views

I have a Telerik Reporting project that is included in my web application solution.  When the solution is built using VSBuild in the Azure DevOps pipeline, I caget the following error:

##[error]Inspire.Report\Properties\licenses.licx(1,0): Error LC0003: Unable to resolve type 'Telerik.Reporting.TextBox, Telerik.Reporting, Version=16.1.22.622, Culture=neutral, PublicKeyToken=a9d7983dfcc261be'

I've tried ignoring *.licx files and the report project but I still get this error.  Any advice on how to get a Telerik Reporting project built in an Azure DevOps pipeline?

Justin
Telerik team
 answered on 18 May 2023
2 answers
338 views
I am having trouble integrating the web report designer into my react app using instructions in https://docs.telerik.com/reporting/knowledge-base/how-to-use-web-report-designer-in-react-js. 

Looking for help, I downloaded the recommended example for integrating web designer into react apps (https://github.com/telerik/reporting-samples/tree/master/WebReportDesigner%20in%20React%20Application/src).

When loading this example in Visual Studio code, I get a 404 error. I have done a NPM install and NPM start. I am new to react, so may be missing a step?
Shoshanah
Top achievements
Rank 1
Iron
 answered on 18 May 2023
1 answer
192 views
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?