Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all,
Am new in DevExpress Report wizard in asp.net c#
am trying to show the report on my web page using xtrareports.
i have done the report design within the xtrareports.
but i cannot show the design on my web page.

i tried below code to show the report on my web page but am getting the below error,
please have a look at the code below,

please drop me a solution for this.

my error is :
Object reference not set to an instance of an object.

my code is :

C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DevExpress.XtraReports.UI;
using DevExpress.XtraReports.Web;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        // Create a report. 
        XtraReport1 report = new XtraReport1();
        // Show the report's preview. 
        ReportPrintTool tool = new ReportPrintTool(report);
        tool.ShowPreview();
   
        
    }
}

thanks in advance...
Posted
Updated 27-Aug-18 9:36am
v2

1 solution

pudiste solucionar tu problema?
 
Share this answer
 
Comments
Richard Deeming 28-Aug-18 14:42pm    
1) This is an English-language site. Please post in English only.

2) If you want to ask whether the question has been solved, click the "Have a Question or Comment?" button under the question. DO NOT post your question as a "solution".

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900