DPLX Files (Deprecated)

DPLX (DynamicPDF Layout XML) files are deprecated as of DynamicPDF ReportWriter v11. These files will however work with the .NET Framework version of the assemblies but will not work with the .NET Standard assemblies because they contain platform dependent information. We strongly recommend upgrading them to the new DLEX file format using DynamidPDF Designer. Please note that the queries and database information will need to be moved to your code after the upgrade.

DPLX files can be upgraded to DLEX files as follows:

  1. Open the DPLX file in DynamicPDF Designer.
  2. Save the DPLX file as a DLEX file.
  3. Update your project to use the ceTe.DynamicPDF.LayoutEngine namespace instead of the ceTe.DynamicPDF.ReportWriter namespace.
  4. Update your code to DataReaderReportData can be used to replace the and SQL queries or stored procedures used in your DPLX file.
// Create the document's layout from a DLEX template
DocumentLayout layoutReport = new DocumentLayout(Util.GetResourcePath("SimpleReport.dlex"));

SqlConnection connection = new SqlConnection(myConnectionString);
connection.Open();
SqlCommand command = new SqlCommand("SELECT * FROM Products", connection);
SqlDataReader productsReader = command.ExecuteReader();
NameValueLayoutData layoutData = new NameValueLayoutData();
layoutData.Add("Products", new DataReaderReportData(connection, productsReader));

// Layout the document and set it's properties
Document document = layoutReport.Layout(layoutData);

// Outputs the document to a file
document.Draw(outputFilePath);
'Convert to VB
// Create the document's layout from a DLEX template
DocumentLayout layoutReport = new DocumentLayout(Util.GetResourcePath("SimpleReport.dlex"));

SqlConnection connection = new SqlConnection(myConnectionString);
connection.Open();
SqlCommand command = new SqlCommand("SELECT * FROM Products", connection);
SqlDataReader productsReader = command.ExecuteReader();
NameValueLayoutData layoutData = new NameValueLayoutData();
layoutData.Add("Products", new DataReaderReportData(connection, productsReader));

// Layout the document and set it's properties
Document document = layoutReport.Layout(layoutData);

// Outputs the document to a file
document.Draw(outputFilePath);

In this topic