Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to render the picture field in the database in the report

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

How to present the picture field in the database in the report, I believe that many inexperienced people do not know what to do about it. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

Overview

In addition to presenting content in text, embedding pictures is also a common requirement in reports. There are many sources of pictures, such as application directory, server application external directory, public network address and so on.

For different sources or storage locations, there are corresponding ways to introduce images. Those stored in the application directory can be stored through the relative path or absolute path of the application, those within the server but outside the application can also be introduced through the absolute path, and those of the public network address can be implemented by introducing an absolute Url address.

What we are going to talk about today is another special case in which the picture is stored in the large field of the database, so the report tool is required to support the function that the large field of picture can be directly converted into picture rendering, otherwise it can only be realized through user-defined classes.

What do you do in the drying report?

It looks very trouble, but it is actually very easy!

The next content, combined with the employee information table in the "photos" field (large field storage) to show you how to do it.

Procedure to prepare a free-form report template

Prepare a free-form report with the results shown in the following figure

The template is designed as follows

Dataset sql:SELECT employee. Employee ID, employee. Last name, employee. Name, employee. Position, employee. Honorable title, employee. Date of birth, employee. Date of employment, employee. Cities, employees. District, employee. Address, employee. Photo FROM employee

B2 expression: = ds1.select (employee ID)

D 3 expression: = ds1. Last name + ds1. First name

B4, B5, B6, B7, D4, D5, D6 are all: = ds1. Field name

In addition, the left nominative of A1-A8 is set to B3

Introduce the picture field into the template

Here comes the point! Introduce the picture field into the template, right-click in the E3 cell and select "Picture"

Switch to the expression option as follows, and set the expression to: = ds1. Photo

Preview report results

Once you are sure, preview the report again

The picture field stored in the database is displayed in the report.

For this seemingly complex problem, but the more commonly used functions, report tools have been taken into account in the design, the implementation of the method has also been encapsulated, developers do not need to understand the principle, directly according to the user manual operation, greatly reduce the report development cycle.

After reading the above, have you mastered how the picture fields in the database are rendered in the report? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report