GridReport Filtre ve Sıralama çıkmasın
This commit is contained in:
parent
707e835570
commit
39e4e448d7
2 changed files with 26 additions and 4 deletions
|
|
@ -253,7 +253,10 @@ public class DynamicGridReport : XtraReport
|
|||
|
||||
var topMargin = new TopMarginBand { HeightF = Margins.Top };
|
||||
var bottomMargin = new BottomMarginBand { HeightF = 32 };
|
||||
var reportHeader = new ReportHeaderBand { HeightF = string.IsNullOrWhiteSpace(criteriaText) ? 32 : 50 };
|
||||
var reportHeader = new ReportHeaderBand
|
||||
{
|
||||
HeightF = !isSubReport && !string.IsNullOrWhiteSpace(criteriaText) ? 50 : 32
|
||||
};
|
||||
var pageHeader = new PageHeaderBand { HeightF = 28 };
|
||||
var detailHeight = fields.Any(x => x.IsImage)
|
||||
? DynamicReportImageHelper.GetGridImageHeight()
|
||||
|
|
@ -277,7 +280,10 @@ public class DynamicGridReport : XtraReport
|
|||
{
|
||||
DynamicReportImageHelper.AddGeneratedAtToHeader(reportHeader.Controls, pageWidth);
|
||||
}
|
||||
DynamicReportImageHelper.AddReportCriteriaToHeader(reportHeader.Controls, criteriaText, pageWidth);
|
||||
if (!isSubReport)
|
||||
{
|
||||
DynamicReportImageHelper.AddReportCriteriaToHeader(reportHeader.Controls, criteriaText, pageWidth);
|
||||
}
|
||||
|
||||
DynamicReportImageHelper.AddFooterTopLine(bottomMargin.Controls, pageWidth);
|
||||
DynamicReportImageHelper.AddCurrentUserNameToFooter(bottomMargin.Controls, currentUserName, pageWidth);
|
||||
|
|
@ -429,7 +435,10 @@ public class DynamicGridReport : XtraReport
|
|||
cell.ExpressionBindings.Add(new ExpressionBinding(
|
||||
"BeforePrint",
|
||||
"Text",
|
||||
DynamicReportImageHelper.CreateFormatValueExpression($"sumSum([{column.BindingName}])", field, column.EditorType)));
|
||||
DynamicReportImageHelper.CreateFormatValueExpression(
|
||||
CreateSummaryExpression(summaryType.Value, column.BindingName),
|
||||
field,
|
||||
column.EditorType)));
|
||||
cell.Summary = new XRSummary
|
||||
{
|
||||
Running = SummaryRunning.Report,
|
||||
|
|
@ -440,6 +449,19 @@ public class DynamicGridReport : XtraReport
|
|||
return cell;
|
||||
}
|
||||
|
||||
private static string CreateSummaryExpression(SummaryFunc summaryType, string bindingName)
|
||||
{
|
||||
return summaryType switch
|
||||
{
|
||||
SummaryFunc.Sum => $"sumSum([{bindingName}])",
|
||||
SummaryFunc.Avg => $"sumAvg([{bindingName}])",
|
||||
SummaryFunc.Min => $"sumMin([{bindingName}])",
|
||||
SummaryFunc.Max => $"sumMax([{bindingName}])",
|
||||
SummaryFunc.Count => "sumCount()",
|
||||
_ => $"sumSum([{bindingName}])"
|
||||
};
|
||||
}
|
||||
|
||||
private static float[] CalculateWidths(IReadOnlyList<ListFormField> fields, float pageWidth)
|
||||
{
|
||||
var raw = fields.Select(x => (float)Math.Max(x.Width ?? 90, 60)).ToArray();
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ const StackedSideNavSecondary = (props: StackedSideNavSecondaryProps) => {
|
|||
}
|
||||
|
||||
return (
|
||||
<div className={classNames('h-full', className)} {...rest}>
|
||||
<div className={classNames('h-full mt-2', className)} {...rest}>
|
||||
<div
|
||||
// className={`${HEADER_HEIGHT_CLASS} flex items-center justify-between gap-4 pl-6 pr-4`}
|
||||
className={'flex items-center justify-between gap-4 pl-6 pr-4'}
|
||||
|
|
|
|||
Loading…
Reference in a new issue