title: Create report using FastReport.Net
body: <p>I have installed <a href="https://www.fast-report.com/en/" rel="nofollow">FastReport.Net</a> for generating reports.</p>
  
  <p>I have included following references:</p>
  
  <pre><code>FastReport.dll , FastReport.Web.dll , FastReport.Bars.dll , FastReport.Editor.dll , FastReport.Service.dll
  </code></pre>
  
  <p>Also I have created a custom Tab in the ToolBox called FastReport.Net and added the FastReport Controls/Components to the tab and the controls that I have are:</p>
  
  <pre><code>Pointer and WebReport
  </code></pre>
  
  <p>I have dragged and droppped the WebReport component on my <code>.aspx</code> page and this makes my web.config like this:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
    &lt;system.web&gt;
      &lt;compilation debug="true" targetFramework="4.0"&gt;
        &lt;assemblies&gt;
          &lt;add assembly="FastReport.Web, Version=2016.3.13.0, Culture=neutral, PublicKeyToken=DB7E5CE63278458C" /&gt;
          &lt;add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /&gt;
          &lt;add assembly="FastReport, Version=2016.3.13.0, Culture=neutral, PublicKeyToken=DB7E5CE63278458C" /&gt;
        &lt;/assemblies&gt;
      &lt;/compilation&gt;
    &lt;/system.web&gt;
    &lt;connectionStrings&gt;
      &lt;add name="ConnectionString" connectionString="Data Source=WIN-SERVER;Initial Catalog=RndDatabase;User ID=development;Password=development" providerName="System.Data.SqlClient" /&gt;
    &lt;/connectionStrings&gt;
    &lt;system.webServer&gt;
      &lt;validation validateIntegratedModeConfiguration="false" /&gt;
      &lt;handlers&gt;
        &lt;add name="FastReportHandler" path="FastReport.Export.axd" verb="*" type="FastReport.Web.Handlers.WebExport" /&gt;
      &lt;/handlers&gt;
    &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>My question is how would I be able to get the data from Database and print a report using FastReport.</p>
  
  <p>I have created a dataset.xsd in my project but when I click on the <code>Select DataSource...</code> from the design on FastReport (<kbd>ctrl</kbd>+<kbd>Shift</kbd>+<kbd>F10</kbd>) it opens a pop-up with no options to select.</p>
  
  <p>Is there any other procedure for this?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>I have tried this:</p>
  
  <pre><code>using System;
  using System.Data;
  using System.Drawing;
  using System.Text;
  using System.Linq;
  using System.Web;
  using System.Web.UI;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data.SqlClient;
  using System.Web.UI.WebControls;
  
  using FastReport;
  using FastReport.Web.Handlers;
  using FastReport.Wizards;
  using FastReport.Utils;
  using FastReport.TypeConverters;
  using FastReport.Code;
  using FastReport.MSChart;
  using FastReport.Data;
  using FastReport.Design.StandardDesigner;
  
  
  namespace fastreports4
  {
      public partial class fastrepo : System.Web.UI.Page
      {
          string sql = System.Configuration.ConfigurationManager.ConnectionStrings["ConnectionString"].ToString();
  
          protected void Page_Load(object sender, EventArgs e)
          {
  
          }
  
          public DataSet BindData()
          {
              DataSet _dataSet = new DataSet();
              SqlConnection con = new SqlConnection(sql);
              SqlCommand cmd = new SqlCommand("select * from cities", con);
              SqlDataAdapter da = new SqlDataAdapter(cmd);
              da.Fill(_dataSet);
              con.Open();
              cmd.ExecuteNonQuery();
              con.Close();
              return _dataSet;
          }
  
  
          protected void Button1_Click(object sender, EventArgs e)
          {
              DataSet _dataSet = new DataSet();
              _dataSet = BindData();
              Report report = new Report();
              // register the "Cities" table
              report.RegisterData(_dataSet.Tables[0], "Cities");
              // enable it to use in a report
              report.GetDataSource("Cities").Enabled = true;
              // create A4 page with all margins set to 1cm
              ReportPage page1 = new ReportPage();
              page1.Name = "Page1";
              report.Pages.Add(page1);
              // create ReportTitle band
              page1.ReportTitle = new ReportTitleBand();
              page1.ReportTitle.Name = "FastReport";
              // set its height to 1.5cm
              page1.ReportTitle.Height = Units.Centimeters * 1.5f;
              // create group header
              GroupHeaderBand group1 = new GroupHeaderBand();
              group1.Name = "Cities Data";
              group1.Height = Units.Centimeters * 1;
              // set group condition
              group1.Condition = "[Cities.CityName]";//[Cities.CityName].Substring(0, 1)
              // add group to the page.Bands collection
              page1.Bands.Add(group1);
              // create group footer
              group1.GroupFooter = new GroupFooterBand();
              group1.GroupFooter.Name = "GroupFooter1";
              group1.GroupFooter.Height = Units.Centimeters * 1;
              // create DataBand
              DataBand data1 = new DataBand();
              data1.Name = "Data1";
              data1.Height = Units.Centimeters * 0.5f;
              // set data source
              data1.DataSource = report.GetDataSource("Cities");
              // connect databand to a group
              group1.Data = data1;
              // create "Text" objects
              // report title
              TextObject text1 = new TextObject();
              text1.Name = "Text1";
              // set bounds
              text1.Bounds = new System.Drawing.RectangleF(0, 0,
              Units.Centimeters * 19, Units.Centimeters * 1);
              // set text
              text1.Text = "CitiesData";
              // set appearance
              text1.HorzAlign = HorzAlign.Center;
              text1.Font = new System.Drawing.Font("Tahoma", 14, FontStyle.Bold);
              // add it to ReportTitle
              page1.ReportTitle.Objects.Add(text1);
              // group
              TextObject text2 = new TextObject();
              text2.Name = "Text2";
              text2.Bounds = new RectangleF(0, 0,
              Units.Centimeters * 2, Units.Centimeters * 1);
              text2.Text = "[Cities.CityName]";//[Cities.CityName].Substring(0, 1)
              text2.Font = new Font("Tahoma", 10, FontStyle.Bold);
              // add it to GroupHeader
              group1.Objects.Add(text2);
              report.Show();
          }
      }
  }
  </code></pre>
  
  <p>Here I want to generate a report on a click of a button , when clicked on a Button to generate report it gives me an error on line <code>report.Show();</code> saying:</p>
  
  <blockquote>
    <p>DragDrop registration did not succeed.</p>
  </blockquote>
  
  <p>and when I continue for execution it stops the execution at  <code>report.Show();</code>.</p>