Reputation: 1390
I have designed a single account ledger in Crystal reports and it works very well. I don’t know how to design multiple account Crystal Reports?.
The reports is designed by ADO.Net Dataset as follow:
string sql = @"select date=convert(varchar,date,103),name,particulars,debit,credit,narrat from ledger" +
" where name between @name1 and @name2" +
" and companyID=@companyID" +
" Order by convert(datetime,date,103) asc";
SqlCommand cmd = new SqlCommand(sql, con);
cmd.Parameters.AddWithValue("name1", textBox1.Text);
cmd.Parameters.AddWithValue("name2", textBox2.Text);
cmd.Parameters.AddWithValue("companyID", label1.Text);
SqlDataAdapter dap = new SqlDataAdapter();
dap.SelectCommand = cmd;
DataSet7 d7 = new DataSet7();
dap.Fill(d7, "ledger");
CrystalMultiLdgerReports cmr = new CrystalMultiLdgerReports();
cmr.SetDataSource(d7.Tables[0]);
crystalReportViewer1.ReportSource = cmr;
How to design it with Crystal Reports for displaying as query? I mean with multiple records per page?.
Upvotes: 0
Views: 2129
Reputation: 1390
It's quite simple to create one to one records as per page for handling of multiple accounts on single page wise.
You just have to create Group and click/select at New Page After of Common Tab of Section Expert on Group Footer #1:
And You will display single records on single page between Record Selection as per above query.
Thanks.....
Upvotes: 1