Running Reports from Customization/BPM: SubmitToAgent vs RunDirect

Could someone help eloborate why we don’t use RunDirect more? I see plenty of small shops that often wonder why a simple report takes a while. They just want to click a button and have the PDF pop up. I typically do not use “RunDirect”, but why should I not?

I know it’s an old post… but it doesn’t have any activity yet!

@Jason_Woods did you answer your question regards RunDirect? I’ve just built something on a screen that calls it, and it works well (nice and quick) for SSRSPREVIEW.

I know want to create PDFs in the background and put them into a network folder. Thinking that I need to use GetReportBytes method, but the return of RunDirect is a void and so I’m not sure best way to find the GUID.

Any ideas please?

I don’t know how it works internally, but I think the difference is that RunDirect does not go through the Task Agent and it is a synchronous process, so the code waits for the report processing before continuing.

Probably that is why there is nothing left, although maybe it also depends on the parameters, try playing with those.

It still goes to the system monitor though. That is where you can get to the file.

Would I need to run some looping code to detect when it has generated, and then call the GetReportBytes method against a guid?

That’s why Right nDirect is helpful. You can wait until it completes before getting the report.

Jason Woods
http://LinkedIn.com/in/jasoncwoods

Thank you @Jason_Woods

I put in some focussed effort on it today and got to a working solution. I used a trick that @josecgomez had posted to put a unique ID that I could track into the TaskNote field.

I’m looping through my records and calling RunDirect.

I’m then looping through a second time, looking up the SysRowID from Ice.SysRptLst and then calling GetReportBytes to create a PDF in a dynamically named folder.

All working great, thank you both!