logo
small logo
  • Products
  • Buy
  • Support
  • Articles
  • Customer panel Support
    • en
    • ru
    • pt
    • es
    • de
    • pl
    • JP
    • ZH
  • Home
  • /
  • Articles
  • /
  • How to use data in JSON format
  • Connection to NosDB (NoSQL)

    November 11, 2019

    NosDB is a prominent representative of the NoSQL databases. It is designed for use on

    read more
  • How to connect to RavenDB

    November 11, 2019

    Recently, the NoSQL database is gaining more and more popularity. They differ favourably from conventional

    read more
  • How to connect to SQLCe

    November 11, 2019

    Microsoft SQL Server Compact Edition is a simple local relational database that doesn't require installation,

    read more
  • How to connect to VistaDB

    November 15, 2019

    The Vista database will fall into the type of embedded databases. These databases differ from

    read more
  • How to connect to OracleDB from FastReport .NET

    November 15, 2019

    First of all, you can use the ODBC connector. But it is fraught with a

    read more

How to use data in JSON format

February 15, 2017

There used to be a question “How to use JSON data to my web reports?” as it was not easy to implement it in FastReport.Net. Recently  a version 2016.2 has been released to answer it and help users.

It must be clarified that JSON (Java Script Object Notation) is a text data exchange format based on Java Script. It is actively used in web-programming in communication between the browser and the server or between servers. This format is laconic compared to CML. It is convenient to use it with Java Script.

So, in this article it will be introduced how to use the data in JSON format in FastReport.Net.

Necessary to remind, that this feature appeared in FastReport.Net 2016.2.

Firstly, you should gather the connection plugin to the JSON data. It is located here: C: \ Program Files (x86) \ FastReports \ FastReport.Net \ Extras \ Connections \ FastReport.Json.

Let us walk you through the steps:

  1. Open the solution FastReport.Json.sln. To build successfully it is needed to correct a reference to System.Data.Json.dll library, which is located here: C: \ Program Files (x86) \ FastReports \ FastReport.Net \ Demo.
  2. Compile the project and get FastReport.Json.dll library.

There are three ways to register the plugin in a report designer:

1. Registration with report designer help:

  • Open the report designer. There is no difference whether it is a part of Visual Studio project or as a stand-alone application;
  • Add the plugin. You can do this in the menu: View-> Options ..., tab Plugins. Add a new plagin, using the button “Add”. Choose a previously compiled FastReport.Json.dll library;

 

  • Reopen a report designer.

2. Register manually in a FastReport configuration file:

  • By default, this file is located in the directory: "C: \ Documents and Settings \ user_name \ Local Settings \ Application Data \ FastReport";
  • Close all running instances of FastReport.Net;
  • Open the configuration file with any text editor. Fix the following lines:

<?xml version="1.0" encoding="utf-8"?>

<Config>

...

<Plugins>

<Plugin Name="c:\.....\FastReport.Json.dll"/>

</Plugins>

</Config>

3. Register the library in an application code:

  • Add a reference to the library in the project FastReport.Json.dll;
  • Perform the following code once when the program starts :FastReport.Utils.RegisteredObjects.AddConnection (typeof (JsonDataConnection)).

After the plug-in registration, it is possible to begin creating a data source in the report. Open the menu in the Report Designer: Data-> Add data source. Activate a data source wizard.

Click the button “New connection”.

 

Create a connection string. Select the connection type – JSONdatabase.

 

Next, select the data file with the extension JSON. It is important to say that the database can be located on another web resource. Therefore, to get to the database you need to specify the url. Click “OK”.

 

Click the button “Next” in the Data Wizard.

 

Choose the desired tables. For example, “Products” and click the button“ Finish”.

As table "Products" appeared in the data window,  drop the fields to the Data band: ProductName, UnitsInStock, UnitPrice and start the report.

 

As you can see, working with data from the json database is also convenient, as with any other source. Now FastReport.Net has become useful for the followers of this storage technology.

about product download buy
avatar
Dmitriy Fedyashov
Head of QA
.NET FastReport Data Source

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
  • Buy
  • Download
  • Documentation
  • Testimonials
  • How to uninstall
  • Ticket system
  • FAQ
  • Tutorial Video
  • Forum
  • Articles
  • Our News
  • Press about us
  • Resellers
  • Our team
  • Contact us

© 1998-2021 by Fast Reports Inc.

  • Privacy Policy