官术网_书友最值得收藏!

Report items

To design the layout of a report in Visual Studio you can use the toolbox, in which you will find all the controls you can use on your report. It's with this toolbox, by clicking on a control and dropping (or by drag and drop or drag and draw), that you can add to the report. You can also right-click on the layout (the body, header, or footer) and insert a control.

Note

There are multiple ways of achieving the same goal. In this book, I will use and demonstrate the steps I apply on a daily basis in real life. Keep in mind that there might be different ways to do the same thing, but I will not document all of them.

The controls in the toolbox can be divided into report items and data regions. Report items represent information, which might come from the dataset. Examples of these types of report items are lines and rectangles. Images and textboxes are independent report items that can be connected to a field from the dataset, but it's not mandatory.

Static report items are items on a report that are not connected to a dataset. A textbox, for example, represents a text constant for labels or comments in a report. The static report items are as follows:

  • Pointer
  • Textbox
  • Line
  • Rectangle
  • Image

When you drag a field from the dataset in the report body, the system will create a textbox that references the field from the dataset. But, when you run the report, the textbox will not be repeated for every record in the dataset.

Data regions are areas in a report that contain data from the dataset that is repeated, in the form of multiple records. The data regions are:

  • List
  • Table
  • Matrix
  • Chart

So, if you want to display multiple records from the dataset, you need to select one of these data regions from the toolbox, add it to the report body and then fill it with fields from the dataset. Only then, with a data region, will the records be repeated.

主站蜘蛛池模板: 永嘉县| 奈曼旗| 马山县| 江城| 天峻县| 酒泉市| 古丈县| 甘孜县| 九台市| 什邡市| 聂荣县| 涞水县| 秭归县| 东海县| 苏尼特左旗| 双流县| 抚州市| 大同市| 龙门县| 上杭县| 宽甸| 茶陵县| 鸡泽县| 晋中市| 桦南县| 剑阁县| 隆林| 荆门市| 塘沽区| 磐安县| 云安县| 三河市| 瑞昌市| 花莲县| 如皋市| 仲巴县| 宜州市| 阜平县| 渑池县| 司法| 九江县|