logo
small logo
  • Produkte
  • Shop
  • Support
  • Articles
  • Customer panel Support
    • en
    • pt
    • es
    • de
    • pl
    • JP
    • ZH
  • Home
  • /
  • Articles
  • /
  • How to connect to SQLCe
  • Wollten Sie Tabellen für den Benutzer generieren - Excel oder OpenOffice Calc?

    8. Oktober 2020

    Tabellen. Seit Jahrhunderten werden sie verwendet, um dieselbe Art von Daten für Buchhaltungszwecke, Zählbeträge und

    read more
  • Wahl der Top-Werte in einer Matrix

    22. April 2021

    Der Artikel ist aktuell bis Version 2022.1. FastReport.NET verfügt über ein großartiges Tool für die Anzeige

    read more
  • Wie schützen Sie Ihr PDF?

    30. November 2020

    Am Vorabend des Datenschutztages haben wir beschlossen, ein Material zum Schutz von PDF-Dokumenten vorzubereiten. PDF-Dokumente

    read more
  • Kopieren von Berichtsbänder in einen anderen mit allen Inhalten

    31. März 2021

    Manchmal ist es notwendig, Teile eines Berichts in einem anderen zu verwenden. In einfachen Fällen

    read more
  • FastReport.NET packages and .NET 5.0

    17. Dezember 2020

    UPD: Gilt für die Versionen von FastReport .NET vor 2022.2. Lizenzpakete sind jetzt auf unserem

    read more

How to connect to SQLCe

11. November 2019

Microsoft SQL Server Compact Edition is a simple local relational database that doesn't require installation, and the connection is made to the database file. You do not need admin rights to work with the base. You can only "password" the base. For many developers, such a simple database is simply necessary to solve non-complex applications that do not require the removal of access rights.

To connect to the SQL Ce database, the FastReport.Net has a plug-in connector for the reporting designer. The plug-in library project is located in a folder:

C:\Program Files (x86)\FastReports\FastReport.Net\Extras\Connections\FastReport.SqlCe

You need to pre-assemble this library, and then - to connect in the reports designer. To get the plug-in, choose the File->Options menu:

 

On the Plugins tab, we add the previously collected FastReport.SQLCe.dll library.
After restarting the designer, you can start creating a report data source:

 

Let’s select now available SQL Ce connection. The settings are quite simple – path to the database file and the password to it.

 

 At the stage of the selection tables, we can write a SQL query. It will allow us to filter the data before they are received. However, the main advantage of using the SQL query - the opportunity to parameterized queries. This means that we can use to request provided the value of the parameter. Add a new SQL query using the button "Add SQL query ...".

 

In this query, we compare the FirstName field to the @param. We will define it in the next step:

 

Parameter name must be identical to the one we used in a SQL query. Also, you must specify the data type, which must match the field type in your query and expression. A report variable, a system variable, a function, or a text expression can be used as an expression. In our example we use a variable report:

 

By this point it should have been created. If you have not already, you'll need to create a query with a blank expression parameter, and only then edit the resulting table to the designer window of data.
After you create the query we get a new table:

 

In our case the report variable had “Rick” value. So we got the data line in which the name of employee is responding to the rule we set before:

 

Thus, it is quite easy to create a data source based on the database of the SQL Ce simply using a plug-in connector. And a parameterized query will help us get only the needed data. And the value of the parameter can be obtained from the outside if you use the report variable.

about product download buy
avatar
Dmitriy Fedyashov
Technical Writer
Fast Reports Team: Dmitriy Fedyashov - Technical Writer at Fast Reports
.NET FastReport Data Source SQLCe

Add comment
logo
  • 800-985-8986 (English, US)
  • +4930568373928 (German)
  • +55 19 98147-8148 (Portuguese)
  • info@fast-report.com
  • 901 N Pitt Str #325 Alexandria VA 22314
  • Shop
  • Download
  • Dokumentation
  • Referenzen
  • Informationen zur Deinstallation unserer Produkte
  • Ticket system
  • FAQ
  • Tutorial Video
  • Forum
  • Articles
  • Unsere Nachrichten
  • Presse über uns
  • Partner
  • Kontakte

© 1998-2022 by Fast Reports Inc.

  • Datenschutz