I am doing dispatch management system. There i want a crystal report that will accept a date from a textbox or dropdown list and according to that date i need to display all the data in that day as a report.
I am using Visual Studio 2005 and SQL Server 2008 R2. My database name is letter and table name for generating report is inward.
This table has columns
id, dispatchno, dispatchdate, fromname, fromaddress, subject, lettertype, letterno, remarks where subject, lettertype, letterno may have null values.
I want to generate report with dispatchno.dispatchname, fromname and from address together in a column also subject and remarks together.
In record selection formula I can select the dates, but will it be possible only for that day. What I need is to select a date from textbox or dropdown lists and I need to display report for that day. I used the formula {inward.fromname}+","+{inward.fromaddress} for joining fromname and fromadrress. It works fine. But when I joining subject and remarks using the formula IIF(IsNull({inward.subject}), "" , {inward.remarks} & ",") I am getting blank. Here subject having null values.
I use the code in reports.aspx.cs page like..
using CrystalDecisions.CrystalReports.Engine;
using System.Data.SqlClient;
public partial class _Default : System.Web.UI.Page {
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
ReportDocument cryRpt = new ReportDocument();
cryRpt.Load(Server.MapPath("CrystalReport.rpt"));
CrystalReportViewer1.ReportSource = cryRpt;
}
}