Author Topic: Generating Report in Visio 2016 fails but works in Visio 2010  (Read 559 times)

0 Members and 1 Guest are viewing this topic.

tverbeke

  • Newbie
  • *
  • Posts: 1
Dear Forum,

I'm posting my first post because of this strange issue i'm experiencing in Visio 2016 (O365).

If we run the code below we get an error message 'report definition invalid' but if we run the exact code in Visio 2010 it works perfectly.

Any thoughts ?

I've tried the following actions:

 
  • putting a space between .vrd/rptOutput
  • deleteting rptOutput
  • checking the references in VBA

Code
Public Sub RapportViso_PowerBus()
    Select Case MsgBox("Export Only this worksheet?", vbYesNoCancel, "Export Visio PowerBus Data")
        Case 6
            'YES
            Visio.Application.Addons("VisRpt").Run ("/rptDefName=\\fileserver\PRIVATE\ENG\ELEC\13-Visio\DataShapes_Stencils\Powerbus_on_page.vrd")
        Case 7
            'NO
            Visio.Application.Addons("VisRpt").Run ("/rptDefName=Q:\ENG\ELEC\13-Visio\DataShapes_Stencils\Powerbus_on_page_TotalProject.vrd")
        Case 2
            'CANCEL
    End Select
End Sub

Public Sub RapportViso_AsiData()
    Select Case MsgBox("Export Only this worksheet?", vbYesNoCancel, "Export Visio Asi Data")
        Case 6
            'YES
            Visio.Application.Addons("VisRpt").Run ("/rptDefName=Q:\ENG\ELEC\13-Visio\DataShapes_Stencils\All devices full on page.vrd")
        Case 7
            'NO
            Visio.Application.Addons("VisRpt").Run ("/rptDefName=Q:\ENG\ELEC\13-Visio\DataShapes_Stencils\All devices full on page_TotalProject.vrd/rptOutput=EXCEL")
        Case 2
            'CANCEL
    End Select
End Sub

Croc

  • Sr. Member
  • ****
  • Posts: 251
    • Visioport
Re: Generating Report in Visio 2016 fails but works in Visio 2010
« Reply #1 on: May 15, 2018, 05:05:32 AM »
1. Try to run the report through the wizard (Run addon / Report... / ... vrd)
2. Publish the .vrd file here.