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
Debashish Mahonta
1.6k
166
4.1k
Problem crystal report.
Nov 6 2017 11:22 PM
I have created a crystal report with date parameter with access db. My form has two text field one is
txtFormDate, other is txtToDate. My crystal report is run with date parameter but data not show.
Example: My access db table is tblTransaction and it has 5 Column ID, TDate, BillNo, Taka, Vat. It has
some data following dated:
TDate BillNo Taka Vat
18/10/2017 123/4521 105 5
20/10/2017 235/4562 110 5
21/10/2017 254/5689 402 20
06/11/2017 245/5689 118 6
06/11/2017 249/5989 220 9
when i input date parameter between 06/11/2017 to 06/11/2017 or 21/10/2017 to 06/11/2017 data not
show. Please anybody help?
N.B: my access db table TDate field data type is short text and i use my crystal parameter is string. I have used dataset to load crystal report.
Here is my form Code:
[code]
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MyApplication.TransactionDataSetTableAdapters;
using System.Data.OleDb;
using System.Configuration;
using CrystalDecisions.CrystalReports.Engine;
namespace MyApplication
{
public partial class TransactionReport : Form
{
private OleDbConnection connection = new OleDbConnection();
public TransactionReport()
{
InitializeComponent();
connection.ConnectionString = (@"Provider = Microsoft.Jet.OLEDB.4.0; Data Source = E:\db
\BPS.mdb; Jet OLEDB:Database Password = bdinfo;");
}
private void btnOk_Click(object sender, EventArgs e)
{
try
{
Report rep = new Report();
TransactionDataSet ds = new TransactionDataSet();
qrytransactionTableAdapter adp = new qrytransactionTableAdapter();
adp.Fill(ds.qrytransaction);
rep.SetDataSource(ds);
rep.SetParameterValue("FromDate",txtFromDate.Text);
rep.SetParameterValue("ToDate", txtToDate.Text);
crystalReportViewer1.ReportSource = rep;
}
catch (Exception x)
{
MessageBox.Show(this, "" + x, "Error", MessageBoxButtons.OK, MessageBoxIcon.Stop);
}
}
}
}
[/code]
Reply
Answers (
1
)
About retrieving images from SQL to datagridview
How to convert letters to number?