Infor SyteLine4 min readNetray Engineering Team

How to Set Up Data Views for Reporting in SyteLine

Data views in SyteLine serve as the foundation for efficient reporting by pre-joining tables, applying business logic, and presenting clean datasets to reporting tools. Well-designed SQL views abstract the complexity of SyteLine's normalized database schema, making it accessible to report designers who may not understand the underlying table relationships. This guide covers creating, optimizing, and maintaining reporting views for SyteLine's manufacturing data model.

Designing SQL Views for SyteLine Tables

Create SQL views in SQL Server Management Studio targeting the SyteLine database. Start by identifying the core tables for your reporting domain using the SyteLine data dictionary. For production reporting, join job_mst with jobmatl_mst and jobroute_mst. For order management, join coitem_mst with co_mst and item_mst. Apply consistent naming conventions using a vw_ prefix followed by the functional area, such as vw_ProductionJobSummary or vw_OpenOrdersByCustomer. Include calculated columns for derived metrics like ExtendedPrice (qty_ordered * unit_price), DaysLate (DATEDIFF between due_date and GETDATE()), and MarginPercent to reduce calculation burden on report tools.

  • Use SyteLine data dictionary to identify table relationships before designing view joins
  • Apply naming convention vw_[FunctionalArea]_[Purpose] for consistent view organization
  • Include calculated columns for ExtendedPrice, DaysLate, AgingBucket, and MarginPercent
  • Join lookup tables like item_mst, customer_mst, and warehouse_mst for descriptive field access

Optimizing View Performance with Indexing

Reporting views against SyteLine tables can return large datasets requiring careful performance optimization. Create indexed views for frequently accessed reports by adding the WITH SCHEMABINDING option and creating a unique clustered index. For non-indexed views, ensure the underlying tables have appropriate indexes on join columns and filter predicates. Common optimization targets include adding indexes on job_mst.job, coitem_mst.co_num, and item_mst.item columns used in WHERE clauses. Monitor view execution plans using SQL Server's Query Analyzer to identify table scans that indicate missing indexes, targeting query execution under 5 seconds for interactive reports.

  • Create indexed views with SCHEMABINDING for high-frequency summary reports
  • Verify indexes exist on all join columns like job, co_num, item, and whse in base tables
  • Use SQL Server Query Analyzer to identify and resolve full table scans in view execution
  • Target view execution under 5 seconds for interactive reports and under 30 seconds for batch reports

Managing View Security and Maintenance

Apply SQL Server security permissions to reporting views, granting SELECT access to reporting service accounts while restricting access to sensitive fields like cost and margin data. Create separate view sets for different security tiers: operational views accessible to production staff, financial views restricted to accounting, and executive views limited to management. Implement a view maintenance process that runs after SyteLine upgrades or schema changes, using a validation script that checks all view dependencies against current table structures. Document each view with extended properties describing its purpose, source tables, refresh requirements, and consuming reports.

  • Grant SELECT permissions to reporting service accounts, restricting cost and margin columns by role
  • Create tiered view sets: operational (all staff), financial (accounting), executive (management)
  • Build a post-upgrade validation script checking view dependencies against modified table schemas
  • Document views using SQL Server extended properties for purpose, sources, and consuming reports

Frequently Asked Questions

How many reporting views should a typical SyteLine implementation have?

A well-organized SyteLine implementation typically has 30-60 custom reporting views covering production, inventory, sales, purchasing, and financial domains. Each domain usually requires 5-10 views at different granularity levels from summary to detail. Avoid creating more than 100 views as maintenance complexity increases. Consolidate similar views by adding parameters or optional joins rather than creating view variants.

Should I use views or stored procedures for SyteLine reporting?

Use views for standardized datasets accessed by multiple reports and tools like SSRS, Crystal Reports, and Power BI. Use stored procedures when you need complex conditional logic, temporary tables, or parameterized dynamic queries that views cannot support. A typical split is 70% views and 30% stored procedures. Views are easier to maintain and can be consumed by any SQL-compatible reporting tool without modification.

How do I handle SyteLine multi-site data in reporting views?

For single-database multi-site deployments, add a site column filter to every view and include site as a report parameter. For separate-database multi-site architectures, create views using UNION ALL across linked server connections to each site database, prefixing each record with the site identifier. Cross-database views typically add 2-5 seconds of latency per additional site. Consider materializing cross-site data into a reporting warehouse for implementations with more than 3 site databases.

Key Takeaways

  • 1Designing SQL Views for SyteLine Tables: Create SQL views in SQL Server Management Studio targeting the SyteLine database. Start by identifying the core tables for your reporting domain using the SyteLine data dictionary.
  • 2Optimizing View Performance with Indexing: Reporting views against SyteLine tables can return large datasets requiring careful performance optimization. Create indexed views for frequently accessed reports by adding the WITH SCHEMABINDING option and creating a unique clustered index.
  • 3Managing View Security and Maintenance: Apply SQL Server security permissions to reporting views, granting SELECT access to reporting service accounts while restricting access to sensitive fields like cost and margin data. Create separate view sets for different security tiers: operational views accessible to production staff, financial views restricted to accounting, and executive views limited to management.

Need optimized reporting views for your SyteLine database? Netray can design high-performance data views tailored to your reporting needs.