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

    DD,


    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.


    Public Sub PreViewReport_Offerte(cID As String)


    With rCalcQuote  ' = my report
           .dc.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=F5_Calc;DataSource=PC_ERIC"

            .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


    I like to here soon from you.


    Bye

  • Replied 4 August 2017, 3:02 pm EST

    Hello ,


    Try to use the following variant of code:


    Public Sub PreViewReport_Offerte(cID As String)


    Dim my_rep as New rCalcQuote
    With my_rep  ' = my report
           .dc.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=F5_Calc;DataSource=PC_ERIC"

            .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


    Sergey Romanov.

Need extra support?

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

Learn More

Forum Channels