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
sanjith kumar p
NA
1
1.5k
Crystal reports problem
Aug 29 2011 4:10 AM
Dear Sir,
I am creating a crystal report for a department stores.pls tell me the solution for passing the date values in the forms.the data is not showing in the report page.kindly give the solution for it.
Code :
private void btnprint_Click(object sender, EventArgs e)
{
save();
if (V_Save == true)
{
newpri();
}
}
public void newpri()
{
TableLogOnInfos Crinfo = new TableLogOnInfos();
TableLogOnInfo CrLog = new TableLogOnInfo();
ConnectionInfo CrCon = new ConnectionInfo();
CrCon.ServerName = con.ConnectCrystalServer();
CrCon.DatabaseName = con.ConnectCrystalTable();
CrCon.UserID = con.ConnectCrystalUser();
CrCon.Password = con.ConnectCrystalPW();
CrystalReport2 CBR = new CrystalReport2();
foreach (Table crTable in CBR.Database.Tables)
{
CrLog = crTable.LogOnInfo;
CrLog.ConnectionInfo = CrCon;
crTable.ApplyLogOnInfo(CrLog);
}
frmCrySalesbill FCS = new frmCrySalesbill();
FCS.crystalReportViewer1.ReportSource = CBR;
string condsr;
dmy = dtpdate.Value.ToShortDateString();
//d_y = dmy.Remove(0, 3).ToString().Trim();
d_y1 = dmy.Remove(5, 0).ToString().Trim();
//dep_d = dmy.Remove(1, 5).Trim();
//dep_y = d_y.Remove(0, 2).Trim();
//dep_m = dmy.Remove(1, 8).Trim();
ason_date = "DateTime (" + d_y1 + ")";
condsr = "{Sales1.BillNO} =" + Convert.ToInt32(txtbillno.Text) + " and {Sales1.Date} = " + ason_date;
FCS.crystalReportViewer1.SelectionFormula = condsr;
FCS.crystalReportViewer1.Refresh();
FCS.ShowDialog();
}
output:
Reply
Answers (
1
)
Delete rows from GridView
How to get backcolor of custom shape from images