BAQ Report from BPM Custom Code - Can it be done?

I’m trying to generate a pdf and send it to a network location from a BAQ report. This would be triggered by a bpm and generating the baq report (ssrs) using code.

The BPM is triggering from the SysTask table based on certain criteria.

Is this viable?

Hello @CasterConcepts
Did you ever achieve this?
I’m trying to do the same thing

Unfortunately not. I was able to work around this though, by sending myself the PDF on a schedule, then using a VBA script and a rule, in Outlook, to auto-download the attachment to my specified directory.

Alt+F11 to open the VBA Editor in Outlook, script below.

Public Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem)

Dim oAttachment As Outlook.Attachment
Dim sSaveFolder As String

sSaveFolder = "C:\Directory\Goes\Here"

For Each oAttachment In MItem.Attachments

oAttachment.SaveAsFile sSaveFolder & "\" & oAttachment.DisplayName

Set oAttachment = Nothing


End Sub

Hope this helps. Might not be the best solution, but it worked for me.

Mmmm thanks for that, I may be able to use a Microsoft Power Automate to do the same sort of thing,

What I’m trying to do is create a whole bunch of different management reports and send them to a network folder, then collect them up and email them to management…

I see, trying to send 1 email instead of a thousand? lol. I really should do the same… Future project for sure.

Yes… the list keeps growing, maybe when their inbox overloads they may ask me to stop!!

Let them suffer! :smiling_imp:

So, if you have Power Automate then you have 365, and if you have 365 you have document libraries. So instead of a file share/folder, I’ve been working on putting these into a document library. Why? Users can subscribe to a folder and automatically be informed when things are added. Document Libraries are easier to find out when items were read, by whom, etc. Documents can be versioned so changes are monitored. Document Libraries have metadata so setting up views for the last years documents reduces time to find. Search is excellent. And finally, you can apply sensitivity labels making it easier to control certain content along with retention policies.

1 Like