i am tryaing to create rdlc report for print, i can't find existing datasource namespace in forms,
The Error is error The name 'itemsbindingsource' does not exist in the current context
What I have tried:
step1: I created Items Cass
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace test_project
{
public class Items
{
public int ID { get; set; }
public int Item_Group { get; set; }
public string Item_Name { get; set; }
public int Price { get; set; }
}
}
step2 : created Form1 to add data and view data in gridview tabel.
in this form Datagridview data source i have choosen through Object and get fields from Items class, by defualt "itemsBindingSource" name is gearated.
step3 : created Report1.rdlc for to print which i have add items in Form1
step4 : created Form2 for report1 view
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace test_project
{
public partial class frmPrint : Form
{
List<items> _list;
string _total;
public frmPrint(List<items> datasource, string total)
{
InitializeComponent();
_list = datasource;
_total = total;
}
private void frmPrint_Load(object sender, EventArgs e)
{
// hear i can't find existing datasource name
itemsBindingSource.Datasource = _list;
this.reportViewer1.RefreshReport();
}
}
}
pls help. me
i was following this video link
"https://www.youtube.com/watch?v=JoiLvAmksco"
i was spend 15days time to solve this, but i coudn't..
even crystal report also i was tried in that also same problem
these are my aplication configuration details
Visual Studio 2013 Ultimate
OS is windows 8.1