diff --git a/CMS_SC/WebUserControls/mod_reportCompleto.ascx.cs b/CMS_SC/WebUserControls/mod_reportCompleto.ascx.cs
index 39428cd..15cce14 100644
--- a/CMS_SC/WebUserControls/mod_reportCompleto.ascx.cs
+++ b/CMS_SC/WebUserControls/mod_reportCompleto.ascx.cs
@@ -84,6 +84,7 @@ namespace CMS_SC.WebUserControls
/// Nome del file per salvataggio report
public void printReport(string outFilePath)
{
+ logger.lg.scriviLog($"Inizio printReport da {ReportCMS.LocalReport.ReportPath}");
LocalReport localReport = ReportCMS.LocalReport;
Warning[] warnings;
string[] streamIds;
@@ -94,12 +95,22 @@ namespace CMS_SC.WebUserControls
if (TipoReport != "" && IdxDossier > 0)
{
byte[] bytes = localReport.Render("PDF", null, out mimeType, out encoding, out extension, out streamIds, out warnings);
- string FilePath = Server.MapPath(outFilePath);
+ // se รจ un percorso virtuale faccio mapPath...
+ string FilePath = "";
+ if (outFilePath.IndexOf("/") >= 0)
+ {
+ FilePath = Server.MapPath(outFilePath);
+ }
+ else
+ {
+ FilePath = outFilePath;
+ }
using (FileStream fs = new FileStream(FilePath, FileMode.Create))
{
fs.Write(bytes, 0, bytes.Length);
}
}
+ logger.lg.scriviLog($"Effettuato printReport di {outFilePath}");
}
///
/// wrapper traduzione