ActiveReports 18 .NET Edition
Samples / Samples / Web / Custom Preview
In This Topic
    Custom Preview
    In This Topic

    The Custom Preview sample demonstrates a method to view a report at client side in HTML or PDF format. Application structure consists of ASP.NET website, using which the report is streamed to the client as HTML or PDF. This sample describes custom exporting without the Pro Edition server controls or RPX handlers as well as running reports on the server. The PDF and HTML exports allow you to manually control exporting by writing a little code in ASP.NET language. Steps explained in this sample can be used for both Standard and Professional editions.

    Custom Preview

    Note: Before running this sample, in the Solution Explorer, click the licenses.licx file and then, from the Build menu, select Build Runtime License. Please see To license Web Forms projects made on the trial version for details.

    Sample Location

    Visual Basic.NET

    https://github.com/activereports/Samples18/tree/main/Web/CustomPreview/VB.NET

    C#

    https://github.com/activereports/Samples18/tree/main/Web/CustomPreview/C#

    Details

    When you run the sample, the Default.aspx page appears in your browser. This page provides two links to other reports that demonstrate custom PDF or HTML export options.

    Clicking the Custom Exporting PDF Example option opens the Invoice report and clicking Custom Exporting HTML Example option opens NwindLabels report in the Default.aspx page.

    Note: To run this sample, you must have Nwind.db downloaded from GitHub in ..\Samples18\Data\NWIND.db

    The project consists of the following elements.