Skip to main content

On This Page

RDLC Development for Business Central: Eliminating Deployment Feedback Loops

3 min read
Share

These articles are AI-generated summaries. Please check the original sources for full details.

RDLC Without BC: When the Feedback Loop Is Longer Than the Workday

Business Central developers face a five-minute deployment loop for every minor RDLC report adjustment. Stack Collider has developed a local WPF renderer that eliminates this latency by bypassing the full build and deploy cycle. This tool allows for instant visualization of report changes by connecting XML data directly to RDLC layouts.

Why This Matters

The technical reality of Business Central development involves a ‘hard lock’ in the Visual Studio Report Designer, which defaults to SQL data providers and prohibits native XML connections. This forces developers into a high-latency iteration cycle where simple field adjustments require a full application deployment. By building a custom rendering pipeline, engineers can bypass these vendor-imposed limitations and regain significant portions of their workday.

Key Insights

  • Visual Studio Report Designer lacks native support for connecting XML as a DataSource for Business Central RDLC files, throwing XmlDP query errors.
  • ReportViewerCore.NETCore allows for local PDF rendering of RDLC reports using a DataTable parsed from Business Central XML data.
  • Business Central delivers all data as strings, requiring explicit column type inference (int → decimal → DateTime → string) to enable proper report sorting and calculations.
  • WPF applications using WebView2 must explicitly set the UserDataFolder path to AppData to avoid write permission crashes when running from Program Files.
  • Publishing as a single file (PublishSingleFile) in .NET can cause DllNotFoundException in restricted directories because native DLLs cannot be extracted to the temp folder.
  • Inno Setup preprocessor directives like #define may fail if the script file encoding is UTF-8 with BOM in specific compiler configurations.

Working Examples

Explicit date format parsing for Business Central data to prevent silent type-conversion failures.

private static readonly string[] DateFormats = {
  "dd/MM/yyyy", "dd/MM/yyyy HH:mm:ss",
  "yyyy-MM-dd", "yyyy-MM-ddTHH:mm:ss"
};

DateTime.TryParseExact(value, DateFormats,
  CultureInfo.InvariantCulture,
  DateTimeStyles.None, out _)

Core dependencies for the local RDLC rendering and preview pipeline.

<PackageReference Include="ReportViewerCore.NETCore" Version="*" />
<PackageReference Include="Microsoft.Web.WebView2" Version="*" />

Configuring WebView2 to use a writable AppData path for user data, avoiding Program Files permission errors.

var env = await CoreWebView2Environment.CreateAsync(
  null,
  Path.Combine(
    Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
    "RdlcReportTester", "WebView2"));
await webView.EnsureCoreWebView2Async(env);

Practical Applications

  • Local Report Iteration: Drag and drop .rdlc and .xml files into a WPF previewer to see layout changes instantly without Business Central deployment.
  • Type Inference Protection: Implement logic to walk through non-empty column values to infer proper numeric and date types, ensuring report sorting functions correctly.
  • Installer Permission Handling: Avoid PublishSingleFile for WPF apps installed in Program Files to ensure native DLLs are accessible without write permissions.
  • WebView2 Deployment: Always specify a dedicated AppData subfolder for WebView2 environments to prevent silent application crashes during initialization.

References:

Continue reading

Next article

Building Production-Ready Semantic Search: Implementing the Service Layer with Java and pgvector

Related Content