Can a child text box grow with parent rectangle in SSRS - ssrs-2008

I have a rectangle with 2 subreports in it. I am trying to have a "header" text box to the left of the two reports that grows with the rectangle so that the "header" stays centered with the content. Current Arrangement
Desired Arrangement

I'm not sure how you have constructed the table/rectangles but this should work...
There is almost certainly a better way of doing this but this does work...
First insert a table. Delete the last two columns so you only have a single column left.
Then Delete the header row, you'll have a single cell remaining.
Now go to the Row Groups at the bottom of the screen, click the drop down and choose, "Add Group" --> "Parent Group".
In the dialogue, type 1 in the Group by field (this is just a dummy value) and select "Add group header". Click OK.
Optionally, you can right-click the details group and delete it. Select Delete Group Only when prompted.
Now the left column is merged so you can put your header text in there and set Vertical Align to "Middle". Add you sub reports as required and it will always be centred. Sere's some examples with different sized sub reports.
and finally with the text rotated which if your header is short and be formatted in a large enough font, sometimes looks better.
I left the ugly border in place so you can see the positioning more clearly.

Create a table with two cells. Your header cell on the left and a blank cell on the right. Then create a second table with your data. Drag and drop it into the blank cell.
The grouping in the parent cell will apply to the child cell in the table. The parent table's dataset will override a different dataset in the child table (which I doubt will cause any concern for you).
To make it look right you will want to remove the outside borders of the child table.

Related

Table in word cut off the text at bottom of it?

I have problem with table cut off the text at the bottom of the table. I have tried all the solutions from checking warping, and other table properties, but nothing worked.
Usually the "Allow row to break across pages" would solve your issue but is probably obstructed by the splitted cells in column one. I'd merge the cells in column one to get equal number of cells in column one and uncheck the "Allow row to break across pages" options on the Table Properties Row Tab.
Copy/paste the text to another part of the document outside of the table.
Then select the text and set Paragraph --> Indents/Spacing --> Line Spacing: Single
Copy/paste back to the table.

Table View Group Header View

I want to create an effect similar to the Open Table application. I want the section header to stick to the top as I scroll the table. This is of course the default behavior with a plain table view, but because of style, I want a group table view.
Any ideas or suggestions?
One way to do it (I'd wager OpenTable does it this way) is to use a plain table style but dress the cells yourself as grouped. You'd need 3 background images for the cells, one for the first cell in a section (with rounded upper corners), one for the last row in a section (with rounded lower corners), and one for the others that looks like grouped cells (with left and right insets).

How to write formula to grow all dynamic text field in crystal report

Hi Experts,
Is there any way to automatically grow the content of dynamic text
field in crystal report. I will give you an example this way.
I have values to display in crystal report as (which we fetch dynamically fromt the database)
Employee_ID, Employee_name, Employee_address
Now, the Employee_ID, Employee_name would be ok. But for
Employee_address the value can be anything from the database, i.e. it
can be lengthy also(like with 80 charectors also). That is it will come in next row and
overlap the below the row column ('address') value.
Now, is there any way(or formula), when one dynamic text field grows
like address, then previous two Employee_ID and Employee_address
should grow automatically and for next row the data should not overlap
also.
Please give ideas.
Thanks in advance.
If you mark the three fields can grow, then each field will expand (vertically) as necessary to accommodate the data. If the field does NOT need to expand, it won't. Moreover, if the three fields are arranged side-by-side in the same details section, there will be no overlap--either horizontally or vertically.
If you are trying to always bottom-align the three fields, regards of the vertical size of any of the fields (the address field in your example seems to be the issue), then you have a different problem:
Relative Positions
This option allows you to lock the relative position of a report object next to a grid object within a section. For example, if you place a text object one centimeter to the right of a cross-tab object, during report generation the program will push the text object to the right, so that the one centimeter space is maintained regardless of the width of the cross-tab object.
Note:
Only horizontal locking is possible. If you need to preserve relative vertical positioning, you should create a new report section.
Once Relative Positions is selected for a section, you can no longer drag objects to new positions within that section. To change an object's position, use the Object Size and Position dialog box.
Relative positioning applies only to objects placed to the right of grid objects (that is, objects that can grow horizontally).

Y position while composing a PdfPTable

I'm building a pdfptable thru ItextSharp, but I need to know, while I'm adding cells, my Y position in the page. Cells have a variable height.
I need to know it to avoid tu put a new 'Breaking title' in the table if this would go on the last table row, as it should go on a new page (on cust request).
I tried writer.getverticalPosition() but it seems not reliable in composing a table.
Is there a way to know it ?
There's a contradiction in your question. Let me explain what doesn't make sense.
You create a PdfPTable, let say you have an object named table. when you add cells to table, the object grows. Plenty of data is stored into memory.
Now you say: I want to know the Y position of the rows on the page while I'm adding cells.
Which page? There may not even be a page? As long as you build the table object, there is no page, there are no Y positions. One table could be 200pt heigh when added to a page with a width of 400pt. The same table could be 400pt heigh when added to a page with a width of 200pt. It isn't until you add the table object to a Document that the table gets its shape.
If you want to make sure a "title" isn't the last row on a page, you should break up your table in smaller parts. Create a subtable and add it to the document. Now use getVerticalPosition() and check how much space is left. If there isn't sufficient space for the first X rows of the next subtable, move to a newPage() and add the next table there, otherwise add the table on the current page.
If you define the widths correctly, nobody will see that you've been adding more than one table: it will look as if you added one large table instead of different small ones. If you don't know how to calculate the height of the rows in the subtables, please note that you need to define the total width of the table and lock the widths. For the reason explaiined above, no software can calculate the height of a table if it doesn't have any info about its width.

Merging Cells Vertically in SQL Reporting 2008

In SQL Reporting 2008, Is there a way to merge multiple cells that are adjacent to each other along a vertical column?
In the report designer, click on your table, then at the bottom of the screen there is a window spit in two with the headings "Row Groups" and "Column Groups". In row groups, click on the little down arrow next to the default group "table1_Details_Group" and choose to add a parent group. Select the field you want to group on, and don't check the boxes to add a row header or footer. A new column will be added and when you preview you will see that the cells of this column are merged vertically.
You cannot merge cells vertically, only horizontally.
You can, however, create table groups. Grouped data inside a table can be designed to look like merged vertical cells.
EDIT
INFORMATION ON MATRIX CONTROL
You may use matrix table to do it. It force you to have a group column, however you can just set the group column visibility as Hidden. Then add new columns you needed.
see image here: ( my Month is merge cells from two rows)
http://i.stack.imgur.com/WA2ZL.png