6.7 KiB
6.7 KiB
FG Reports - Quick Start Guide
🚀 Access the Reports Page
Step 1: Login
- Go to
http://localhost:8080(or your app URL) - Login with credentials:
- Username:
admin - Password:
admin123
- Username:
Step 2: Navigate to Reports
Option A - Using Navigation Menu:
- Click "Quality" in the top navigation bar
- Click "Reports" (if visible in submenu)
Option B - Direct URL:
- Go to:
http://localhost:8080/quality/reports
📊 Generate Your First Report
Daily Report (Easiest)
- Click the "Today's Report" card
- Click "Generate Report" button
- View results in the table below
- Statistics display at top: Total, Approved, Rejected counts
Select Specific Date Report
- Click the "Select Day" card
- A date picker appears
- Select a date from the calendar
- Click "Generate Report"
- View the data
Date Range Report
- Click the "Date Range" card
- Select Start Date
- Select End Date
- Click "Generate Report"
- View all scans within that range
💾 Export Data
After generating a report:
Export to Excel
- Click the "Export Excel" button (green with file icon)
- File downloads as:
fg_report_YYYY-MM-DD.xlsx - Open in Microsoft Excel or Google Sheets
Export to CSV
- Click the "Export CSV" button
- File downloads as:
fg_report_YYYY-MM-DD.csv - Open in Excel, Google Sheets, or any text editor
📈 Available Report Types
| Report | Purpose | When to Use |
|---|---|---|
| Today's Report | All scans from today | Daily production overview |
| Select Day | Choose any date | Look at past production |
| Date Range | Pick start & end dates | Analyze a period |
| Last 5 Days | Automatic 5-day window | Weekly summary |
| Defects Today | Only rejected items today | Quality issues monitoring |
| Defects by Date | Rejected items on specific date | Defect investigation |
| Defects Range | Rejected items in date range | Period defect analysis |
| Defects 5 Days | Last 5 days rejected items | Weekly defect trends |
| All Data | Everything in database | Complete export |
📊 Reading the Report
Statistics (Top Right)
- Total Scans: Total records in report
- Approved: Scans with quality code '000' (green)
- Rejected: Scans with quality codes 001-999 (red)
Status Badges in Table
- Green Badge: APPROVED (quality_code = '000')
- Red Badge: REJECTED (quality_code = '001' or higher)
Table Columns
| Column | Meaning |
|---|---|
| ID | Record number |
| Operator Code | Who scanned (e.g., OP01) |
| CP Code | Product code (e.g., CP00000001-0001) |
| OC1 Code | Operation code 1 |
| OC2 Code | Operation code 2 |
| Status | APPROVED or REJECTED |
| Date | Scan date |
| Time | Scan time |
| Created | When record was created |
🎨 Dark Mode
The reports page fully supports dark mode:
- Toggle theme using the moon icon (🌙) in top navigation
- All colors automatically adjust
- Text remains readable in both modes
🔧 Keyboard Shortcuts
- Tab: Navigate between fields
- Enter: Generate report / Confirm selection
- Esc: Clear filters (if supported)
❌ Troubleshooting
Issue: "No data to display"
- Cause: Selected date range has no scans
- Solution:
- Try "All Data" report to verify data exists
- Use "Last 5 Days" for demo data
- Generate test data if needed
Issue: Export button is greyed out
- Cause: No report has been generated yet
- Solution: Select a report type and click "Generate Report" first
Issue: Page is loading forever
- Cause: Database query is taking long time
- Solution:
- Try a more specific date range
- Avoid "All Data" if database is very large
- Wait a few seconds for it to complete
Issue: Date picker won't open
- Cause: Browser compatibility issue
- Solution:
- Use Chrome, Firefox, or Safari (latest versions)
- Try a different browser
- Clear browser cache and reload
💡 Tips & Tricks
-
Quick Daily Check: Click "Today's Report" → "Generate" → "Export Excel"
- Takes ~10 seconds
- Perfect for daily reports
-
Weekly Summary: Click "Last 5 Days" → "Generate"
- Automatic 5-day window
- No date selection needed
-
Find Defects: Click "Defects Today" or "Defects Range"
- Only shows rejected scans
- Easier to see quality issues
-
Archive All Data: Click "All Data" → "Export Excel"
- Complete database backup
- Useful for compliance/audits
-
Batch Export: Generate multiple reports, export each separately
- Naming includes date for organization
- Can easily import all into one Excel workbook
📱 Mobile Usage
The reports page is fully responsive:
- Works on phone, tablet, desktop
- Report cards stack vertically on small screens
- Table scrolls horizontally if needed
- All buttons easily clickable on touch devices
🔒 Permissions
You need an active login to access reports:
- Anonymous users cannot view reports
- Session expires after inactivity (default: 30 minutes)
- Re-login required if session expires
📞 Support
If you encounter issues:
- Check browser console (F12 → Console tab)
- Check server logs:
docker logs quality_app_v2 - Verify login: Make sure you're logged in as admin
- Clear cache: Ctrl+Shift+Del (or Cmd+Shift+Del on Mac)
- Restart app:
docker compose restart app
🎯 Common Workflows
Workflow 1: Daily Quality Report
1. Login
2. Navigate to Reports
3. Click "Today's Report"
4. Click "Generate Report"
5. Click "Export Excel"
6. Email the file to supervisor
Time: ~2 minutes
Workflow 2: Investigation Specific Defect
1. Navigate to Reports
2. Click "Defects by Date"
3. Select the date you want to investigate
4. Click "Generate Report"
5. Review rejected scans
6. Click "Export Excel" for documentation
Time: ~5 minutes
Workflow 3: Weekly Trend Analysis
1. Navigate to Reports
2. Click "Last 5 Days"
3. Click "Generate Report"
4. Check approval rate in statistics
5. Export Excel to track trends over weeks
Time: ~3 minutes
Workflow 4: Complete Database Backup
1. Navigate to Reports
2. Click "All Data"
3. Click "Generate Report"
4. Click "Export Excel"
5. Archive the file
Time: ~1 minute (+ export time for large databases)
📚 Next Steps
- Read the full documentation:
FG_REPORTS_IMPLEMENTATION.md - See the implementation summary:
FG_REPORTS_SUMMARY.md - Check the checklist:
FG_REPORTS_CHECKLIST.md
✅ You're Ready!
You now have a complete FG Scan Reports system with:
- ✅ 9 different report types
- ✅ Real-time filtering
- ✅ Excel and CSV export
- ✅ Dark mode support
- ✅ Mobile responsive design
- ✅ Production-ready code
Happy reporting! 📊