This commit is contained in:
2020-09-22 20:29:56 +00:00
parent b29def1d18
commit 8b3abaa9b8
6 changed files with 71 additions and 12 deletions

2
.vscode/launch.json vendored
View File

@@ -52,7 +52,7 @@
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",
"AYANOVA_SERVER_TEST_MODE": "false",
"AYANOVA_SERVER_TEST_MODE": "true",
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\PostgreSQLPortable_12.0\\App\\PgSQL\\bin\\"

View File

@@ -397,10 +397,9 @@ namespace AyaNova.Biz
}
//https://stackoverflow.com/questions/53367966/puppeteer-sharp-still-appear-many-chromium-instance-in-process-task-manager-when
//API DOCS http://www.puppeteersharp.com/api/index.html
log.LogDebug($"Launching headless Chrome now:");
using (var browser = await Puppeteer.LaunchAsync(lo))
using (var page = await browser.NewPageAsync())
{
try

View File

@@ -0,0 +1,21 @@
namespace AyaNova.Biz
{
/// <summary>
/// All AyaNova report paper format types, passed to pdf generator
/// </summary>
public enum ReportPaperFormat : int
{// http://www.puppeteersharp.com/api/PuppeteerSharp.Media.PaperFormat.html
NotSet=0,
A0 = 1,
A1 = 2,
A2 = 3,
A3 = 4,
A4 = 5,
A5 = 6,
A6 = 7,
Ledger = 8,
Legal = 9,
Letter = 10,
Tabloid = 11
}
}//eons

View File

@@ -21,7 +21,7 @@ namespace AyaNova.Models
[Required]
public AyaType ObjectType { get; set; }
public string Template { get; set; }
public string Style { get; set; }
public string JsPrerender { get; set; }
@@ -29,9 +29,23 @@ namespace AyaNova.Models
[Required]
public ReportRenderType RenderType { get; set; }
//tentative in case of need in future
// public string Header { get; set; }
// public string Footer { get; set; }
//PDF options
//http://www.puppeteersharp.com/api/PuppeteerSharp.PdfOptions.html
public string HeaderTemplate { get; set; }
public string FooterTemplate { get; set; }
public bool DisplayHeaderFooter { get; set; }
public ReportPaperFormat PaperFormat { get; set; }
public bool Landscape { get; set; }
public string MarginOptionsBottom { get; set; }
public string MarginOptionsLeft { get; set; }
public string MarginOptionsRight { get; set; }
public string MarginOptionsTop { get; set; }
public string PageRanges { get; set; }
public bool PreferCSSPageSize { get; set; }
public bool PrintBackground { get; set; }
public decimal Scale { get; set; }
public Report()
{
@@ -39,8 +53,19 @@ namespace AyaNova.Models
ObjectType = AyaType.NoType;
Roles = AuthorizationRoles.All;
Active = true;
//these are pdf option defaults as per PuppeteerSharp
DisplayHeaderFooter=false;
PaperFormat=ReportPaperFormat.NotSet;
Landscape=false;
PreferCSSPageSize=false;
PrintBackground=false;
Scale=1;
}
}//eoc
}//eons

View File

@@ -22,7 +22,7 @@ namespace AyaNova.Util
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
private const int DESIRED_SCHEMA_LEVEL = 14;
internal const long EXPECTED_COLUMN_COUNT = 401;
internal const long EXPECTED_COLUMN_COUNT = 414;
internal const long EXPECTED_INDEX_COUNT = 142;
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
@@ -723,14 +723,28 @@ $BODY$;
{
LogUpdateMessage(log);
await ExecQueryAsync("CREATE TABLE areport (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name varchar(255) not null unique, active bool, " +
"notes text, roles integer not null, objecttype integer not null, template text, style text, jsprerender text, jshelpers text, rendertype integer not null )");
"notes text, roles integer not null, objecttype integer not null, template text, style text, jsprerender text, jshelpers text, rendertype integer not null, " +
"headertemplate text, footertemplate text, displayheaderfooter bool, paperformat integer not null, landscape bool, marginoptionsbottom text, " +
"marginoptionsleft text, marginoptionsright text, marginoptionstop text, pageranges text, prefercsspagesize bool, printbackground bool, scale decimal(19,4) )");
await SetSchemaLevelAsync(++currentSchema);
//Load the stock REPORT TEMPLATES
await AyaNova.Biz.PrimeData.PrimeReportTemplates();
}
// public string HeaderTemplate { get; set; }
// public string FooterTemplate { get; set; }
// public bool DisplayHeaderFooter { get; set; }
// public ReportPaperFormat PaperFormat { get; set; }
// public bool Landscape { get; set; }
// public string MarginOptionsBottom { get; set; }
// public string MarginOptionsLeft { get; set; }
// public string MarginOptionsRight { get; set; }
// public string MarginOptionsTop { get; set; }
// public string PageRanges { get; set; }
// public bool PreferCSSPageSize { get; set; }
// public bool PrintBackground { get; set; }
// public decimal Scale { get; set; }
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!

View File

@@ -5,7 +5,7 @@ namespace AyaNova.Util
/// </summary>
internal static class AyaNovaVersion
{
public const string VersionString = "8.0.0-alpha.18";
public const string VersionString = "8.0.0-alpha.19";
public const string FullNameAndVersion = "AyaNova server " + VersionString;
}//eoc
}//eons