# Report System Usage Guide
# রিপোর্ট সিস্টেম ব্যবহার গাইড

## Overview / সারসংক্ষেপ

This guide will help you use the newly created comprehensive report pages for viewing and printing everyone's information with advanced search options.

এই গাইড আপনাকে উন্নত অনুসন্ধান বিকল্প সহ সবার তথ্য দেখতে এবং প্রিন্ট করতে নতুন তৈরি সম্পূর্ণ রিপোর্ট পেজ ব্যবহার করতে সাহায্য করবে।

---

## Files Created / তৈরি ফাইল সমূহ

### 1. **students_report.php** (23 KB)
Complete student report page with advanced search and print functionality.

**Features:**
- Filter by class, status, gender
- Search by name, student ID, roll number, phone, email
- Filter by admission date range
- Display attendance percentage
- Display outstanding fees
- Statistics cards showing totals
- Print-friendly layout

### 2. **teachers_report.php** (21 KB)
Complete teacher report page with advanced search and print functionality.

**Features:**
- Filter by status, gender
- Search by name, employee ID, phone, email, qualification
- Filter by joining date range
- Filter by experience years range
- Display number of classes and subjects taught
- Statistics cards with averages
- Print-friendly layout

### 3. **all_users_report.php** (19 KB)
Comprehensive report showing all system users.

**Features:**
- Filter by user role (admin, teacher, student, parent)
- Filter by status (active, inactive)
- Search by name, email, ID
- Filter by creation date range
- Statistics showing distribution by role
- Print-friendly layout

### 4. **README.md** (7 KB)
Complete documentation in Bengali explaining all features and usage.

---

## How to Access / কিভাবে প্রবেশ করবেন

### Option 1: Direct URL / সরাসরি URL
- Students Report: `http://localhost/bidda/reports/students_report.php`
- Teachers Report: `http://localhost/bidda/reports/teachers_report.php`
- All Users Report: `http://localhost/bidda/reports/all_users_report.php`

### Option 2: From Reports Dashboard / রিপোর্ট ড্যাশবোর্ড থেকে
1. Go to: `http://localhost/bidda/reports/index.php`
2. Click on the buttons at the top:
   - "শিক্ষার্থী রিপোর্ট" (Student Report)
   - "শিক্ষক রিপোর্ট" (Teacher Report)
   - "সকল ইউজার" (All Users)

---

## Step-by-Step Usage / ধাপে ধাপে ব্যবহার

### Step 1: Login / লগইন করুন
- You must be logged in as an **admin** user
- Username: `admin` (or your admin username)
- Password: Your admin password

### Step 2: Navigate to Reports / রিপোর্টে যান
- From main menu, go to Reports section
- Or directly access via URL (see above)

### Step 3: Select Filters / ফিল্টার নির্বাচন করুন

#### For Students Report:
1. **শ্রেণী (Class):** Select specific class or "সকল শ্রেণী" for all
2. **স্ট্যাটাস (Status):** Active, Inactive, Graduated, or Transferred
3. **লিঙ্গ (Gender):** Male, Female, Other, or All
4. **অনুসন্ধান করুন (Search By):** Choose what to search by
5. **অনুসন্ধান টেক্সট (Search Text):** Enter search term
6. **ভর্তির তারিখ (Admission Date):** Select date range

#### For Teachers Report:
1. **স্ট্যাটাস (Status):** Active or Inactive
2. **লিঙ্গ (Gender):** Male, Female, Other, or All
3. **অনুসন্ধান করুন (Search By):** Choose search field
4. **অনুসন্ধান টেক্সট (Search Text):** Enter search term
5. **যোগদানের তারিখ (Joining Date):** Select date range
6. **অভিজ্ঞতা (Experience):** Set min and max years

#### For All Users Report:
1. **ইউজার টাইপ (User Type):** Admin, Teacher, Student, Parent, or All
2. **স্ট্যাটাস (Status):** Active or Inactive
3. **অনুসন্ধান টেক্সট (Search Text):** Enter search term
4. **তারিখ (Date):** Select creation date range

### Step 4: Search / অনুসন্ধান করুন
Click the **"অনুসন্ধান করুন" (Search)** button to view results.

### Step 5: View Results / ফলাফল দেখুন
- Results will be displayed in a table
- Statistics cards will show summary information
- Total count will be displayed at the bottom

### Step 6: Print or Save / প্রিন্ট বা সংরক্ষণ করুন

#### To Print:
1. Click the **"প্রিন্ট করুন" (Print)** button
2. Browser print dialog will open
3. Select printer or "Save as PDF"
4. Adjust settings as needed
5. Click Print/Save

#### Print Features:
- Navigation and search panel will be hidden
- Only essential data columns will be printed
- Clean black borders on tables
- Page breaks handled properly
- Headers repeat on each page

---

## Advanced Search Examples / উন্নত অনুসন্ধান উদাহরণ

### Example 1: Find all active male students in Class 10
1. শ্রেণী: Select "দশম শ্রেণী - ক"
2. স্ট্যাটাস: Select "সক্রিয়"
3. লিঙ্গ: Select "ছেলে"
4. Click "অনুসন্ধান করুন"

### Example 2: Find teachers with 5-10 years experience
1. অভিজ্ঞতা (মিনিট): Enter "5"
2. অভিজ্ঞতা (সর্বোচ্চ): Enter "10"
3. Click "অনুসন্ধান করুন"

### Example 3: Find all users created in 2025
1. তারিখ (থেকে): Select "2025-01-01"
2. তারিখ (পর্যন্ত): Select "2025-12-31"
3. Click "অনুসন্ধান করুন"

### Example 4: Search by phone number
1. অনুসন্ধান করুন: Select "ফোন"
2. অনুসন্ধান টেক্সট: Enter phone number (e.g., "01712345678")
3. Click "অনুসন্ধান করুন"

---

## Tips & Tricks / পরামর্শ

### 1. **Combine Multiple Filters**
You can use multiple filters together for more precise results.
For example: Class + Status + Gender

### 2. **Partial Search Works**
You don't need to enter complete names or IDs.
For example: Searching "আহ" will find "আহমেদ", "আহসান", etc.

### 3. **Reset Filters**
Click the **"রিসেট" (Reset)** button to clear all filters and start fresh.

### 4. **Save as PDF**
When printing, choose "Save as PDF" to create a digital copy.

### 5. **Landscape for Wide Tables**
For tables with many columns, use landscape orientation when printing.

---

## Troubleshooting / সমস্যা সমাধান

### Problem: "No results found"
**Solution:**
- Check if filters are too restrictive
- Try broadening search criteria
- Click Reset and try again

### Problem: Print layout looks wrong
**Solution:**
- Use Chrome or Firefox browser (recommended)
- Ensure print CSS is not disabled
- Try adjusting page margins in print settings

### Problem: Page loads slowly
**Solution:**
- This is normal when filtering large datasets
- Consider adding more specific filters to reduce results
- Check database connection

### Problem: Cannot access report pages
**Solution:**
- Ensure you are logged in as admin
- Check session is active
- Clear browser cache and try again

---

## Database Tables Used / ব্যবহৃত ডাটাবেস টেবিল

The report pages query the following database tables:
- `users` - User authentication and roles
- `students` - Student information
- `teachers` - Teacher information
- `classes` - Class/section information
- `attendance` - Attendance records
- `fees` - Fee and payment information
- `class_subjects` - Class-subject mappings

---

## Security Notes / নিরাপত্তা নোট

- Only admin users can access these reports
- All user input is sanitized to prevent SQL injection
- Sessions are validated on each page load
- Passwords are never displayed in reports

---

## Future Enhancements / ভবিষ্যত উন্নয়ন

Planned features for future versions:
- [ ] Excel/CSV export functionality
- [ ] Email report directly from system
- [ ] Custom report builder
- [ ] Charts and graphs
- [ ] Scheduled automatic reports
- [ ] Report templates

---

## Support / সহায়তা

If you encounter any issues or have questions:
1. Check the README.md file in reports folder
2. Contact system administrator
3. Check error logs in PHP error log file

---

## Version Information / সংস্করণ তথ্য

- **Version:** 1.0
- **Release Date:** 2025-10-05
- **Compatibility:** PHP 7.4+, MySQL 5.7+
- **Browser Support:** Chrome, Firefox, Edge, Safari

---

## Credits / কৃতিত্ব

Developed for School Management System
Using: PHP, MySQL, Bootstrap 5, Font Awesome 6

---

**For detailed feature documentation, see README.md**
**বিস্তারিত বৈশিষ্ট্য ডকুমেন্টেশনের জন্য, README.md দেখুন**
