This content has been marked as final. Show 7 replies
Although I did not recieve any responses I have since managed to get attach items to my email alert.
Could you also please let me know how you achieved this.
I also would be interested to hear how you managed to accomplish this item.
Any feedback you could provide would be very helpful!
Can you let me know what you're trying to attach. For example are you trying to attach a FDM report or a source file, the script varies dependent upon which is your requirement. Please note with email alerts the attachments can get very large in size and could clog up your email. I opted to have my script to publish reports and save on a network drive automatically upon each batch load.
Please let me know so i can try and help.
I want to attach FDM reports to the mail attachment as alerts.
Any help in this regards is really appreciated.
Thanks In Advance
I assume your familiar with the 'Send Mail' Accelerator script so i won't go into that part of it.
As mentioned previously I opted to attach the source file and save reports on a shared drive. Therefore from the selected script below you can modify to your needs.
Firstly I published a report (using the Report Publishing accelerator) to a specific location with a variable name (as shown in my example below) or you can give it a specific name so each time it's run it will overwrite the previously run report.
lngReportID = 87 'Check Report +(You need to check the report properties for this number)+
lngPublishType = 31 'PDF
strPublishPath = "C:\Temp\Validation Report_"&API.POVMgr.PPOVLocation&"_"& API.POVMgr.PPOVCategory &"_"& API.POVMgr.PPOVPeriod &"_"& FormatDateTime(Date,1)&"_"&retv&".pdf"
'Create the Report object
Set objReport = CreateObject("upsWReportingDM.clsReportPublisher")
'Publish the Report
objReport.mReportPublishToFile CLng(lngReportID), CStr(strPublishPath), CLng(lngPublishType)
'Destroy the objects
Set objReport = Nothing
To attach this to your email :
This should get you on your way, let me know if you encounter any issues. Also as a newbie I'd appreciate it if you can tag if this message was correct or helpful.
Sorry it took me so long to respond, but this is extremely helpful! Thank you very much for posting some of this code!