From 072c2881703b922e5351312d07764dbee43f84b0 Mon Sep 17 00:00:00 2001 From: Daniel Covington Date: Thu, 18 Jul 2024 15:08:43 -0400 Subject: [PATCH] changing label exports --- App/Controllers/Kit/KitController.asp | 10 ++++++++-- MVC/activeXdepedancies.asp | 7 +++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/App/Controllers/Kit/KitController.asp b/App/Controllers/Kit/KitController.asp index f7f9e32..87d93fa 100644 --- a/App/Controllers/Kit/KitController.asp +++ b/App/Controllers/Kit/KitController.asp @@ -117,6 +117,9 @@ Class KitController Public Sub DownloadTrackingkitSnailWorksPDF dim id : id = Request.QueryString("Id") + dim ExportDirectory:ExportDirectory = "\\kci-syn-cl01\PC Transfer\TrackingDataExport\" + dim KitInfo : Set KitInfo = KitRepository.FindByID(id) + dim JurisdictionInfo : Set JurisdictionInfo = JurisdictionRepository.FindByJCode(KitInfo.Jcode) ReportManager.Filename = Request.ServerVariables("APPL_PHYSICAL_PATH") & "Data\Label_Report.rep" if dev = true Then @@ -132,8 +135,11 @@ Class KitController ReportManager.ShowPrintDialog = false ReportManager.SetParamValue "PBKITID", CInt(id) - - ReportManager.SaveToPdf Request.ServerVariables("APPL_PHYSICAL_PATH") & "Data\" & id & ".pdf",1 + if FSO.FolderExists(ExportDirectory & JurisdictionInfo.JCode & "-" & JurisdictionInfo.Name) = False then + FSO.CreateFolder(ExportDirectory & JurisdictionInfo.JCode & "-" & JurisdictionInfo.Name) + end if + ReportManager.SaveToPdf ExportDirectory & JurisdictionInfo.JCode & "-" & JurisdictionInfo.Name & "\" & JurisdictionInfo.JCode & "-" & JurisdictionInfo.Name & "_labels.pdf",1 + 'ReportManager.SaveToPdf Request.ServerVariables("APPL_PHYSICAL_PATH") & "Data\" & id & ".pdf",1 Dim objStream:Set objStream = Server.CreateObject("ADODB.Stream") objStream.Type = 1 'adTypeBinary diff --git a/MVC/activeXdepedancies.asp b/MVC/activeXdepedancies.asp index fd55559..0dcf78b 100644 --- a/MVC/activeXdepedancies.asp +++ b/MVC/activeXdepedancies.asp @@ -15,4 +15,11 @@ set ReportManager = m_ReportManager End Function + dim m_FSO + Private Function FSO + if not isobject(m_FSO) then + set m_FSO = server.CreateObject(CreateObject("Scripting.FileSystemObject") + end if + set FSO = m_FSO + End Function %> \ No newline at end of file