DevExpress / Reporting.Import

An import tool designed to convert third party reports into an internal format supported by DevExpress Reports
https://www.devexpress.com/subscriptions/reporting/
MIT License
24 stars 17 forks source link

Add support for RepeatOnNewPage #9

Closed markgould closed 3 years ago

markgould commented 3 years ago

This adds functionality to parse the RepeatOnNewPage property which is used to repeat header on each page, maps to RepeatEveryPage in DevExpress.

k0st1x commented 3 years ago
bool.Parse(tablixMemberElement.Element(ns + "RepeatOnNewPage")?.Value ?? "false");

please, use less unnecessary actions - do not pass const "false" value into bool.Parse(), maybe just

string.Equals(tablixMemberElement.Element(ns + "RepeatOnNewPage")?.Value, "true", StringComparison.InvariantCultureIgnoreCase)

or create a new method GetBoolValue(tablixMemberElement.Element(ns + "RepeatOnNewPage")?.Value) where you can return false on method beginning if value is null.

markgould commented 3 years ago

I did that to just follow the convention that already existed in the project:

Under ProcessReportParameter you have:

var multiValue = parameterElement.Element(xmlns + "MultiValue")?.Value ?? "false";
parameter.MultiValue = bool.Parse(multiValue);

I'll go ahead and change it though for this PR.

k0st1x commented 3 years ago

you are very observant and attentive.