TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Chidiebere Mgbemena
NA
179
14.1k
The multi part identifer HeaderDataJobNo could not be found.
Jun 9 2020 4:52 PM
I got an error while trying to print bill with crystal report. The error is below
The multi part identifer HeaderDataJobNo could not be found.
Please help me find the solution to the error
thanks
my codes and sql below
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;
using
System.Data.SqlClient;
using
CrystalDecisions.CrystalReports.Engine;
namespace
NSPM_Sales_Invoice
{
public
partial
class
PrintBills : Form
{
SqlConnection con =
new
SqlConnection(Properties.Settings.Default.NSPM_Sales_InvoiceCon);
ReportDocument Cryrpt =
new
ReportDocument();
SqlDataAdapter dr;
public
PrintBills()
{
InitializeComponent();
}
private
void
PrintBills_Load(
object
sender, EventArgs e)
{
txtJobNo.Text = Class1.strinv;
try
{
con.Open();
SqlDataAdapter da =
new
SqlDataAdapter(
"select Tbl_HeaderData.JobNo,Tbl_HeaderData.Date,Tbl_HeaderData.GoodValue,Tbl_HeaderData.Vat,Tbl_HeaderData.StampDuty,Tbl_HeaderData.DeliveryCharges,Tbl_HeaderData.OtherCharges,Tbl_HeaderData.Total,Tbl_RowData.SINo,Tbl_RowData.Customer, Tbl_RowData.Description,Tbl_RowData.Price,Tbl_Rowdata.Quantity,Tbl_RowData.Value,Tbl_RowData.JobNo from Tbl_HeaderData Inner Join Tbl_RowData on Tbl_HeaderData.JobNo = Tbl_RowData.JobNo Where HeaderData.JobNo = '"
+ txtJobNo.Text +
"'"
, con);
DataSet dst =
new
DataSet();
da.Fill(dst,
"Tbl_HeaderData"
);
Cryrpt.Load(
"PrintBill.rpt"
);
Cryrpt.SetDataSource(dst);
crystalReportViewer1.ReportSource = Cryrpt;
con.Close();
}
catch
(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
}
Reply
Answers (
2
)
How to automatically increment the 'Id' row of a table ?
Printing Bill using Crystal Reports