Click here to Skip to main content
11,575,921 members (59,576 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
private void crystalReportViewer_Load(object sender, EventArgs e)
    {
        ExpiryDate();
    }


protected void ExpiryDate()
    {
        try
        {
            dtp_expiry_date.CustomFormat = "MM/dd/yyyy";
            conn = new OleDbConnection(Program.Fire_DB);
            conn.Open();
 
            da = new OleDbDataAdapter("SELECT fd_license_no AS [ترخيص البلدية], name_of_comp AS [اسم المؤسسة], register_no AS [رقم تصريح], mobile_no AS [رقم الجوال], location AS [المكان], license_validity AS [الانتهاء], entry_id AS [هوية العميل] FROM tbl_fire_entry_details where license_validity = '" + dtp_expiry_date.Text + "'", conn);
            ds = new DataSet();
            da.Fill(ds);
            dt = ds.Tables[0];
 
            Fire_Department.Report.CustomerDailyCrystalReport cr = new Fire_Department.Report.CustomerDailyCrystalReport();
            crystalReportViewer.ReportSource = cr;
            cr.SetDataSource(dt);
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.Message.ToString());
        }
    }


Then not show the report..when i select the date.
Posted 1-May-13 9:02am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 350
1 Dave Kreskowiak 160
2 F-ES Sitecore 145
3 OriginalGriff 125
4 Abhinav S 98
0 OriginalGriff 705
1 Sergey Alexandrovich Kryukov 600
2 Abhinav S 438
3 F-ES Sitecore 410
4 Suvendu Shekhar Giri 365


Advertise | Privacy | Mobile
Web04 | 2.8.150603.1 | Last Updated 1 May 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100