ASP and ActiveReports

Posted by: ar-man on 4 August 2017, 2:59 pm EST

  • Posted 4 August 2017, 2:59 pm EST

    <P>We have tons of .RPX reports designed in VB6 Active Reports, now I would like to view that report on asp.net page.</P>
    <P>I have study the code example on this post <A HREF="/forums/2275/ShowPost.aspx">http://www.datadynamics.com/forums/2275/ShowPost.aspx</A></P>
    <P>here is my code in asp.net..</P><FONT size=2>
    <P>---------------------------------------------------------------------------------------------------------------------------------</FONT><FONT color=#0000ff size=2></FONT></P>
    <P><FONT color=#0000ff size=2>Dim</FONT><FONT size=2> arptServer </FONT><FONT color=#0000ff size=2>As</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>New</FONT><FONT size=2> ReportFactory.clsReportFactory</P>
    <P></FONT><FONT color=#0000ff size=2>Dim</FONT><FONT size=2> vByt </FONT><FONT color=#0000ff size=2>As</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>Byte</FONT><FONT size=2>() = </FONT><FONT color=#0000ff size=2>New</FONT><FONT size=2> UTF8Encoding(</FONT><FONT color=#0000ff size=2>True</FONT><FONT size=2>).GetBytes(</FONT><FONT color=#800000 size=2>"This"</FONT><FONT size=2>)</P>
    <P> </P>
    <P>strConnection = </FONT><FONT color=#800000 size=2>"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="</FONT><FONT size=2> & Server.MapPath(</FONT><FONT color=#800000 size=2>"NWIND.MDB"</FONT><FONT size=2>) & </FONT><FONT color=#800000 size=2>";Persist Security Info=False"</P>
    <P> </P></FONT><FONT size=2>
    <P></FONT><FONT color=#008000 size=2>' Turn on report debugging</P></FONT><FONT size=2>
    <P>arptServer.Debugging = </FONT><FONT color=#0000ff size=2>True</P></FONT><FONT size=2>
    <P>arptServer.RPXFilePath = Server.MapPath(</FONT><FONT color=#800000 size=2>"RPXfiles\BoundADO.rpx"</FONT><FONT size=2>)</P>
    <P>vByt = arptServer.ExportToByteArray(</FONT><FONT color=#800000 size=2>"PDF"</FONT><FONT size=2>)</P>
    <P></FONT><FONT color=#008000 size=2>'The 2 lines below can be used to verify that the byte array being</P></FONT><FONT size=2>
    <P></FONT><FONT color=#008000 size=2>'returned is being returned correctly and is not empty</P></FONT><FONT size=2>
    <P></FONT><FONT color=#008000 size=2>'Response.Write ubound(vbyt)</P></FONT><FONT size=2>
    <P></FONT><FONT color=#008000 size=2>'Response.End</P></FONT><FONT size=2>
    <P>Response.Clear()</P>
    <P>Response.ContentType = </FONT><FONT color=#800000 size=2>"application/pdf"</P></FONT><FONT size=2>
    <P>Response.BinaryWrite(vByt)</P>
    <P>---------------------------------------------------------------------------------------------------------------------------------</P></FONT>
    <P>When I run the code it doesn't give me any error but it doesn't show any report on aspx page.</P>
    <P>can anyone guide me with this?</P>
    <P>Thanks</P>
  • Replied 4 August 2017, 2:59 pm EST

    <P>Hello ,</P>
    <P>If you need to use the Active Reports 2.0 and ASP.NET together,</P>
    <P>pay attention at the following article:</P>
    <P><A HREF="/forums/77673/ShowPost.aspx">http://www.datadynamics.com/forums/77673/ShowPost.aspx</A></P>
    <P>Sergey Romanov.</P>
Need extra support?

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

Learn More

Forum Channels