Telerik Forums
Reporting Forum
5 answers
360 views

Hi,

how should I transform data from my DataSource to show spaces correctly in HtmlTextBox?

The HTML renderer ignores repeated spaces (as I expeceted), so I thought about replacing space character " " with the non-breaking space HTML entity " ".

It is actually feasible with HtmlTextBoxes with a constant content, but the space collapse is also applied on strings from DataSource, and this behavior is not acceptable, as those spaces are meaningful.

Is there a way to transform values from DataSource? I tried to wrap Fields references with the Replace() expression, trying to replace spaces with related HTML entity, but it does not work.

I paste a TRDX with embedded JSON data source down here:

<?xml version="1.0" encoding="utf-8"?>
<Report DataSourceName="jsonDataSource1" Width="17cm" Name="Try not to collapse spaces" SnapGridSize="0.1cm" xmlns="http://schemas.telerik.com/reporting/2021/1.0">
  <DataSources>
    <JsonDataSource Name="jsonDataSource1">
      <Source>
        <String>ew0KICAiZm9vIjogInRoZSBzcGFjZXMgIGluc2lkZSAgIHRoaXMgICAgc3RyaW5nICAgICBzaG91bGQgbm90IGJlIGNvbGxhcHNlZCINCn0=</String>
      </Source>
    </JsonDataSource>
  </DataSources>
  <Items>
    <DetailSection Height="7cm" Name="detailSection1">
      <Items>
        <HtmlTextBox Width="16cm" Height="1cm" Left="0.5cm" Top="1.7cm" Value="HTMLTextBox with Field: {Fields.foo}" Name="htmlTextBox1" />
        <HtmlTextBox Width="16cm" Height="1cm" Left="0.5cm" Top="6cm" Value="These&nbsp;spaces&nbsp;&nbsp;should&nbsp;&nbsp;&nbsp;not&nbsp;&nbsp;&nbsp;&nbsp;be dropped" Name="htmlTextBox2" />
        <HtmlTextBox Width="16cm" Height="1cm" Left="0.5cm" Top="3.4cm" Value="HTMLTextBox with Field: {Replace(Fields.foo, " ", " ")}" Name="htmlTextBox3" />
        <HtmlTextBox Width="16cm" Height="1cm" Left="0.5cm" Top="4.6cm" Value="HTMLTextBox with Field: {HtmlEncode(Fields.foo)}" Name="htmlTextBox4" />
        <TextBox Width="16cm" Height="0.9cm" Left="0.5cm" Top="0.3cm" Value="Standard TextBox with Field: {Fields.foo}" Name="textBox1" />
      </Items>
    </DetailSection>
  </Items>
  <PageSettings PaperKind="A4" Landscape="False">
    <Margins>
      <MarginsU Left="2cm" Right="2cm" Top="2cm" Bottom="2cm" />
    </Margins>
  </PageSettings>
  <StyleSheet>
    <StyleRule>
      <Style>
        <Padding Left="2pt" Right="2pt" />
      </Style>
      <Selectors>
        <TypeSelector Type="TextItemBase" />
        <TypeSelector Type="HtmlTextBox" />
      </Selectors>
    </StyleRule>
  </StyleSheet>
</Report>

 

What do you think I'm doing wrong?

Todor
Telerik team
 answered on 12 Apr 2021
5 answers
200 views

Hi all,

In our app to show report we use HTML5 Report Viewer and Web Report designer. Our project based on .Net5.

There is a problem with report web designer after updating to R1.2021version. I used web service datasource in a report and created @url inline parameter and $expand query parameter into that datasource to make OData query. But as you see from the attached file, value of those parameters shown Object (see Invoice.png attached picture) instead of showing real value. I see this issue after updating to R1 2021, but in previous version it was showing correctly. If you open the report via Standalone Report Designer it shows correctly (second attached picture). Is it problem in R1 2021 or should I change something?

Todor
Telerik team
 answered on 12 Apr 2021
14 answers
2.1K+ views
I'm trying to find documentation on creating a Report Book.  There seems to be very little.  Can assist me in creating a Report Book from scratch?
Examples, videos, etc would all be helpful.  
Todor
Telerik team
 answered on 12 Apr 2021
1 answer
819 views

I have a problem with the map control. I get an error (418) Blocked.

 

Dimitar
Telerik team
 answered on 08 Apr 2021
3 answers
653 views
The last thing I need to make this report usable is to be able to sort the contents of the detail section by line number (which is an integer). The Group Explorer has a column called Sorting, but it seems that the Detail section cannot be sorted. How do I sort that section according to the line number on the sales order. Right now, when I print, I get line numbers in a random order instead of 1, 2, 3, etc.
Todor
Telerik team
 answered on 08 Apr 2021
3 answers
906 views

I am using report viewer in a Blazor project.

 

The images in report do not show up in the report. However, they do appear when i try to print or export the report.

 

 

Please advise ?

 

Eric R | Senior Technical Support Engineer
Telerik team
 answered on 07 Apr 2021
6 answers
206 views

Hello,

I created a report to display values and totals.
I have a problem with the Bordereau N ° 212319
it shows me the total of "Nombre de Plis" in just "DD" column (1 233) while it should appears to display (897 in "DD" and 316 in "TF") as the capture that I have attached. Same problem in "Poids Total"

I am sharing my sample with you online via Dropbox. please check this and advise me any way to address this requirement.

https://www.dropbox.com/s/zts6gyiefp5qdce/myReport.trdp?dl=0
Thanks in advance.

Dimitar
Telerik team
 answered on 07 Apr 2021
1 answer
304 views

Hello!

I am evaluating the tool for my company.
I am creating a .NET 5 application that accesses an Oracle database.
Through the designer, I managed to assemble the report and managed to view the information through the Preview.
When I try to run the report and export a PDF I get the following message:
"Unable to establish a connection to the database. Please verify that your connection string is valid. In case you use a named connection string from the application configuration file, make sure the name is correct and the connection string settings are present in the configuration file of your application. "

Is there a document on how to export a report as PDF using .NET 5 and accessing the Oracle database?

Todor
Telerik team
 answered on 06 Apr 2021
7 answers
2.7K+ views

I'm using Telerik Reporting R1 2019 for ASP.NET Core where the Reporting Services and the HTML5 viewer is at the same project.

Can you direct me to the correct documentation regarding how to set the connection string in this project ?
As I cannot seem to make it work. When it moves to "netcoreapp2.2" does it still need "App.config" to store the connection string ?

I keep getting the unable to connect to database.

Neli
Telerik team
 answered on 06 Apr 2021
1 answer
160 views

Dear Telerik Team

Pls give any suggestions for this?

Eric R | Senior Technical Support Engineer
Telerik team
 answered on 02 Apr 2021
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?