AR Viewer don't show my report

Posted by: eric-konings on 4 August 2017, 3:02 pm EST

  • Posted 4 August 2017, 3:02 pm EST

    <FONT face=Arial size=2>DD,</FONT>


    <FONT face=Arial size=2>I am not getting this done. Why do I get a 5000 error on the code below. I used the same code for opening a report on the .show command and the is works perfect. What I like to doe is to open a report in the ARViewer. This won't work.</FONT>


    <FONT face=Arial size=2>Public Sub PreViewReport_Offerte(cID As String)
    </FONT><FONT face=Arial size=2></FONT>


    <FONT face=Arial size=2>With rCalcQuote  ' <FONT color=#ff0000>= my report</FONT>
           .dc.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=F5_Calc;DataSource=PC_ERIC"</FONT><FONT face=Arial size=2>
            .dc.CursorLocation = ddADOUseClient
            .dc.CursorType = ddADOOpenDynamic
            .dc.Source = "SELECT Aantal, Eenheid, ArtOmschr, B_PerStuk, B_Totaal, Omschr, EigenGroepID " & _
            "FROM D_CalcRows, D_ArtLev_EigenGroepen " & _
            "WHERE EigenGroepID = Code " & _
            "AND CalcID = " & cID & " ORDER BY EigenGroepID ASC"
        End With
       
        ar.ReportSource = New rCalcQuote

    End Sub
    </FONT>


    <FONT face=Arial size=2>I like to here soon from you.</FONT>


    <FONT face=Arial><FONT size=2>Bye<FONT>

    </FONT></FONT></FONT>
  • Replied 4 August 2017, 3:02 pm EST

    Hello ,


    Try to use the following variant of code:


    <FONT face=Arial size=2>Public Sub PreViewReport_Offerte(cID As String)</FONT>


    <FONT face=Arial size=2>Dim my_rep as New rCalcQuote
    </FONT><FONT face=Arial size=2>With my_rep  ' <FONT color=#ff0000>= my report</FONT>
           .dc.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=F5_Calc;DataSource=PC_ERIC"</FONT><FONT face=Arial size=2>
            .dc.CursorLocation = ddADOUseClient
            .dc.CursorType = ddADOOpenDynamic
            .dc.Source = "SELECT Aantal, Eenheid, ArtOmschr, B_PerStuk, B_Totaal, Omschr, EigenGroepID " & _
            "FROM D_CalcRows, D_ArtLev_EigenGroepen " & _
            "WHERE EigenGroepID = Code " & _
            "AND CalcID = " & cID & " ORDER BY EigenGroepID ASC"
        End With
       
        ar.ReportSource = my_rep
    End Sub
    </FONT><FONT face=Arial size=2></FONT>


    <FONT face=Arial size=2>Sergey Romanov.

    </FONT>
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels