渲染Html在表-RDLC报告中占用了不必要的空间

时间:2016-10-03 10:26:32

标签: c# rdlc

我在RDLC报告中的表格列中呈现Html。这是Html

<HTML>
<BODY>
<DIV STYLE=\"text-align:Left;font-family:Segoe UI;font-style:normal;font-weight:normal;font-size:12;color:#000000;\">
<DIV>
<DIV><P><SPAN STYLE=\"font-weight:bold;\">Male: 20-80</SPAN></P>
<P><SPAN /></P><P STYLE=\"text-align:Center;text-indent:20;\"><SPAN /></P>
</DIV>
</DIV>
</DIV>
</BODY>
</HTML>

我面临的问题是它需要不必要的空间,如附图所示。该列是“正常”范围,它是表中的最后一列。我不想要行下方和上方的空间。

表:

enter image description here

我已在canGrowcanShrink选项中进行了更改,但这不起作用。

1 个答案:

答案 0 :(得分:0)

尝试删除填充和html以及正文标记

    #include <iostream>

using namespace std;

class Person {
    char *name;
    int age;
public:
    Person ();
    Person (char *, int age = 18);
    Person (const Person &p);
    void output ();
};

Person ::Person() {
    name = new char[20]();
    age = 0;
}

Person ::Person(char *str, int age) {
    name = new char[50]();
    strcpy(name, str);
    this->age = age;
}

Person ::Person(const Person &p) {
    strcpy(name, p.name);
    age = p.age;
}

void Person ::output() {
    cout << "\nName = " << name;
    cout << "\nAge = " << age << endl;
    cout <<"-------------------------------------------------------------------------------------------------------------------------\n";
}

int main () {
    Person p1;
    Person p2("Name");
    Person p3 ("Name", 20);
    Person p4 = p2;

    cout << "\nThe Output of the Object Called by Default Constructor\n\n";
    p1.output();
    cout << "\nThe Output of the Object Called by Parameterised Constructor with Default Argument\n\n";
    p2.output();
    cout << "\nThe Output of the Object Called by Parameterised Constructor Overriding Default Argument \n\n";
    p3.output();
    cout << "\nThe Output of the Object Called by Copy Constructor (Copying p2 Object that is the second output)\n\n";
    p4.output();
    return 0;
}

尝试从内部div中删除它。还可以在html对象中绘制边框,以查看谁在推动边框