如何将多个单元连接在一起?

时间:2018-04-03 09:38:31

标签: sql-server visual-studio ssms

我正在使用Microsoft SQL Server Management Studio 2012和Microsoft Visual Studio,语言asp,我想知道如何在一个中连接多个单元格(下面的说明图片),因此它将与五个单元格具有相同的高度前面的细胞。

<%
        dim intAux, dblWidth, strContador, intContador

        dblWidth = 85/(.fields.count-2)
        intContador = 1

        for intAux=0 to .fields.count-1
            if intAux = 0 then
                strLista = "<tr class=""ColumnTitleScroll""><td class=""ColumnTitleScrollTD"" colspan=""2"" rowspan=""2"" align=""center"" style=""width:15%"">&nbsp;</td>"
            end if
            if intAux>=2 then
                if intAux = 2 then
                    strLista = strLista & "<td class=""ColumnTitleScrollTD"" %123% align=""center"" >" & split(.fields(intAux).name, "-")(0) & "</td>"
                    intContador = intContador+1
                elseif strContador = split(.fields(intAux).name, "-")(0) then
                    intContador = intContador+1
                else
                    strLista = Replace(strLista, "%123%", "Colspan=""" & intContador -1 & """")
                    response.Write strLista
                    strLista = "<td class=""ColumnTitleScrollTD"" %123% align=""center"" >" & split(.fields(intAux).name, "-")(0) & "</td>"
                    intContador = 2
                end if
                strContador = split(.fields(intAux).name, "-")(0)
            end if  

            if intAux = .fields.count-1 then
                strLista =strLista & "</tr>"
            end if
        next
        strLista = Replace(strLista, "%123%", "Colspan=""" & intContador - 1 & """")

        response.Write strLista
        strLista=""

        for intAux=0 to .fields.count-1
            if intAux = 0 then
                strLista = strLista & "<tr class=""ColumnTitleScroll"">"
            end if
            if intAux>=2 then
                strLista = strLista & "<td class=""ColumnTitleScrollTD"" align=""center""style=""width:" & round(dblWidth, 0) & "%"">" & fGetMes(split(.fields(intAux).name, "-")(1)) & "</td>"
            end if
            if intAux = .fields.count-1 then
                strLista =strLista & "</tr>"
            end if
        next
        response.write strLista
        strClass = " class=""TableRowWhite"""
        dim PercentagemEfectuado, strClick, strClickEnt, strClickOper, strClickFact
        do until .EOF
            intCount = intCount + 1

            if intCount mod 2 = 0 Then 
                strClass = " class=""TableRowWhite"" "
            else 
                strClass = " class=""TableRowGrey"" "
            end if
            strLista = "<TR " & strOnMouseOver & ">" 
            strLista = strLista & " <TD align=""center"" >" & .fields("SLA").value & "</TD>" & vbnewline         
            strLista = strLista & " <TD align=""center"">" & .fields("Abreviatura").value & "</TD>" & vbnewline

            for intAux=2 to .fields.count-1
                    strLista = strLista & "<td align=""center"" " & strClass & ">" & .fields(intAux).value & "</td>"
            next
            strLista = strLista & " </TR>" & vbnewline
            .movenext
            response.write strLista
        Loop
    %>

Table 希望你们能帮助我,提前谢谢。

0 个答案:

没有答案