Telerik Forums
Reporting Forum
3 answers
1.2K+ views
HI,

I want to share my experience with binding an IEnumerable<String> to a report.

Normally, you bind a collection of complex objects with public properties:
public sealed class MyType
{
  public String FirstName { get; set; }
  public String LastName { get; set; }
}
 
 
report.DataSource = new List<MyType>();

Then, in a report's textbox, you specify this expression to load the data from MyType object:
= Fields.FirstName + " " + Fields.LastName



But what if you want to just bind a list of strings without creating redundant wrapper types?
report.DataSource = new List<String>();

You can't just set "= Fields" expression to a textbox, it will produce "Incorrect use of Fields" exception. But you can set following expression and it will work (RawData is of type Object, so I guess it calls ToString() method internally):
= ReportItem.DataObject.RawData
Vic
Top achievements
Rank 2
 answered on 17 Jun 2020
1 answer
213 views

Hi all,

We are using Report Web Designer. We have implemented custom storage (IDefinitionStorage). We have implemented SaveDefinition method where it saves the edited report in a custom way.

There can be some validations and save can fail. For this I am just throwing a new Exception.  

The question is, which kind of exceptions needs to be thrown so that the message of exception shows in a report designer?

In an attachment you can see that the error message is showing in a general way, and it doesn't show my custom message.

 

Thanks,

Todor
Telerik team
 answered on 17 Jun 2020
2 answers
415 views

Hello,

I'm trying to test Telerik Report with .NET Core 3.1 and object data source.

The report is working correctly when running from Visual Studio but when I publish and put it in IIS, I see the below error in every binding.
"An error has occurred while processing TextBox 'textBox15': The expression contains object 'OpeningBalanceDate' that is not defined in the current context"

I'm using the report designer and the assemblies that has the object datasource are netstandard2.0

What could be the issue?

Katia
Telerik team
 answered on 17 Jun 2020
1 answer
1.6K+ views

I have Rest Service (ASP.Net Web Application-->Empty-->check MVC)

Result: successed (pictrure: 1.jpg)

I have project Angular and call Rest Service

<tr-viewer [containerStyle]="viewerContainerStyle"
[serviceUrl]="'http://localhost:56342/api/reports'"
[viewMode]="'INTERACTIVE'"
[scaleMode]="'SPECIFIC'"
[scale]="1.0">
</tr-viewer>

Error (picture: 2.jpg)

Error loading the report viewer's templates. 

 

Bob
Top achievements
Rank 2
Veteran
Iron
 answered on 16 Jun 2020
15 answers
2.0K+ views
I have a table that has a column that may or not be visible. When it isn't visible I then need to adjust the proceeding 2 columns, one to put in the now invisible column's space and the second to increase its width. I have been able to get the column to be invisible via formatting but am not sure how to move and adjust the other columns. I had the same issue with rows and had to create a table for each row and keep track of the visibility and location of each row myself.
Daniel
Top achievements
Rank 1
 answered on 15 Jun 2020
3 answers
212 views
We have 2020 R2. I'm trying to implement a ReportSource class but when I try to implement the required Clone method VS 2019 gives me the error "no suitable method found to override". What's going on?
Todor
Telerik team
 answered on 15 Jun 2020
0 answers
201 views

Hi,

I want to generate a pdf report expected to have 8000 pages. As of now I am experiencing Memory Out of Exception. Is it possible to generate the report in batch mode. For example, generate 1000 pages first then the next batches

or 

Is there any other ways to over come this memory out of exception issue.

 

 

Thanks

Mathavan
Top achievements
Rank 1
 asked on 15 Jun 2020
1 answer
298 views

I have a line chart report with only one series and has 4 Legends(Legend A, Legend B, Legend C & Legend D) in it. And I have assigned 4 different color patterns to the chart.

The order is Green, Red, Blue, Yellow.

 

Now, when the Report loads the data for all the Legends, the Colors are mapped correctly. For Example, Legend A = Green, Legend B = Red, Legend C = Blue & Legend D = Yellow in the same order.

There is a scenario where in the report has the data only for 2 legends( Legend B and Legend D). In this case, the report automatically chooses Legend B to be Green and Legend D to be Red.

Is there a way to set or map individual colors to the legends? Like Legend A should always be Green, Legend B as Red, Legend C as Blue & Legend D as Yellow.

I know if we use 4 series in the chart then this is possible, but i do not want to use multiple series.

Todor
Telerik team
 answered on 12 Jun 2020
2 answers
3.0K+ views

Good Day,

I would like to as if it is possible to create a table in the report with a dynamic result table from MSSQL Stored Procedure ?

 

Thank you,

Sherwin

Channah Miriam
Top achievements
Rank 1
 answered on 10 Jun 2020
1 answer
97 views

We use Telerick reporting version 13.0.19.222.

On an aspx page, we have a ReportViewer to display reports, we have the option on the page to switch between Interactive and PrintPreview mode.

When the report runs for parameters that generates a long report (100+ pages), the PrintPreview mode works fine, but the Interactive view basically crashes IE, Or at least, the report never displays and the aspx page gets in a state that makes it un-usable - we then have to reload the page if we need to run the report.

 

 

I could not see any errors coming from IE or the Telerick components, in the debug tools of IE or anywhere else.

 

 

When we try the exact same thing with any other browser (Chrome, Edge, etc...) the report loads fine in Interactive mode or Print Preview mode.

 

 

Is there anyway to fix this issue that you are aware of? Or is there known limitations with IE and the Intercative mode for the ReportViewer ?

Any help will be appreciated.

Thanks.

 

 

 

 

Todor
Telerik team
 answered on 09 Jun 2020
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?