Bladeren bron

Got the labels report to run

pull/8/head
Daniel Covington 6 maanden geleden
bovenliggende
commit
93ccd8cab2
4 gewijzigde bestanden met toevoegingen van 48 en 4 verwijderingen
  1. +37
    -1
      App/Controllers/Kit/KitController.asp
  2. +1
    -1
      App/Views/Kit/SwitchBoardEdit.asp
  3. +2
    -2
      Data/Label_Report.rep
  4. +8
    -0
      MVC/activeXdepedancies.asp

+ 37
- 1
App/Controllers/Kit/KitController.asp Bestand weergeven

@@ -104,8 +104,9 @@ Class KitController
End Sub

Public Sub SwitchBoardEdit
dim id : id = Request.QueryString("Id")
set Model = new SwitchBoard_ViewModel_Class
set Model.Kit = KitRepository.SwitchBoardEditFindById(id)
set Model.Labels = KitLabelsRepository.Find(Array("KitId =?",id),empty)
@@ -113,12 +114,47 @@ Class KitController
HTMLSecurity.SetAntiCSRFToken "KitEditForm"
%> <!--#include file="../../Views/Kit/SwitchBoardEdit.asp"--> <%
End Sub
Public Sub DownloadTrackingkitSnailWorksPDF
dim id : id = Request.QueryString("Id")
ReportManager.Filename = Request.ServerVariables("APPL_PHYSICAL_PATH") & "Data\Label_Report.rep"
if dev = true Then

ReportManager.SetDatabaseConnectionString "TRACKINGKITLABELS","Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Engine Type=5;Data Source=" & Request.ServerVariables("APPL_PHYSICAL_PATH") & "Data\webdata - Copy.mdb;"

else

ReportManager.SetDatabaseConnectionString "TRACKINGKITLABELS","Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Engine Type=5;Data Source=C:\inetpub\Data\webdata - Copy.mdb;"

End If
ReportManager.Preview = false
ReportManager.ShowProgress = false
ReportManager.ShowPrintDialog = false
ReportManager.SetParamValue "PBKITID", CInt(id)

ReportManager.SaveToPdf Request.ServerVariables("APPL_PHYSICAL_PATH") & "Data\" & id & ".pdf",1
Dim objStream:Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Type = 1 'adTypeBinary
objStream.Open
objStream.LoadFromFile(Request.ServerVariables("APPL_PHYSICAL_PATH") & "Data\" & id & ".pdf")
Response.ContentType = "application/octet-stream"
Response.Addheader "Content-Disposition", "attachment; filename=" & id & ".pdf"
Response.BinaryWrite objStream.Read
objStream.Close
Set objStream = Nothing
End Sub

Public Sub DownloadTrackingkitSnailWorks
dim id : id = Request.QueryString("Id")
dim export: set export = SnailWorksRepository.GetSnailWorksExportById(id)
if export.DetailRecords.Count > 0 Then
If Not Server.CreateObject("Scripting.FileSystemObject").FolderExists(server.mappath("/uploads/")) Then : Server.CreateObject("Scripting.FileSystemObject").CreateFolder(server.mappath("/uploads/")):End If
dim objExportFile: Set objExportFile = Server.CreateObject("Scripting.FileSystemObject").CreateTextFile(server.mappath("/uploads/" & id & ".csv"),2)
With objExportFile
.Write """" & export.Header.RecordType & ""","


+ 1
- 1
App/Views/Kit/SwitchBoardEdit.asp Bestand weergeven

@@ -11,7 +11,7 @@
<p><strong>Labels Printed On :</strong> <%= Model.Kit.LabelsPrinted %></p>
<p><strong>Exported to SnailWorks On:</strong> <%= Model.Kit.ExportedToSnailWorks %></p>
<%= HTML.LinkToExt("Download SnailWorks File","Kit", "DownloadTrackingkitSnailWorks", Array("Id",Model.Kit.ID,"_P","1"),Array("class","btn btn-primary")) %>
<button class="btn btn-primary" id="DP">Download Labels Pdf</button>
<%= HTML.LinkToExt("Download PDF File To Print","Kit", "DownloadTrackingkitSnailWorksPDF", Array("Id",Model.Kit.ID,"_P","1"),Array("class","btn btn-primary")) %>
<button class="btn btn-primary" id="toggleChild">Show Label Records</button>
</div>
</div>


+ 2
- 2
Data/Label_Report.rep Bestand weergeven

@@ -19,7 +19,7 @@ object TRpReport
's.InBoundIMB, Kit.Jcode, Jurisdiction.Name AS Jurisdiction, Juri' +
'sdiction.Mailing_Address, 1 AS Num'#13#10'FROM (KitLabels INNER JOIN K' +
'it ON KitLabels.KitId = Kit.ID) INNER JOIN Jurisdiction ON Kit.J' +
'code = Jurisdiction.JCode'#13#10'WHERE KitLabels.KITId = pbKitId'#13#10
'code = Jurisdiction.JCode'#13#10'WHERE KitLabels.KITId = PBKITID'#13#10
end
item
Alias = 'KITLABELS'
@@ -29,7 +29,7 @@ object TRpReport
's.InBoundIMB, Kit.Jcode, Jurisdiction.Name AS Jurisdiction, Juri' +
'sdiction.Mailing_Address,KitLabels.SetNumber'#13#10'FROM (KitLabels IN' +
'NER JOIN Kit ON KitLabels.KitId = Kit.ID) INNER JOIN Jurisdictio' +
'n ON Kit.Jcode = Jurisdiction.JCode'#13#10'WHERE KitLabels.KITId=pbKIT' +
'n ON Kit.Jcode = Jurisdiction.JCode'#13#10'WHERE KitLabels.KITId=PBKIT' +
'ID'#13#10'ORDER BY SetNumber;'
end>
DatabaseInfo = <


+ 8
- 0
MVC/activeXdepedancies.asp Bestand weergeven

@@ -7,4 +7,12 @@
set Chilkat_CSV = m_Chilkat_CSV
End Function

dim m_ReportManager
Private Function ReportManager
if not isobject(m_ReportManager) then
set m_ReportManager = Server.CreateObject("ReportMan.ReportManX")
end if
set ReportManager = m_ReportManager
End Function

%>

Laden…
Annuleren
Opslaan

Powered by TurnKey Linux.