Telerik Forums
Reporting Forum
1 answer
83 views
Telerik reporting - which is more efficient? Binding rules or conditional formatting?
Todor
Telerik team
 answered on 10 May 2023
1 answer
94 views

I have exported a report template or "User Template" from the standalone designer and can place it in a "Templates" sub-directory of the standalone designer app directory.

So far I have not found a way to use a *.trtx template in the Web Designer. Will I have to use the *.trdp as a template instead?

Ivan Hristov
Telerik team
 answered on 01 May 2023
1 answer
234 views

I have a parameter in my report called "AvailableTables", which is bound to a CSV datasource with:

"table1",1

"table2",2

and the Value is bound to the digits, and the Label is bound to the "table1","table2"

I have a table in my report named firstTable which Visibility = False.  On that table, I have set up a conditional formatting rule such that when the value of a Report Parameter =1, it applys a format where visible is checked.

Similarly, I have a table in my report named secondTable which Visibility = False.  On that table, I have set up a conditional formatting rule such that when the value of a Report Parameter =2, it applys a format where visible is checked.

 

However, when I run my report, and change the report parameter, the "firstTable" and the "secondTable" never become visible.  I know the databinds are correct, as if I set Visible = True on that table, the data shows itself.  I also know that the Report Parameter is outputting the value of "1" and "2", as it is displayed in a textbox in my header.

Does telerik reporting support conditional formatting of visibility of a table based on report parameters?

 

I have attached a zipped TRDP file which illustrates the behavior in the standalone report designer.

Ivan Hristov
Telerik team
 answered on 29 Apr 2023
1 answer
105 views

I have a main report (A) which loads and embeds a 2nd report (B) as a subreport.

Report B can also be loaded on its own, without being contained in report A. 

I would like to hide (or blank out the value) in a Textbox on Report B if it has been loaded on its own. How do I do this?

Mike
Top achievements
Rank 1
Iron
 answered on 24 Apr 2023
1 answer
238 views

ReportXmlSerializer().Serialize() throws unexpected System.ArgumentException:
'Invalid name character in 'MyData[]'. The '[' character, hexadecimal value 0x5B, cannot be included in a name.'

How can I prevent this?
- Or -
What other way can I save the data with the report?
private void CreateReport() {
    var report = new Telerik.Reporting.Report();
    report.Name = "MyReport";
    var detail = new Telerik.Reporting.DetailSection();
    report.Items.Add(detail);
    var textBox = new Telerik.Reporting.TextBox();
    textBox.Value = "Hello World!";
    detail.Items.Add(textBox);

    var dataSource = new ObjectDataSource();
    dataSource.Name = "MyData";
    dataSource.DataSource = MyData.Sample;

    report.DataSource = dataSource;

    var reportPath = @"C:\develop\Temp\MyReport.trdp";
    new ReportXmlSerializer().Serialize(reportPath, report);
}

public class MyData {
    public static readonly MyData[] Sample = { new() { Text = "Foo", Number = 42 }, new() { Text = "Bar", Number = 21 } };

    public string Text { get; set; }
    public int Number { get; set; }
}

Dimitar
Telerik team
 answered on 19 Apr 2023
1 answer
164 views

Our app interacts with the user asking for datasource and let the user select columns, sorting, groups etc und presents the resulting data in a DataGrid.  Now we want to display the data in a report that is created by the user. 
We use .NET 6.0, WPF and Telerik.Reporting 17
I have searched for a solution, but there are too mutch examples which no longer function at all.
- I did not find a solution using embeded ReportDesigner because apparently no embedded designer exists anymore
- I did not find a solution with the external ReportDesigner because I could not transfer the data from the app to the designer.
How can I accomplish my task?

Dimitar
Telerik team
 answered on 19 Apr 2023
1 answer
275 views

When we print a report from WinUI report viewer, it looks like small scaled or resized report content. This is happened only when we containerized Telerik reporting service. You can see the screenshots below to compare.

This is example of test report when Telerik reporting service is running in Docker:

 

This is example of test report when Telerik reporting service is running without Docker:

 

The scaling issue happening only when printing, but when you export everything is fine. How we should fix this issue?

 

Thanks.

 

 

Todor
Telerik team
 answered on 19 Apr 2023
1 answer
869 views

Hello

I'm using a Telerik Blazor Native ReportViewer and try to display an existing report (created with the Telerik Report Designer) with dynamic data. This works great for simple data types such as strings, integers, floats etc. But I want to send a list (or an array if lists are not possible) of custom objects to the report and display it in e.g. a table.
From what I've read in your documentations I have to use a data source in the report designer. So I try to add a Object Data Source. I'm already stuck at the first step, where I have to choose a business object. The list is empty and I cannot select anything. If I understand this correct, then a business object is just an object/a class that contains some properties that I want to use in the report, is that correct? So I compiled a test application (class library .NET 7) with a file containing two classes.

namespace TestBusinessObject
{
    public class MyDataSource
    {
        public string ArtName { get; set; }
        public string Measures { get; set; }
        public string ArtNo { get; set; }
        public int Quantity { get; set; }
    }

    public class AnotherClass
    {
        public string Name { get; set; }
        public int Number { get; set; }
    }
}

I followed the steps in this article and copied my compiled DLL to the report designer's location and changed the config of the Telerik.ReportDesigner.exe.config. But there is still no business object to choose in the report designer.





I'm not even sure if this is the right way to achieve what I want, but it looks the most promising and makes the most sense to me.

Can you tell me what I'm doing wrong?

Kind Regards,
Roman

1 answer
700 views

I've a very simple report where has only one detail table is named: "table1".
A textbox named: textBoxTotalRecords should display the number of rows/records displayed in the details part

I tried to use something like setting this:  textBoxTotalRecords.value = RowNumber("table1") in the textbox value but not success. (picture)

If tried to force something like in the detail_ItemDataBound:
textBoxTotalRecords.value =666; it doesn't work

Even I created a couple of custom functions that hold the total number of records but I'm unable to assign them through (textBoxTotalRecords_ItemDataBinding or textBoxTotalRecords_ItemDataBound) because:

I found that these events
textBoxTotalRecords_ItemDataBinding
textBoxTotalRecords_ItemDataBound

Are fired before this:
detail_ItemDataBound

So Is not possible to assign the number of records got it in detail_ItemDataBound

Which is the simple way to display the number of records? is out there a demo of how to handle this properly?

 

Thank you

Momchil
Telerik team
 answered on 13 Apr 2023
1 answer
185 views

Hi,

I have an existing WPF project of .net framework 4.6 supported. Now I have upgraded Telerik;s WPF libraries to 2023.1.315.45 these are NoXaml binaries. We have also reports been used into the same project, I have upgraded to the version 17.0.23.315.. For reports have I have used libs : Telerik.Reporting.dll, Telerik.Reporting.XpsRendering.dll and Telerik.ReportViewer.Wpf.dll.

When I run it is crashing asking to use .40 version of the library of Telerik.Windows.Controls.dll. Can you please let me know with the given version how can I used both into the same project. I never had this issue older version, by older, I mean versions from 2021 (very old).

Looking forward to hearing back from you.

Thanks,

Parthiv

 

Todor
Telerik team
 answered on 13 Apr 2023
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?