diff --git a/Lux.Report.Data/Reports/CustomReportStorageWebExtension.cs b/Lux.Report.Data/Reports/CustomReportStorageWebExtension.cs
index 461fb4cc..6d6b4557 100644
--- a/Lux.Report.Data/Reports/CustomReportStorageWebExtension.cs
+++ b/Lux.Report.Data/Reports/CustomReportStorageWebExtension.cs
@@ -69,7 +69,8 @@ namespace Lux.Report.Data.Reports
// Create a report instance.
XtraReport report = null;
- byte[] reportBytes = File.ReadAllBytes(Path.Combine(reportFolder, reportName));
+ byte[] reportBytes = File.ReadAllBytes(url);
+ //byte[] reportBytes = File.ReadAllBytes(Path.Combine(reportFolder, reportName));
using (MemoryStream ms = new MemoryStream(reportBytes))
report = XtraReport.FromStream(ms);
diff --git a/Lux.Report.Data/Services/FileService.cs b/Lux.Report.Data/Services/FileService.cs
index a1028342..6aa13bc9 100644
--- a/Lux.Report.Data/Services/FileService.cs
+++ b/Lux.Report.Data/Services/FileService.cs
@@ -50,6 +50,7 @@ namespace Lux.Report.Data.Services
return answ;
}
+ ///
public bool FileCopy(string origPath, string destPath)
{
bool done = false;
@@ -63,6 +64,8 @@ namespace Lux.Report.Data.Services
}
return done;
}
+
+ ///
public bool FileDelete(string origPath)
{
bool done = false;
@@ -76,6 +79,7 @@ namespace Lux.Report.Data.Services
return done;
}
+ ///
public bool FileExists(string filePath)
{
// calcolo path file...
@@ -110,6 +114,14 @@ namespace Lux.Report.Data.Services
return answ;
}
+ ///
+ public byte[] ReadAllBytes(string filePath)
+ {
+ string fullPath = Path.Combine(basePath, filePath);
+ var rawData = File.ReadAllBytes(fullPath);
+ return rawData;
+ }
+
#endregion Public Methods
#region Private Fields
diff --git a/Lux.Report.Data/Services/IFileService.cs b/Lux.Report.Data/Services/IFileService.cs
index 084abc67..4b0ff2ec 100644
--- a/Lux.Report.Data/Services/IFileService.cs
+++ b/Lux.Report.Data/Services/IFileService.cs
@@ -53,6 +53,13 @@ namespace Lux.Report.Data.Services
/// Elenco file trovati
List ListFile(string folderPath, string pattern, bool hideDot);
+ ///
+ /// Restituisce contenuto file come byte array
+ ///
+ ///
+ ///
+ byte[] ReadAllBytes(string filePath);
+
#endregion Public Methods
/////
diff --git a/Lux.Report.Manager/Components/Compo/RepoFileList.razor.cs b/Lux.Report.Manager/Components/Compo/RepoFileList.razor.cs
index 9be15783..58c21b40 100644
--- a/Lux.Report.Manager/Components/Compo/RepoFileList.razor.cs
+++ b/Lux.Report.Manager/Components/Compo/RepoFileList.razor.cs
@@ -23,24 +23,36 @@ namespace Lux.Report.Manager.Components.Compo
#region Protected Methods
+ protected string FileName(string fullName)
+ {
+ return Path.GetFileName(fullName);
+ }
+
protected override void OnParametersSet()
{
ReloadData();
}
- private void ReloadData()
- {
- //base.OnParametersSet();
- string repPath = Path.Combine("reports", CurrReport.Name);
- // elenco file esclusi quelli nascosti (template)
- ListReports = FService.ListFile(repPath, "*.repx", true);
- }
-
#endregion Protected Methods
+ #region Private Fields
+
+ private List ListReports = new List();
+
+ #endregion Private Fields
+
+ #region Private Properties
+
+ [Inject]
+ private IFileService FService { get; set; } = null!;
+
[Inject]
private IJSRuntime JSRuntime { get; set; } = null!;
+ #endregion Private Properties
+
+ #region Private Methods
+
///
/// Creazione nuovo report duplicando il file template
///
@@ -75,15 +87,12 @@ namespace Lux.Report.Manager.Components.Compo
await EC_ReqUpdate.InvokeAsync(true);
}
- #region Private Fields
-
- private List ListReports = new List();
-
- #endregion Private Fields
-
- protected string FileName(string fullName)
+ private void ReloadData()
{
- return Path.GetFileName(fullName);
+ //base.OnParametersSet();
+ string repPath = Path.Combine("reports", CurrReport.Name);
+ // elenco file esclusi quelli nascosti (template)
+ ListReports = FService.ListFile(repPath, "*.repx", true);
}
private async Task ReqEdit(string fullPath)
@@ -91,11 +100,6 @@ namespace Lux.Report.Manager.Components.Compo
await EC_ReqEdit.InvokeAsync(fullPath);
}
- #region Private Properties
-
- [Inject]
- private IFileService FService { get; set; } = null!;
-
- #endregion Private Properties
+ #endregion Private Methods
}
}
\ No newline at end of file
diff --git a/Lux.Report.Manager/Lux.Report.Manager.csproj b/Lux.Report.Manager/Lux.Report.Manager.csproj
index 4a9e96e5..cd1e77ad 100644
--- a/Lux.Report.Manager/Lux.Report.Manager.csproj
+++ b/Lux.Report.Manager/Lux.Report.Manager.csproj
@@ -4,7 +4,7 @@
net8.0
enable
enable
- 1.1.2604.0818
+ 1.1.2604.0909
diff --git a/Lux.Report.Server/Components/App.razor b/Lux.Report.Server/Components/App.razor
index 01cd172b..9fa5c487 100644
--- a/Lux.Report.Server/Components/App.razor
+++ b/Lux.Report.Server/Components/App.razor
@@ -21,5 +21,4 @@