简体   繁体   English

如何在屏幕上居中放置CrystalReportViewer?

[英]How do I center a CrystalReportViewer on the screen?

All of the objects on the screen are centered with the exception of the CrystalReportViewer. 屏幕上的所有对象都居中,但CrystalReportViewer除外。

Does the CrystalReportViewer not work with CSS? CrystalReportViewer是否不能与CSS一起使用?

Here's my CSS class that I'm using for this part of the page: 这是我用于页面此部分的CSS类:

.reportForm {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    width: 70%;
    background-color: #efeeef;
    clear: both;
    padding-bottom: 35px;
}

The report is all the way to the left of the screen, I just want to center it. 该报告一直在屏幕的左侧,我只想居中。

Again, all other controls are centered on the screen. 同样,所有其他控件都位于屏幕中央。

The report is also embedded on a paragraph tag. 该报告也嵌入在段落标签中。

Here's the actual control: 这是实际的控件:

<form runat="server" class="reportForm">
<p>
<CR:CrystalReportViewer ID="crvSchedules" runat="server" AutoDataBind="True" DisplayStatusbar="False" EnableDatabaseLogonPrompt="False" EnableDrillDown="False" EnableParameterPrompt="False" EnableTheming="False" EnableToolTips="False" HasCrystalLogo="False" HasDrilldownTabs="False" HasDrillUpButton="False" HasGotoPageButton="False" HasPageNavigationButtons="False" HasSearchButton="False" HasToggleGroupTreeButton="False" HasToggleParameterPanelButton="False" HasZoomFactorList="False" Height="1153px" ToolPanelView="None" Width="868px" GroupTreeImagesFolderUrl="" ToolbarImagesFolderUrl="" ToolPanelWidth="200px" HasExportButton="False" HasPrintButton="False" />
</p>
</form>

This is the ENTIRE CSS file: 这是整个CSS文件:

.reportForm {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    width: 70%;
    background-color: #efeeef;
    clear: both;
    padding-bottom: 35px;
}

.site-title {
    color: #c8c8c8;
    font-family: Rockwell, Consolas, "Courier New", Courier, monospace;
    font-size: 2.3em;
}

input[type="submit"],
    input[type="button"],
    button {
        background-color: #d3dce0;
        border: 1px solid #787878;
        cursor: pointer;
        font-size: 0.8em;
        font-weight: 600;
        padding: 6px;
        margin-right: 8px;
        width: auto;
    }

我想不出什么问题是这个,所以我只是把报告中的一个表,并居中它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM