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.4k
Printing Bill using Crystal Reports
Jun 9 2020 8:51 PM
I tried to print bills through Crystal Reports but it is coming out blank.
any suggestions will be appreciated.
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 Tbl_HeaderData.JobNo = '"
+ txtJobNo.Text +
"'"
, con);
DataSet dst =
new
DataSet();
da.Fill(dst,
"PrintBills"
);
Cryrpt.Load(
"PrintBill.rpt"
);
Cryrpt.SetDataSource(dst);
crystalReportViewer1.ReportSource = Cryrpt;
con.Close();
}
catch
(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
}
Reply
Answers (
9
)
The multi part identifer HeaderDataJobNo could not be found.
How to use node services in asp.net core