Breakthrough for Web/Distributed Applications

Until version 22, there was a number of restrictions for web based projects. As the Web Designer is a single project file designer, all the glory that comes with multiple project files like project templates, table of contents and index and – most prominently – drilldown support were not available as they couldn't be designed.

This is going to boldly change in version 22 with the introduction of a virtual file system for LL.NET (Repository) that’s available from almost anywhere where files could be selected in the “normal” desktop designer.

Once such a repository is available, you can choose to insert items from there or create new project files in the repository. The synchronization of this virtual file system then is done automagically by the implementor of the repository interfaces. We’ll ship the product with a sample repository implementation for SQL databases, but you’ll be free to write your own. That’s also good news for anybody working with database stored project files. No more tedious fiddling with temporary check-outs from the database, temp files that need to be cleaned up afterwards and synchronization issues. Just write your own database repository, customized as you require it and profit from pure, stream based designing and printing.

From the code side, all you have to do is:

using (var LL = new ListLabel())
// Initialize a custom repository implementation which uses
// a SQLite database to store the report`s files
var myRepository = new SQLiteFileRepository("Data Source=...;Password=...");
using (var importUtil = new RepositoryImportUtil(myRepository))
// Import an existing project from a local file into the repository
// (a SQL database in this case) – this has to be done only once!
// As no file paths are used when working with a repository, we get
// an Item ID to reference the project within the repository.
string projectId = importUtil.ImportProjectFile(LL, @"C:\Reports\Invoice.lst");

// Tell List & Label which repository to use
LL.FileRepository = myRepository;

// And let the Designer load the imported project from the repository
LL.Design(LlProject.List, projectId);

This code creates an instance of our sample SQLite based repository, imports an existing project file into it and starts the List & Label Designer.

Use the designer as usual but note the depth of integration of the repository. For example when adding an image, you get the choice to use one from the repository or import one from your local file system – this file will then be added to the repository as well, making sure other clients can still use the project as is without having access to the referenced local path.

And of course, you can create a drilldown report – choose an existing one from the repository or choose to create a new one that will automatically be added to the repository:


The interface you have to implement is quite simple:

public interface IRepository
bool ContainsItem(string id);
void LoadItem(string id, Stream destinationStream, CancellationToken cancelToken);
IEnumerable<RepositoryItem> GetAllItems();
RepositoryItem GetItem(string id);
void DeleteItem(string id);
void CreateOrUpdateItem(RepositoryItem item, string importUserData, Stream sourceStream);
bool LockItem(string id);
void UnlockItem(string id);

This feature propels web and cloud applications to a new level and ensures feature parity with desktop applications.



Related Posts

Leave a Comment