Automatic Report Running

Started by hill041, September 03, 2018, 08:54:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hill041

Hey,

Does anyone know if it's possible to automate the running of specific reports?

I've exported a report file and now I want to make a button on a ribbon within an add on that will run it.

I've been using Nikolay's excellent extender for VS (http://unmanagedvisio.com/tools/visual-studio-project-templates-to-create-visio-add-ins/) to package my template and stencil so far but haven't made a button yet.

Does anyone have any ideas on if this is possible and any tips on what code could do this please?

Dan.

Gustavo

Hi Dan. In my solution I had to put the report definition file (*.vrd) in the \3082 folder in the installed Visio 2013 x64 folder (C:\ProgramFiles\Microsoft Office\Office15\3082), and I called with a sub


Sub Rep_RP_01i(control As IRibbonControl)  'Run RP_01-i report.
Visio.Application.Addons("VisRpt").Run ("/rptDefName=RP_01-i.vrd /rptOutput=EXCEL")
End Sub


Name of the report file shouldnt be very long.

Regards

Nikolay

That mentioned setup project support only add-ins (COM/VSTO), templates, stencils, and help files..
All of these can be "registered" (published) for Visio (i.e. basically acts as a replacement for the "solution publishing tool")

I don't think that any registration is needed (or exists) for the .VRD files. Probably you could just put them to the user's computer. Although I'm not really sure   :-[

hill041

Thanks for the attempts guys. I've ended up issuing the report file separately. Its not ideal but its worked so far. Cheers.