Raporların Fontları
This commit is contained in:
parent
75b459d79e
commit
e8295fd449
12 changed files with 73 additions and 65 deletions
|
|
@ -90,7 +90,7 @@ RUN apk add --no-cache \
|
||||||
fontconfig \
|
fontconfig \
|
||||||
ttf-dejavu \
|
ttf-dejavu \
|
||||||
ttf-liberation \
|
ttf-liberation \
|
||||||
font-noto
|
font-noto-emoji
|
||||||
|
|
||||||
# Font cache oluştur
|
# Font cache oluştur
|
||||||
RUN fc-cache -f -v
|
RUN fc-cache -f -v
|
||||||
|
|
|
||||||
|
|
@ -4103,7 +4103,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson,
|
||||||
|
EditorOptions = EncodeHtmlJson
|
||||||
},
|
},
|
||||||
new() {
|
new() {
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ public static class ListFormSeeder_DefaultJsons
|
||||||
});
|
});
|
||||||
|
|
||||||
public static readonly string DefaultFilterJson = "\"IsDeleted\" = 'false'";
|
public static readonly string DefaultFilterJson = "\"IsDeleted\" = 'false'";
|
||||||
|
public static readonly string EncodeHtmlJson = "{ \"encodeHtml\" = false }";
|
||||||
public static string DefaultFilterRowJson(bool visible = true) => JsonSerializer.Serialize(new GridFilterRowDto { Visible = visible });
|
public static string DefaultFilterRowJson(bool visible = true) => JsonSerializer.Serialize(new GridFilterRowDto { Visible = visible });
|
||||||
public static string DefaultHeaderFilterJson(bool visible = true) => JsonSerializer.Serialize(new { Visible = visible });
|
public static string DefaultHeaderFilterJson(bool visible = true) => JsonSerializer.Serialize(new { Visible = visible });
|
||||||
public static string DefaultSearchPanelJson(bool visible = true) => JsonSerializer.Serialize(new { Visible = visible });
|
public static string DefaultSearchPanelJson(bool visible = true) => JsonSerializer.Serialize(new { Visible = visible });
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,7 @@ public class DynamicFormReport : XtraReport
|
||||||
Margins = CreateReportMargins(HorizontalMargin, HorizontalMargin, 35, 35);
|
Margins = CreateReportMargins(HorizontalMargin, HorizontalMargin, 35, 35);
|
||||||
PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4;
|
PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4;
|
||||||
Landscape = false;
|
Landscape = false;
|
||||||
Font = new DXFont("Arial", 8F);
|
Font = DynamicReportFontHelper.CreateDataFont();
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma warning disable CA1416
|
#pragma warning disable CA1416
|
||||||
|
|
@ -178,7 +178,7 @@ public class DynamicFormReport : XtraReport
|
||||||
{
|
{
|
||||||
Text = DynamicReportImageHelper.GetLocalizedReportTitle(listForm, localizer),
|
Text = DynamicReportImageHelper.GetLocalizedReportTitle(listForm, localizer),
|
||||||
BoundsF = new System.Drawing.RectangleF(0, 0, pageWidth, 30),
|
BoundsF = new System.Drawing.RectangleF(0, 0, pageWidth, 30),
|
||||||
Font = new DXFont("Arial", 14F, DXFontStyle.Bold),
|
Font = DynamicReportFontHelper.CreateValueFont(14F, DXFontStyle.Bold),
|
||||||
TextAlignment = TextAlignment.MiddleLeft
|
TextAlignment = TextAlignment.MiddleLeft
|
||||||
});
|
});
|
||||||
if (!isSubReport)
|
if (!isSubReport)
|
||||||
|
|
@ -193,7 +193,7 @@ public class DynamicFormReport : XtraReport
|
||||||
{
|
{
|
||||||
TextFormatString = "Sayfa {0} / {1}",
|
TextFormatString = "Sayfa {0} / {1}",
|
||||||
BoundsF = new System.Drawing.RectangleF(pageWidth / 2, 8, pageWidth / 2, 18),
|
BoundsF = new System.Drawing.RectangleF(pageWidth / 2, 8, pageWidth / 2, 18),
|
||||||
Font = new DXFont("Arial", 8F),
|
Font = DynamicReportFontHelper.CreateValueFont(8F),
|
||||||
TextAlignment = TextAlignment.MiddleRight
|
TextAlignment = TextAlignment.MiddleRight
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -206,7 +206,7 @@ public class DynamicFormReport : XtraReport
|
||||||
{
|
{
|
||||||
Text = DynamicReportImageHelper.Localize(localizer, group.Caption, group.Caption),
|
Text = DynamicReportImageHelper.Localize(localizer, group.Caption, group.Caption),
|
||||||
BoundsF = new System.Drawing.RectangleF(0, y, pageWidth, 22),
|
BoundsF = new System.Drawing.RectangleF(0, y, pageWidth, 22),
|
||||||
Font = new DXFont("Arial", 8F, DXFontStyle.Bold),
|
Font = DynamicReportFontHelper.CreateHeaderFont(),
|
||||||
BackColor = System.Drawing.Color.FromArgb(238, 242, 247),
|
BackColor = System.Drawing.Color.FromArgb(238, 242, 247),
|
||||||
Padding = new PaddingInfo(5, 5, 2, 2),
|
Padding = new PaddingInfo(5, 5, 2, 2),
|
||||||
TextAlignment = TextAlignment.MiddleLeft
|
TextAlignment = TextAlignment.MiddleLeft
|
||||||
|
|
@ -267,7 +267,7 @@ public class DynamicFormReport : XtraReport
|
||||||
{
|
{
|
||||||
Text = DynamicReportImageHelper.GetLocalizedFieldCaption(field.Field, localizer),
|
Text = DynamicReportImageHelper.GetLocalizedFieldCaption(field.Field, localizer),
|
||||||
BoundsF = new System.Drawing.RectangleF(x, y, width, height),
|
BoundsF = new System.Drawing.RectangleF(x, y, width, height),
|
||||||
Font = new DXFont("Arial", 8F, DXFontStyle.Bold),
|
Font = DynamicReportFontHelper.CreateHeaderFont(),
|
||||||
BackColor = System.Drawing.Color.FromArgb(248, 250, 252),
|
BackColor = System.Drawing.Color.FromArgb(248, 250, 252),
|
||||||
Borders = BorderSide.All,
|
Borders = BorderSide.All,
|
||||||
BorderColor = FieldBorderColor,
|
BorderColor = FieldBorderColor,
|
||||||
|
|
@ -294,7 +294,7 @@ public class DynamicFormReport : XtraReport
|
||||||
var label = new XRLabel
|
var label = new XRLabel
|
||||||
{
|
{
|
||||||
BoundsF = new System.Drawing.RectangleF(x, y, width, height),
|
BoundsF = new System.Drawing.RectangleF(x, y, width, height),
|
||||||
Font = new DXFont("Arial", 8F),
|
Font = DynamicReportFontHelper.CreateDataFont(),
|
||||||
Borders = BorderSide.All,
|
Borders = BorderSide.All,
|
||||||
BorderColor = FieldBorderColor,
|
BorderColor = FieldBorderColor,
|
||||||
BorderWidth = 0.25F,
|
BorderWidth = 0.25F,
|
||||||
|
|
@ -307,7 +307,6 @@ public class DynamicFormReport : XtraReport
|
||||||
if (TryGetFormattedValue(field, row, out var text))
|
if (TryGetFormattedValue(field, row, out var text))
|
||||||
{
|
{
|
||||||
label.Text = text;
|
label.Text = text;
|
||||||
label.Font = CreateValueFont(text);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -328,7 +327,7 @@ public class DynamicFormReport : XtraReport
|
||||||
var richText = new XRRichText
|
var richText = new XRRichText
|
||||||
{
|
{
|
||||||
BoundsF = new System.Drawing.RectangleF(x, y, width, height),
|
BoundsF = new System.Drawing.RectangleF(x, y, width, height),
|
||||||
Font = new DXFont("Arial", 8F),
|
Font = DynamicReportFontHelper.CreateDataFont(),
|
||||||
Borders = BorderSide.All,
|
Borders = BorderSide.All,
|
||||||
BorderColor = FieldBorderColor,
|
BorderColor = FieldBorderColor,
|
||||||
BorderWidth = 0.25F,
|
BorderWidth = 0.25F,
|
||||||
|
|
@ -348,33 +347,6 @@ public class DynamicFormReport : XtraReport
|
||||||
return richText;
|
return richText;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static DXFont CreateValueFont(string text)
|
|
||||||
{
|
|
||||||
return ContainsEmoji(text)
|
|
||||||
? new DXFont("Segoe UI Emoji", 8F)
|
|
||||||
: new DXFont("Arial", 8F);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static bool ContainsEmoji(string text)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(text))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var rune in text.EnumerateRunes())
|
|
||||||
{
|
|
||||||
if (rune.Value is >= 0x1F000 and <= 0x1FAFF or
|
|
||||||
>= 0x2600 and <= 0x27BF or
|
|
||||||
>= 0x2300 and <= 0x23FF)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static XRPanel CreateImageValuePanel(
|
private static XRPanel CreateImageValuePanel(
|
||||||
FormReportField field,
|
FormReportField field,
|
||||||
IDictionary<string, object> row,
|
IDictionary<string, object> row,
|
||||||
|
|
|
||||||
|
|
@ -215,7 +215,7 @@ public class DynamicGridReport : XtraReport
|
||||||
var requestedContentWidth = visibleFields.Sum(x => x.IsImage ? GetImageColumnWidth(x) : GetPreferredColumnWidth(x.Field));
|
var requestedContentWidth = visibleFields.Sum(x => x.IsImage ? GetImageColumnWidth(x) : GetPreferredColumnWidth(x.Field));
|
||||||
Landscape = !isSubReport &&
|
Landscape = !isSubReport &&
|
||||||
(visibleFields.Count >= LandscapeColumnThreshold || requestedContentWidth > portraitContentWidth);
|
(visibleFields.Count >= LandscapeColumnThreshold || requestedContentWidth > portraitContentWidth);
|
||||||
Font = new DXFont("Arial", 8F);
|
Font = DynamicReportFontHelper.CreateDataFont();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static System.Drawing.Printing.Margins CreateReportMargins(
|
private static System.Drawing.Printing.Margins CreateReportMargins(
|
||||||
|
|
@ -326,7 +326,7 @@ public class DynamicGridReport : XtraReport
|
||||||
{
|
{
|
||||||
Text = DynamicReportImageHelper.GetLocalizedReportTitle(listForm, localizer),
|
Text = DynamicReportImageHelper.GetLocalizedReportTitle(listForm, localizer),
|
||||||
BoundsF = new System.Drawing.RectangleF(0, 0, pageWidth, 30),
|
BoundsF = new System.Drawing.RectangleF(0, 0, pageWidth, 30),
|
||||||
Font = new DXFont("Arial", 14F, DXFontStyle.Bold),
|
Font = DynamicReportFontHelper.CreateValueFont(14F, DXFontStyle.Bold),
|
||||||
TextAlignment = TextAlignment.MiddleLeft
|
TextAlignment = TextAlignment.MiddleLeft
|
||||||
});
|
});
|
||||||
if (!isSubReport)
|
if (!isSubReport)
|
||||||
|
|
@ -345,7 +345,7 @@ public class DynamicGridReport : XtraReport
|
||||||
{
|
{
|
||||||
TextFormatString = "Sayfa {0} / {1}",
|
TextFormatString = "Sayfa {0} / {1}",
|
||||||
BoundsF = new System.Drawing.RectangleF(pageWidth / 2, 8, pageWidth / 2, 18),
|
BoundsF = new System.Drawing.RectangleF(pageWidth / 2, 8, pageWidth / 2, 18),
|
||||||
Font = new DXFont("Arial", 8F),
|
Font = DynamicReportFontHelper.CreateValueFont(8F),
|
||||||
TextAlignment = TextAlignment.MiddleRight
|
TextAlignment = TextAlignment.MiddleRight
|
||||||
};
|
};
|
||||||
bottomMargin.Controls.Add(pageInfo);
|
bottomMargin.Controls.Add(pageInfo);
|
||||||
|
|
@ -411,7 +411,7 @@ public class DynamicGridReport : XtraReport
|
||||||
{
|
{
|
||||||
Text = $"{caption}:",
|
Text = $"{caption}:",
|
||||||
BoundsF = new System.Drawing.RectangleF(indent, 3, captionWidth, 20),
|
BoundsF = new System.Drawing.RectangleF(indent, 3, captionWidth, 20),
|
||||||
Font = new DXFont("Arial", 8F, DXFontStyle.Bold),
|
Font = DynamicReportFontHelper.CreateHeaderFont(),
|
||||||
Padding = new PaddingInfo(6, 2, 0, 0),
|
Padding = new PaddingInfo(6, 2, 0, 0),
|
||||||
TextAlignment = TextAlignment.MiddleLeft,
|
TextAlignment = TextAlignment.MiddleLeft,
|
||||||
BackColor = System.Drawing.Color.FromArgb(226, 232, 240),
|
BackColor = System.Drawing.Color.FromArgb(226, 232, 240),
|
||||||
|
|
@ -422,7 +422,7 @@ public class DynamicGridReport : XtraReport
|
||||||
var valueLabel = new XRLabel
|
var valueLabel = new XRLabel
|
||||||
{
|
{
|
||||||
BoundsF = new System.Drawing.RectangleF(indent + captionWidth, 3, availableWidth - captionWidth, 20),
|
BoundsF = new System.Drawing.RectangleF(indent + captionWidth, 3, availableWidth - captionWidth, 20),
|
||||||
Font = new DXFont("Arial", 8F, DXFontStyle.Bold),
|
Font = DynamicReportFontHelper.CreateHeaderFont(),
|
||||||
Padding = new PaddingInfo(6, 6, 0, 0),
|
Padding = new PaddingInfo(6, 6, 0, 0),
|
||||||
TextAlignment = TextAlignment.MiddleLeft,
|
TextAlignment = TextAlignment.MiddleLeft,
|
||||||
BackColor = System.Drawing.Color.FromArgb(241, 245, 249),
|
BackColor = System.Drawing.Color.FromArgb(241, 245, 249),
|
||||||
|
|
@ -492,7 +492,7 @@ public class DynamicGridReport : XtraReport
|
||||||
Text = DynamicReportImageHelper.GetLocalizedFieldCaption(field, localizer),
|
Text = DynamicReportImageHelper.GetLocalizedFieldCaption(field, localizer),
|
||||||
WidthF = width,
|
WidthF = width,
|
||||||
Weight = width,
|
Weight = width,
|
||||||
Font = new DXFont("Arial", 8F, DXFontStyle.Bold),
|
Font = DynamicReportFontHelper.CreateHeaderFont(),
|
||||||
BackColor = System.Drawing.Color.FromArgb(238, 242, 247),
|
BackColor = System.Drawing.Color.FromArgb(238, 242, 247),
|
||||||
Padding = new PaddingInfo(4, 4, 2, 2),
|
Padding = new PaddingInfo(4, 4, 2, 2),
|
||||||
TextAlignment = TextAlignment.MiddleCenter,
|
TextAlignment = TextAlignment.MiddleCenter,
|
||||||
|
|
@ -526,7 +526,7 @@ public class DynamicGridReport : XtraReport
|
||||||
{
|
{
|
||||||
WidthF = width,
|
WidthF = width,
|
||||||
Weight = width,
|
Weight = width,
|
||||||
Font = new DXFont("Arial", 8F),
|
Font = DynamicReportFontHelper.CreateDataFont(),
|
||||||
Padding = new PaddingInfo(4, 4, 2, 2),
|
Padding = new PaddingInfo(4, 4, 2, 2),
|
||||||
TextAlignment = DynamicReportImageHelper.ToTextAlignment(field.Alignment, field.SourceDbType),
|
TextAlignment = DynamicReportImageHelper.ToTextAlignment(field.Alignment, field.SourceDbType),
|
||||||
Multiline = true,
|
Multiline = true,
|
||||||
|
|
@ -556,7 +556,7 @@ public class DynamicGridReport : XtraReport
|
||||||
var richText = new XRRichText
|
var richText = new XRRichText
|
||||||
{
|
{
|
||||||
BoundsF = new System.Drawing.RectangleF(0, 0, width, height),
|
BoundsF = new System.Drawing.RectangleF(0, 0, width, height),
|
||||||
Font = new DXFont("Arial", 8F),
|
Font = DynamicReportFontHelper.CreateDataFont(),
|
||||||
Padding = new PaddingInfo(4, 4, 2, 2),
|
Padding = new PaddingInfo(4, 4, 2, 2),
|
||||||
CanGrow = true
|
CanGrow = true
|
||||||
};
|
};
|
||||||
|
|
@ -574,7 +574,7 @@ public class DynamicGridReport : XtraReport
|
||||||
{
|
{
|
||||||
WidthF = width,
|
WidthF = width,
|
||||||
Weight = width,
|
Weight = width,
|
||||||
Font = new DXFont("Arial", 8F, DXFontStyle.Bold),
|
Font = DynamicReportFontHelper.CreateDataFont(DXFontStyle.Bold),
|
||||||
Padding = new PaddingInfo(4, 4, 2, 2),
|
Padding = new PaddingInfo(4, 4, 2, 2),
|
||||||
TextAlignment = DynamicReportImageHelper.ToTextAlignment(field.Alignment, field.SourceDbType)
|
TextAlignment = DynamicReportImageHelper.ToTextAlignment(field.Alignment, field.SourceDbType)
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,7 @@ namespace Sozsoft.Reports.PredefinedReports
|
||||||
this.DetailCaption1.BorderColor = System.Drawing.Color.White;
|
this.DetailCaption1.BorderColor = System.Drawing.Color.White;
|
||||||
this.DetailCaption1.Borders = DevExpress.XtraPrinting.BorderSide.Left;
|
this.DetailCaption1.Borders = DevExpress.XtraPrinting.BorderSide.Left;
|
||||||
this.DetailCaption1.BorderWidth = 2F;
|
this.DetailCaption1.BorderWidth = 2F;
|
||||||
this.DetailCaption1.Font = new DevExpress.Drawing.DXFont("Arial", 8.25F, DevExpress.Drawing.DXFontStyle.Bold);
|
this.DetailCaption1.Font = DynamicReportFontHelper.CreateHeaderFont();
|
||||||
this.DetailCaption1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(70)))), ((int)(((byte)(80)))));
|
this.DetailCaption1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(70)))), ((int)(((byte)(80)))));
|
||||||
this.DetailCaption1.Name = "DetailCaption1";
|
this.DetailCaption1.Name = "DetailCaption1";
|
||||||
this.DetailCaption1.Padding = new DevExpress.XtraPrinting.PaddingInfo(6, 6, 0, 0, 100F);
|
this.DetailCaption1.Padding = new DevExpress.XtraPrinting.PaddingInfo(6, 6, 0, 0, 100F);
|
||||||
|
|
@ -146,7 +146,7 @@ namespace Sozsoft.Reports.PredefinedReports
|
||||||
this.DetailData1.BorderColor = System.Drawing.Color.Transparent;
|
this.DetailData1.BorderColor = System.Drawing.Color.Transparent;
|
||||||
this.DetailData1.Borders = DevExpress.XtraPrinting.BorderSide.Left;
|
this.DetailData1.Borders = DevExpress.XtraPrinting.BorderSide.Left;
|
||||||
this.DetailData1.BorderWidth = 2F;
|
this.DetailData1.BorderWidth = 2F;
|
||||||
this.DetailData1.Font = new DevExpress.Drawing.DXFont("Arial", 8.25F);
|
this.DetailData1.Font = DynamicReportFontHelper.CreateDataFont();
|
||||||
this.DetailData1.ForeColor = System.Drawing.Color.Black;
|
this.DetailData1.ForeColor = System.Drawing.Color.Black;
|
||||||
this.DetailData1.Name = "DetailData1";
|
this.DetailData1.Name = "DetailData1";
|
||||||
this.DetailData1.Padding = new DevExpress.XtraPrinting.PaddingInfo(6, 6, 0, 0, 100F);
|
this.DetailData1.Padding = new DevExpress.XtraPrinting.PaddingInfo(6, 6, 0, 0, 100F);
|
||||||
|
|
@ -158,7 +158,7 @@ namespace Sozsoft.Reports.PredefinedReports
|
||||||
this.DetailData3_Odd.BorderColor = System.Drawing.Color.Transparent;
|
this.DetailData3_Odd.BorderColor = System.Drawing.Color.Transparent;
|
||||||
this.DetailData3_Odd.Borders = DevExpress.XtraPrinting.BorderSide.None;
|
this.DetailData3_Odd.Borders = DevExpress.XtraPrinting.BorderSide.None;
|
||||||
this.DetailData3_Odd.BorderWidth = 1F;
|
this.DetailData3_Odd.BorderWidth = 1F;
|
||||||
this.DetailData3_Odd.Font = new DevExpress.Drawing.DXFont("Arial", 8.25F);
|
this.DetailData3_Odd.Font = DynamicReportFontHelper.CreateDataFont();
|
||||||
this.DetailData3_Odd.ForeColor = System.Drawing.Color.Black;
|
this.DetailData3_Odd.ForeColor = System.Drawing.Color.Black;
|
||||||
this.DetailData3_Odd.Name = "DetailData3_Odd";
|
this.DetailData3_Odd.Name = "DetailData3_Odd";
|
||||||
this.DetailData3_Odd.Padding = new DevExpress.XtraPrinting.PaddingInfo(6, 6, 0, 0, 100F);
|
this.DetailData3_Odd.Padding = new DevExpress.XtraPrinting.PaddingInfo(6, 6, 0, 0, 100F);
|
||||||
|
|
@ -182,7 +182,7 @@ namespace Sozsoft.Reports.PredefinedReports
|
||||||
this.sqlDataSource1});
|
this.sqlDataSource1});
|
||||||
this.DataMember = TableNameResolver.GetFullTableName(nameof(TableNameEnum.ReportTemplate));
|
this.DataMember = TableNameResolver.GetFullTableName(nameof(TableNameEnum.ReportTemplate));
|
||||||
this.DataSource = this.sqlDataSource1;
|
this.DataSource = this.sqlDataSource1;
|
||||||
this.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F);
|
this.Font = DynamicReportFontHelper.CreateDataFont();
|
||||||
this.StyleSheet.AddRange(new DevExpress.XtraReports.UI.XRControlStyle[] {
|
this.StyleSheet.AddRange(new DevExpress.XtraReports.UI.XRControlStyle[] {
|
||||||
this.Title,
|
this.Title,
|
||||||
this.DetailCaption1,
|
this.DetailCaption1,
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ public partial class DynamicReport : XtraReport
|
||||||
HorizontalMargin,
|
HorizontalMargin,
|
||||||
VerticalMargin,
|
VerticalMargin,
|
||||||
VerticalMargin);
|
VerticalMargin);
|
||||||
Font = new DXFont("Arial", 8F);
|
Font = DynamicReportFontHelper.CreateDataFont();
|
||||||
|
|
||||||
TopMargin.HeightF = Margins.Top;
|
TopMargin.HeightF = Margins.Top;
|
||||||
BottomMargin.HeightF = Margins.Bottom;
|
BottomMargin.HeightF = Margins.Bottom;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
using System;
|
||||||
|
using DevExpress.Drawing;
|
||||||
|
|
||||||
|
namespace Sozsoft.Reports.PredefinedReports;
|
||||||
|
|
||||||
|
internal static class DynamicReportFontHelper
|
||||||
|
{
|
||||||
|
public const float HeaderFontSize = 9F;
|
||||||
|
public const float DataFontSize = 8.5F;
|
||||||
|
|
||||||
|
private const string WindowsFontFamily = "Arial";
|
||||||
|
private const string LinuxFontFamily = "Liberation Sans";
|
||||||
|
|
||||||
|
public static DXFont CreateHeaderFont(DXFontStyle style = DXFontStyle.Bold) =>
|
||||||
|
CreateValueFont(HeaderFontSize, style);
|
||||||
|
|
||||||
|
public static DXFont CreateDataFont(DXFontStyle style = DXFontStyle.Regular) =>
|
||||||
|
CreateValueFont(DataFontSize, style);
|
||||||
|
|
||||||
|
public static DXFont CreateValueFont(float size, DXFontStyle style = DXFontStyle.Regular)
|
||||||
|
{
|
||||||
|
var fontFamily = OperatingSystem.IsLinux()
|
||||||
|
? LinuxFontFamily
|
||||||
|
: WindowsFontFamily;
|
||||||
|
|
||||||
|
return new DXFont(fontFamily, size, style);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -285,7 +285,7 @@ internal static class DynamicReportImageHelper
|
||||||
PageInfo = PageInfo.DateTime,
|
PageInfo = PageInfo.DateTime,
|
||||||
TextFormatString = "{0:dd.MM.yyyy HH:mm}",
|
TextFormatString = "{0:dd.MM.yyyy HH:mm}",
|
||||||
BoundsF = new System.Drawing.RectangleF(pageWidth - width, 0, width, 18),
|
BoundsF = new System.Drawing.RectangleF(pageWidth - width, 0, width, 18),
|
||||||
Font = new DevExpress.Drawing.DXFont("Arial", 8F),
|
Font = DynamicReportFontHelper.CreateHeaderFont(DevExpress.Drawing.DXFontStyle.Regular),
|
||||||
TextAlignment = TextAlignment.MiddleRight,
|
TextAlignment = TextAlignment.MiddleRight,
|
||||||
CanGrow = false
|
CanGrow = false
|
||||||
});
|
});
|
||||||
|
|
@ -302,7 +302,7 @@ internal static class DynamicReportImageHelper
|
||||||
{
|
{
|
||||||
Text = userName,
|
Text = userName,
|
||||||
BoundsF = new System.Drawing.RectangleF(0, 8, pageWidth / 2, 18),
|
BoundsF = new System.Drawing.RectangleF(0, 8, pageWidth / 2, 18),
|
||||||
Font = new DevExpress.Drawing.DXFont("Arial", 7.5F),
|
Font = DynamicReportFontHelper.CreateValueFont(7.5F),
|
||||||
TextAlignment = TextAlignment.MiddleLeft,
|
TextAlignment = TextAlignment.MiddleLeft,
|
||||||
CanGrow = false,
|
CanGrow = false,
|
||||||
Multiline = false
|
Multiline = false
|
||||||
|
|
@ -323,7 +323,7 @@ internal static class DynamicReportImageHelper
|
||||||
{
|
{
|
||||||
Text = criteriaText,
|
Text = criteriaText,
|
||||||
BoundsF = new System.Drawing.RectangleF(0, 28, pageWidth, 18),
|
BoundsF = new System.Drawing.RectangleF(0, 28, pageWidth, 18),
|
||||||
Font = new DevExpress.Drawing.DXFont("Arial", 7.5F),
|
Font = DynamicReportFontHelper.CreateHeaderFont(DevExpress.Drawing.DXFontStyle.Regular),
|
||||||
ForeColor = System.Drawing.Color.FromArgb(100, 116, 139),
|
ForeColor = System.Drawing.Color.FromArgb(100, 116, 139),
|
||||||
TextAlignment = TextAlignment.MiddleLeft,
|
TextAlignment = TextAlignment.MiddleLeft,
|
||||||
CanGrow = true,
|
CanGrow = true,
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,7 @@ public class DynamicTreeReport : XtraReport
|
||||||
var portraitContentWidth = A4PortraitWidth - Margins.Left - Margins.Right;
|
var portraitContentWidth = A4PortraitWidth - Margins.Left - Margins.Right;
|
||||||
var requestedContentWidth = visibleFields.Sum(x => x.IsImage ? GetImageColumnWidth(x) : GetPreferredColumnWidth(x.Field));
|
var requestedContentWidth = visibleFields.Sum(x => x.IsImage ? GetImageColumnWidth(x) : GetPreferredColumnWidth(x.Field));
|
||||||
Landscape = visibleFields.Count >= LandscapeColumnThreshold || requestedContentWidth > portraitContentWidth;
|
Landscape = visibleFields.Count >= LandscapeColumnThreshold || requestedContentWidth > portraitContentWidth;
|
||||||
Font = new DXFont("Arial", 8F);
|
Font = DynamicReportFontHelper.CreateDataFont();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static System.Drawing.Printing.Margins CreateReportMargins(
|
private static System.Drawing.Printing.Margins CreateReportMargins(
|
||||||
|
|
@ -446,7 +446,7 @@ public class DynamicTreeReport : XtraReport
|
||||||
{
|
{
|
||||||
Text = DynamicReportImageHelper.GetLocalizedReportTitle(listForm, localizer),
|
Text = DynamicReportImageHelper.GetLocalizedReportTitle(listForm, localizer),
|
||||||
BoundsF = new System.Drawing.RectangleF(0, 0, pageWidth, 30),
|
BoundsF = new System.Drawing.RectangleF(0, 0, pageWidth, 30),
|
||||||
Font = new DXFont("Arial", 14F, DXFontStyle.Bold),
|
Font = DynamicReportFontHelper.CreateValueFont(14F, DXFontStyle.Bold),
|
||||||
TextAlignment = TextAlignment.MiddleLeft
|
TextAlignment = TextAlignment.MiddleLeft
|
||||||
});
|
});
|
||||||
if (!isSubReport)
|
if (!isSubReport)
|
||||||
|
|
@ -462,7 +462,7 @@ public class DynamicTreeReport : XtraReport
|
||||||
{
|
{
|
||||||
TextFormatString = "Sayfa {0} / {1}",
|
TextFormatString = "Sayfa {0} / {1}",
|
||||||
BoundsF = new System.Drawing.RectangleF(pageWidth / 2, 8, pageWidth / 2, 18),
|
BoundsF = new System.Drawing.RectangleF(pageWidth / 2, 8, pageWidth / 2, 18),
|
||||||
Font = new DXFont("Arial", 8F),
|
Font = DynamicReportFontHelper.CreateValueFont(8F),
|
||||||
TextAlignment = TextAlignment.MiddleRight
|
TextAlignment = TextAlignment.MiddleRight
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -516,7 +516,7 @@ public class DynamicTreeReport : XtraReport
|
||||||
Text = DynamicReportImageHelper.GetLocalizedFieldCaption(column.Field, localizer),
|
Text = DynamicReportImageHelper.GetLocalizedFieldCaption(column.Field, localizer),
|
||||||
WidthF = width,
|
WidthF = width,
|
||||||
Weight = width,
|
Weight = width,
|
||||||
Font = new DXFont("Arial", 8F, DXFontStyle.Bold),
|
Font = DynamicReportFontHelper.CreateHeaderFont(),
|
||||||
BackColor = System.Drawing.Color.FromArgb(238, 242, 247),
|
BackColor = System.Drawing.Color.FromArgb(238, 242, 247),
|
||||||
Padding = new PaddingInfo(4, 4, 2, 2),
|
Padding = new PaddingInfo(4, 4, 2, 2),
|
||||||
TextAlignment = TextAlignment.MiddleCenter,
|
TextAlignment = TextAlignment.MiddleCenter,
|
||||||
|
|
@ -550,7 +550,7 @@ public class DynamicTreeReport : XtraReport
|
||||||
{
|
{
|
||||||
WidthF = width,
|
WidthF = width,
|
||||||
Weight = width,
|
Weight = width,
|
||||||
Font = new DXFont("Arial", 8F),
|
Font = DynamicReportFontHelper.CreateDataFont(),
|
||||||
Padding = new PaddingInfo(4, 4, 2, 2),
|
Padding = new PaddingInfo(4, 4, 2, 2),
|
||||||
TextAlignment = isTreeColumn
|
TextAlignment = isTreeColumn
|
||||||
? TextAlignment.MiddleLeft
|
? TextAlignment.MiddleLeft
|
||||||
|
|
@ -594,7 +594,7 @@ public class DynamicTreeReport : XtraReport
|
||||||
var richText = new XRRichText
|
var richText = new XRRichText
|
||||||
{
|
{
|
||||||
BoundsF = new System.Drawing.RectangleF(0, 0, width, height),
|
BoundsF = new System.Drawing.RectangleF(0, 0, width, height),
|
||||||
Font = new DXFont("Arial", 8F),
|
Font = DynamicReportFontHelper.CreateDataFont(),
|
||||||
Padding = new PaddingInfo(4, 4, 2, 2),
|
Padding = new PaddingInfo(4, 4, 2, 2),
|
||||||
CanGrow = true
|
CanGrow = true
|
||||||
};
|
};
|
||||||
|
|
@ -611,7 +611,7 @@ public class DynamicTreeReport : XtraReport
|
||||||
{
|
{
|
||||||
WidthF = width,
|
WidthF = width,
|
||||||
Weight = width,
|
Weight = width,
|
||||||
Font = new DXFont("Arial", 8F, DXFontStyle.Bold),
|
Font = DynamicReportFontHelper.CreateDataFont(DXFontStyle.Bold),
|
||||||
Padding = new PaddingInfo(4, 4, 2, 2),
|
Padding = new PaddingInfo(4, 4, 2, 2),
|
||||||
TextAlignment = DynamicReportImageHelper.ToTextAlignment(column.Field.Alignment, column.Field.SourceDbType)
|
TextAlignment = DynamicReportImageHelper.ToTextAlignment(column.Field.Alignment, column.Field.SourceDbType)
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ public static class DevExpressFontConfiguration
|
||||||
|
|
||||||
logger?.LogInformation(
|
logger?.LogInformation(
|
||||||
"If fonts are missing, install them with: " +
|
"If fonts are missing, install them with: " +
|
||||||
"apk add fontconfig ttf-dejavu ttf-liberation font-noto && fc-cache -f -v");
|
"apk add fontconfig ttf-dejavu ttf-liberation font-noto-emoji && fc-cache -f -v");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
|
||||||
|
|
@ -842,6 +842,10 @@ const useListFormColumns = ({
|
||||||
column.format = column.editorOptions.format
|
column.format = column.editorOptions.format
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof column.editorOptions.encodeHtml === 'boolean') {
|
||||||
|
column.encodeHtml = column.editorOptions.encodeHtml
|
||||||
|
}
|
||||||
|
|
||||||
// columnCustomizationDto
|
// columnCustomizationDto
|
||||||
column.fixed = colData.columnCustomizationDto?.fixed
|
column.fixed = colData.columnCustomizationDto?.fixed
|
||||||
column.fixedPosition = colData.columnCustomizationDto?.fixedPosition as HorizontalEdge
|
column.fixedPosition = colData.columnCustomizationDto?.fixedPosition as HorizontalEdge
|
||||||
|
|
@ -944,8 +948,10 @@ const useListFormColumns = ({
|
||||||
if (!colData.lookupDto?.dataSourceType) {
|
if (!colData.lookupDto?.dataSourceType) {
|
||||||
const allFormItems = gridDto.gridOptions.editingFormDto.flatMap((group) => group.items)
|
const allFormItems = gridDto.gridOptions.editingFormDto.flatMap((group) => group.items)
|
||||||
const imageFormItem = allFormItems.find((a) => a?.dataField === colData.fieldName)
|
const imageFormItem = allFormItems.find((a) => a?.dataField === colData.fieldName)
|
||||||
const isImageUploadEditor = imageFormItem?.editorType2 === PlatformEditorTypes.dxImageUpload
|
const isImageUploadEditor =
|
||||||
const isImageViewerEditor = imageFormItem?.editorType2 === PlatformEditorTypes.dxImageViewer
|
imageFormItem?.editorType2 === PlatformEditorTypes.dxImageUpload
|
||||||
|
const isImageViewerEditor =
|
||||||
|
imageFormItem?.editorType2 === PlatformEditorTypes.dxImageViewer
|
||||||
if (isImageUploadEditor || isImageViewerEditor) {
|
if (isImageUploadEditor || isImageViewerEditor) {
|
||||||
// imageUploadOptions'ı önce imageFormItem.imageUploadOptions'dan al,
|
// imageUploadOptions'ı önce imageFormItem.imageUploadOptions'dan al,
|
||||||
// yoksa editorOptions JSON içinden parse et (admin panelinde editorOptions ile yapılandırılır)
|
// yoksa editorOptions JSON içinden parse et (admin panelinde editorOptions ile yapılandırılır)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue