# LẤY ĐIỀU KIỆN LỌC BÁO CÁO VÀO VIEW IN

## Vấn đề

* Mẫu vẽ frx cần thể hiện điều kiện lọc của báo cáo vào mẫu in
* Người dùng chọn điều kiện lọc giao diện báo cáo, bấm trang in để xem mẫu vẽ

## Nguyên tắc

* Sử dụng lệnh form25.TextDkLoc().Trim() để lấy ra điều kiện lọc bên ngoài. Ví dụ;
  * Tài Khoản: \[1111 - Tiền Việt Nam]    \
    Đối tượng: \[3388019 - Kinh phí đảng bộ Nhà máy Z175]
* Tại mẫu frx cần chèn thêm sub-band để chứa điều kiện lọc
  * Đặt điều kiện ẩn/hiện sub-band khi (trống/ không trống) điều kiện lọc

## Hướng dẫn

### 1. Code "Xử lý trước view trang"

```
// Tạo 1 biến string trong mẫu in: DieuKienLoc
// Tại code xử lý trước view trang: gán giá trị cho biến
rpt.Parameters["DieuKienLoc"].Value = formreport.TextDkLoc().Trim();
```

### 2. Sửa mẫu in

* Chèn sub-band&#x20;

  <figure><img src="/files/GSVNpHWBklWLChe2rp1E" alt=""><figcaption><p>Chèn sub-band</p></figcaption></figure>
* Đặt điều kiện ẩn hiện cho trường hợp (có hoặc không có điều kiện lọc)&#x20;

  <figure><img src="/files/ZNJPK2h3fT7Wye9psfPy" alt=""><figcaption><p>Đặt điều kiện ẩn hiện cho sub-band</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kythuat.dtechvn.com/bao-cao/lay-dieu-kien-loc-bao-cao-vao-view-in.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
