Hello Telerik team!
In the attachment, there are two PDFs, generated by the same template (also in attachment): one built under Windows, another one - under Linux (Docker). See red boxes as defects on the screenshot:
Dockerfile fragment:
# MS TrueTypeFonts install
RUN wget http://ftp.de.debian.org/debian/pool/contrib/m/msttcorefonts/ttf-mscorefonts-installer_3.6_all.deb -P ~/Downloads
RUN apt install -y ~/Downloads/ttf-mscorefonts-installer_3.6_all.deb
RUN apt-get install -y libc6-dev
RUN apt-get install -y libgdiplus
RUN apt-get install -y libx11-dev
RUN rm -rf /var/lib/apt/lists/*
Please help us to resolve these issues in Linux.
Currently, the row/record delimiter when exporting to CSV is taken from the environment. This way, the same CSV document will have different line separators when exported from Windows and Linux.
It will be very useful if the row delimiter can be specified in the device information settings the same way the field delimiter can.
Currently, the MsSqlServerStorage CommandTimeout is with the default value that is 30 s. In some scenarios, like when the Search functionality is enabled and the report is very big, the generated ClientSearchItemsResource may be too big, and when attempting to save it in the storage the latter may throw the exception 'System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.'
The error may be avoided if the CommandTimeout can be increased.
Ways to reproduce the problem:
1. Create simple one table one column report, with right horizontal text alignment in the column.
2. Set a data source with multiple rows, with different lengths for the string, displayed in the table's column.
3. Render the report under Windows and under Linux - the column text on different rows will not be aligned properly on linux, but will be shifted to the left or right depending on string's contents and length.
I've done a bit reserch on PDF rendering, concerning libgdiplus "MeasureString" method deficiencies, and here's what I discovered so far:
1. The source of the problem is the fact that libgdiplus ends up using cairo to measure string glyphs, and it does it's font metric in whole pixels (integer), using the DPI of the context it is called in. In short, if the context is using 96DPI, cairo will use these 96DPI to calculate (and round) the font metrics, and to write strings eventually.
2. When libgdiplus is compiled to use pango, the problem is much smaller (several millimeter differences become part of the millimeter), because internally pango scales the measurement 1024 times, but it appears that this is not enough to resolve the problem.
3. When using libgdiplus (with or without pango inbetween it and cairo) for both "DrawString" and "MeasureString", everything is perfect, but the fundamental problem in Relerik Reporting to PDF is that it renders in a vector format, but uses text metering for pixel format - it uses System.Graphics.MeasureString which is a DPI vased metering (on Linux at least) but uses proprietary "PdfRenderer.DrawString" of the "PdfRendered" class, not the native Graphics.DrawString. Since cairo rounds every character glyph metrics to an integer value, the longer the string is, the larger the discrepancy will be between string rendering when PDF is viewed (based on floats/doubles) and Graphics.MeasureString (based on integers, at least on Linux).
Ways to resolve the issue:
1. The best way to resolve the issue is not to call Graphics.MeasureString at all, when rendering to vector based format, because it measures string based on the DPI on graphics context it is in. In other words, proprietary "PdfRenderer.MeasureString" must be implemented, which works with font glyphs directly, entirely using single or double precision math to calculate glyph dimensions and string dimensions.
2. Another, not so perfect, but HUGELY EASIER way is to set DPI of the rendering context of the PDF to a higher value, here's how:
For the moment, PdfContext's constructor looks like thispublic PdfContext(string ownerPassword, string userPassword)
{
this.dataFormatter = string.IsNullOrWhiteSpace(ownerPassword) ?
new DataFormatter() :
new DataFormatterEncypted(ownerPassword, userPassword);
this.bmp = new Bitmap(1, 1);
this.graphics = Graphics.FromImage(this.bmp);
this.hdc = this.graphics.GetHdc();
this.pdfFontCache = new PdfFontCache();
}
public PdfContext(string ownerPassword, string userPassword)
{
this.dataFormatter = string.IsNullOrWhiteSpace(ownerPassword) ?
new DataFormatter() :
new DataFormatterEncypted(ownerPassword, userPassword);
this.bmp = new Bitmap(1, 1);
bmp.SetResolution(9600, 9600); //ADDED
this.graphics = Graphics.FromImage(this.bmp);
this.hdc = this.graphics.GetHdc();
this.pdfFontCache = new PdfFontCache();
}
The default value of the report property SkipBlankPages is True and when there is an error in the report, for example, due to a problem with the connection to the database, the error message may be hidden as the report is not rendered at all.
The report should be rendered in order to display the error message also when SkipBlankPages is True.
I like the new open dialog for the Web Report Designer, but now my report names are all truncated and I can't tell what anything is. Can you please off a list view in the Open Dialog so all my names aren't "Company R..."
Pasting a HEX value to a report item whose color has not been set before leads to the error:
"An error has occurred. NaN is not a valid value for Int32."
The workaround is to set the color of that property through the ColorPicker control before attempting to paste the new HEX color. If a color has been selected before, the issue is not present.
Hello,
I am using the Blazor Web Report Designer on a page that is not the default route, i.e. "/". When I am at step 2 in the WebServiceDataSource wizard to add parameters, if I click the Add Parameter button it routes to the home page.
I believe this is caused by the href="#' empty route. Below is an animation of what I mean. This is also reproduced in the BlazorIntegrationDemo in the installation directory.
Currently, the Web Report Designer does not allow one to insert a report item in place of a table cell textbox.
Meanwhile, the Standalone Designer does allow such operations.
The print button does not work in Chrome and Edge when the PDF default behavior is set to Download PDF.
Currently there appears to be no functionality available to add additional attachments via the Telerik Reporting Send Mail dialog or programmatically by passing parameters to the Report Viewer using a model.
Scenario 1:
- When we email a new Quote, which is a Telerik Report, to a Customer we would like to automatically attach a "New Products Brochure". The brochure is a frequently updated pdf document that would reside on the server.
Scenario 2:
- When we email a Customer Invoice, which is a Telerik Report, to a Customer if:
1) It is the 1st Invoice we have sent them for the current Agreement then automatically attach the Agreement related to Invoice - where the Agreement is another Telerik Report.
2) The Customer has an outstanding balance with us then attach a "Customer Statement", which is another Telerik Report, in pdf format.
Thanks in advance.
When trying to use XML markup as Report Source for a SubReport, the error "Root element is missing" is being thrown.
The input field taking the XML markup seems to initially read only the first row of the XML markup. To work around this issue, expand the input field dropdown and select the <Expression> option then paste the XML markup and save.
Consider the following expression of HtmlTextBox:
= " <span style="text-decoration: underline">hello</span>"
It is evaluated as invalid due to the quotes. However, it works if you replace the inner ones with single quotes:
= " <span style="text-decoration: underline">hello</span>"