Inserting Slashes by Condition into Cells

  • Last update:June 05, 2025
  • Overview

    Problem

    When designing a report, you can insert a slash through the Insert Slash function from the menu bar, as shown in the following figure.

     1.png

    But how can you insert a slash under certain conditions?

    Solution

    1. Solution one: You can enter a slash in a cell and preview the report after saving it. You can use Developer Tools in the browser to locate the element Slash, and you can find that the Slash is a picture, as shown in the following figure.

    2.png

    You can add a New Value condition attribute with New Value set to String (HTML code), which will be used to display the cell content.

    2. Solution two: You can reverse the approach. You can insert a slash in the cell first and set the cell to display data only when the condition is not met. The slash will be displayed automatically when the condition is met.

    Example

    Data Preparation

    Create a general report, and create a database query ds1 with the SQL statement SELECT Full_name,Job_position,Gender,city FROM Employee.

    3.png

    Report Design

    Drag the data columns into the cells respectively, and design the table as shown in the following figure.

     b1.png

    Solution One

    Copying HTML

    Insert a slash into any cell, save the report, and click Pagination Preview. Use Developer Tools in the browser to locate the Slash element, right-click the mouse, and choose Copy > Copy HTML, as shown in the following figure.

     4.png

    Or you can copy the following code:

    <img style="border:0;width:72px;height:17px;" src="data:image/png;base64,iVBORw0KGgoAAA ANSUhEUgAAAEgAAAARCAYAAAB+bOp4AAABg
    ElEQVR4nO3YQUeGURCG4am+JIlIKaKIIooWUUQRRYtoEUUUUUTRIooooo iiRRRRRBFFiyiiaBFRtIgiiiglleoHdI/Z1C+YWXwP1/5xOO87c0RE3nGGObQhV5L
    5l0w0YAIH+MQ1VtCNErdmQZOGagxhG 094xBYGUYVUt3ZBU4oerOIGH9jHOOqR4VctZvLQjnmc4wenmEUrcvyqxUwWmjCJI3zhCkvoQpFftZhJoAYj2MELHrCBA
    VQgxatc 1JShD2u4wxv2MIo6pPtVi5kCdGARF/jGCabRgmy3ZkGjB9IsdkDHYgd2KXaAepCFftViRq9crdgV1KuoV1Kv5rrYVS13axY0+l HXj3u/2Mf+Hq/YFf
    sZ6E8h4dYuaHR86BQbJ3Ss0PFCx4wpsbEjy61Z0OiAqoPqjNjgqt8xHWQXxAbbfL9qMaMrkK5CY2Krkb5c3 IqtTL1iK1Qyf6JLdqXY0r0ptoQ/iy3lw2JLeppb
    u6ApFnvWWRZ75tHnnkOx55/GX7b6R+0E0Y0oAAAAAElFTkSuQmCC">

    Condition Attribute Adding

    Select cell D2, add a New Value condition attribute with New Value set to String, enter the copied HTML code, set Type to Formula, and enter the formula len($$$)=0, as shown in the following figure.

     5.png

    Cell Data Setting

    Select cell D2, choose Cell Attribute > Others > Display Content, and select Display By HTML from the drop-down list, as shown in the following figure.

     6.png

    Solution Two

    Cancel all settings in solution one, copy the City field from column D to column E, and insert a slash in cell E2, as shown in the following figure.

    7.png

    Condition Attribute Adding

    Select cell E2, choose Condition Attribute > New Value, set New Value to Formula, enter the formula D2, set Type to Formula, and enter the formula LEN(D2)>0.

    The value of cell D2 is displayed when the value is not empty. Otherwise, a slash is displayed in cell E2.

     8.png

    Column Hiding

    Hide column D, as shown in the following figure.

     9.png

    Effect Display

    PC

    The effects made through the two solutions mentioned above are the same. Save the report and click Pagination Preview. The following figure shows the preview effect.

     10.png

    Mobile Terminal

    The report can be previewed on both the DataAnalyst app and the HTML5 terminal. The following figure shows the effect.

     11.jpg

    Template Download

    Attachment List


    Theme: Report Features
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy