简体   繁体   English

SSRS报表生成器设计布局问题

[英]SSRS Report Builder Design Layout Issues

I can't seem to figure out why the design aspect of Report Builder/Report Designer is so messed up. 我似乎无法弄清楚为什么Report Builder / Report Designer的设计方面如此混乱。 Either I don't understand why it is doing this (most likely) or this is just the way it is. 我要么不明白为什么这样做(最有可能),要么就是这样。

Every Element I add to my report seems to not show up, align or look correct in the actual preview. 我添加到报告中的每个元素在实际预览中似乎都没有显示,对齐或看起来正确。 If I add a line that snaps to another line which looks correct in design, looks totally incorrect in the final version. 如果我添加一条线对齐到另一条在设计上看起来正确的行,则在最终版本中看起来完全不正确。 This is just one example of many, see below for images showing this behavior. 这只是许多示例中的一个,有关显示此行为的图像,请参见下文。

If I have a field (text box) tied to a data set and I position it in a certain area, it creates weird white space, is centered wrong or worse, when re-positioning the aforementioned line element, it seems to move other nearby elements in some erratic way. 如果我有一个与数据集绑定的字段(文本框),并将其放置在某个区域中,则会产生奇怪的空白,居中错误或更糟,重新放置上述线元素时,它似乎会在附近移动其他位置某些不稳定的元素。 In the obfuscated example, the carrier fields are all basically stacked on top of each other, while in the preview they are spaced properly, but further down in the document if I do the same thing it ends up looking drastically different. 在混淆的示例中,载体字段基本上都彼此堆叠,而在预览中它们之间的间距适当,但是如果我做同样的事情,它在文档中的位置会更差。

Is this a bug? 这是错误吗? Is this how RDL and Report Designer work? 这是RDL和报表设计器的工作方式吗? Is there some trick to element positioning? 元素定位有技巧吗? Is it relative to other elements, based off of foreground vs back ground elements? 它是否相对于其他元素(基于前景元素还是背景元素)? Does copying a text box to create more text boxes affect them in some way vs. creating a new element each time? 与每次创建一个新元素相比,复制一个文本框来创建更多文本框会在某种程度上影响它们吗? I can't figure it out and do not know what to search for to find the answer to this. 我无法弄清楚,也不知道要寻找什么才能找到答案。

This seems to be a "quirk" of how Report Designer works and I just haven't found the secret to it yet. 这似乎是报表设计器工作方式的一个“怪癖”,我只是还没有发现它的秘密。 If there is some exact positioning dialog available, I would prefer to use it instead of my mouse and these issues as I have a down-to-the-MM spec document for how this should be designed, but I cannot figure it out. 如果有一些精确的定位对话框可用,我宁愿使用它代替鼠标,也不要使用这些问题,因为我有一个有关如何设计的通用的MM规范文档,但我无法弄清楚。

I am using Report Builder 14 for SQL Server 2016. It is a one page form (an ASN label) held within a table and all elements are within a rectangle element. 我正在使用用于SQL Server 2016的报表生成器14。它是一个表格形式(一个ASN标签)保存在一个表中,所有元素都在一个矩形元素内。

Is there an online resource or Report Designer guru who can point me in the right direction when it comes to this? 是否有在线资源或Report Designer专家可以为我指出正确的方向?

Example of the vertical line element looking incorrect in Preview/Final 垂直线元素在“预览/最终”中看起来不正确的示例

Example of the vertical line element looking correct in Design View 垂直线元素在设计视图中看起来正确的示例

EDIT: Like HOW does this even make sense? 编辑:像这样怎么讲得通?

SSRS renders so that the elements do not overlapp. SSRS进行渲染,以使元素不会重叠。 In addition every element get enough space, vertical and horizontal. 此外,每个元素都会获得足够的垂直和水平空间。 Basically you cant control this but there is a workaround. 基本上您无法控制它,但是有一种解决方法。

If you put a rectangle in your report and place textboxes in that rectangle, they get rendered like you placed them. 如果您在报表中放置一个矩形,然后在该矩形中放置文本框,则它们的呈现方式与您放置它们时一样。 This also works in a tablix cell. 这也适用于tablix单元。

Another solution for your problem would be to display everything in one tablix cell. 解决您问题的另一种方法是将所有内容显示在一个tablix单元中。 Your expression would be looking like this: 您的表情将如下所示:

="Ship to: " & Fields!Adress.Value & ". Postal Code: " & Fields!PostalCode.Value

You even can add line breaks and tabs into that expression. 您甚至可以在该表达式中添加换行符和制表符。

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

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