How to center the report title in RDLC file - visual-studio-2010

I am trying to center the report title placed within report header on RDLC matrix report - this should have been quite straight-forward but I am struggling to achieve it.
I am using VS 2010 (SP1) report designer to edit the RDLC. The report is quite simple - it contains report header with two text-boxes and body containing matrix (cross-tab) report. Out of two Report Header text-boxes, one is used for display static report title while other is used to display the single report parameter.
The report content is as I want except I am unable to center the report title. The title get centered within the text-box width but I could not find a way to say that text-box should spawn entire page width. I cannot set text-box width to the page width because
if text-box width is set more than matrix width by say x inches then when report is rendered, content width gets enlarged by x inches from a rendered matrix resulting in page-width overlap.
it will need re-setting the text-box width if margins or page-size is changed

And a year and a half later... I used your solution but then found another one:
Clicking on the empty area of the report there is a property called ConsumeContainerWhitespace. It indicates wether white space to the right and below a matrix (or any content that can be resized) should be preserved. Might have other side effects though.
When the report gets wider than the page it looks like this in the viewer:
This will be printed on two pages and on each one the title will be centered.

Alas! got some time to play with RDLC - here's the work-around. Although, its not exactly what I want (a centered report title), its close enough!
Basic idea here is that matrix (cross-tab) report grows its width so you need to associate the report title with the matrix. So remove report header or page header and instead add one or more static row above the row-group in the matrix. Use these rows for Report tile and report parameters. By centering the report title text-box, you get some-what centered report title.

Related

In birt report table not properly fit into pdf size

enter image description here
how to fit the birt report table not properly fit into pdf size because it showing only few data
On Format
You are using the web viewer in your example. If you want a PDF, you need to press the arrow next to the viewer button and choose "View Report as PDF".
On Size
Most elements have a Properties tab that lets you select width and height relative to the parent element. If you set this to 100%, it will use the full width/height of the parent. However, if single elements have a minimum absolute width - like having lots of columns - the 100% may be forced to be ignored. Then you have to change the single elements first.
On Orientation
You might have a fixed set of columns, but it still does not fit the report result. Changing the orientation to landscape can help here - this is especially useful for wide tables. Orientation can be changed in the Master Page tab under Properties -> General -> Orientation.

How to add patterns or stripes to SSRS data cells instead of a color

IN SSRS:
I can only add Solid color fills to the data cells inside a matrix.
How do I add Stripes or Patterns as background fill instead of a solid color.
Is there a particular color code like '#xxxx' for stripes?
There are certain rows in my report that need to have stripes or patterns as backgrou fill.
Thanks
I have found some methods around this:
1- You can use image gradients to fill text boxes by right-clicking the cell and selecting text box properties. You can use the Fill tab to select a small image or item that has a gradient or pattern and apply it within your cell(s)/report.
2 - Another approach is to use a combination of Font/Color/Bold/Italic/Underline and Boarder colors/weight to achieve your desired result.
3 - Apply a gradient-style scheme to your report by using one or more colors and dynamically changing the hue as you go up or down the report. That way, the top could be darker than the bottom, or vis-versa.
I hope this helps.
Numerous fonts can be used.
Open the Character Map
Select Arial in the Font drop down
Scroll to near the bottom, select the cross character
Hit the Select button a number of times, grab as many characters as the SSRS textbox may require to fill its width
Click copy
In SSRS select the textbox then Ctrl-P to paste
Experiment with font size and font color to get the desired effect
Setting padding to zero may help
Setting row CanGrow to False may help
I find there is a little gap between cells vertically but it is close to perfect for me. There is likely to be a character in Arial or another font that works even better.

How to resize image if the image is bigger than Textbox.But it not increase scale if smaller

I created RDLC report layouts by using Visual Studio Report Designer.
I need to display image on textbox.
The image was set center align by Chris Hays 's method.
But This method must set sizing to be "Clip"
So It has a problem because when Image which it was getting from database is bigger than textbox. It would clipped like below.
I tried to use sizing with "Fit Proportional" Mode. It can't set centered image by Chris Hays 's method.
But if I use sizing with "Fit to size". I can ignore centered image. But if some image is very small. It will lose quality.
What should I do if I need to
1.Centered image
2.Fit to textbox if image is bigger than textbox.
3.Original size if image is smaller that textbox.
I can resolved this problem by created two image control.
First image control -It was set sizing "Fit"
Second image control- It was set sizing "Clip" and used Chris Hays 's method for centered image.
Both two image controls was set Visibility property by expression
if a width of image is bigger than textbox , First image control will show and second will hide.
if a width of image is smaller than textbox , First image control will hide and second will show.
I can get a width of image by this code
=(System.Drawing.Image.FromStream(new System.IO.MemoryStream(CType(First(Fields!FILE_BINARY_DATA.Value, "My Table"),Byte()))).Width /96)
96 is dpi
After I known a width of image from above expression.
I will use it for set Visibility Property of First Image like these
=iif((imgWidthInch.Value > 2.6 ),false,true)
2.6 is widht of my textbox.
And Set Visibility of Second Image by the other hand.
If you're using the same sizes of the tutorial you could try and set the Sizing property by using the following expression:
=IIF(Round((3.5-System.Drawing.Image.FromStream(new System.IO.MemoryStream(CType(Fields!LargePhoto.Value,Byte()))).Width
/96)/2,2)>0, "Clip", "Fit")

Table, rectangle placed on top of an image is not coming properly in preview mode in SSRS

I wanted to draw a rectangle with rounded corners in SSRS. But, after lot of research i got to know that currently there is no property for that. So, i am trying to use an image of a rectangle with rounded corners and on top of that trying to align the table and other controls within the image. But, when i am previewing it or exporting it to a PDF file, first the image is getting displayed, then below that all other controls comes. Am i doing anything wrong. Please let me know.
Why don't you try to enclose your image rectangle and other controls etc. within an SSRS Rectangle with BorderStyle = None...
Try following:
Create an image (the rectangle with rounded corners) in your favourite image drawing program. I did mine in Microsoft Paint
and save it as JPEG.
In SSRS report design, in Report Data pane, right click on Images >> Add Image and point to the image that you created in Step 1. (Untitled, in my case see the fig. below)
In SSRS report design, add a Rectangle from the Toolbox to the design surface and in the Properties Pane:
a) look for the BackgroundImage property Click its + sign. then
b) Enter values for Source as Embedded, BackgroundRepeat as Clip and the Value property , when you click the dropdown for its values, should show you the name of the image that you embedded in Step-2, select this name
Resize your rectangle to fit the shape and add your items to this rectangle.
EDIT:
Regarding the question in the Comment, I don't think that the size of the image rectangle can be increased dynamically. If that's the case then you may need to find some other work-around
HTH

SSRS report produces blank/white spaces when column are hidden in tablix

I have report developed in SSRS 2005. It is a simple and straight-forward report using a stored procedure to fetch the data and display. This report has 100 columns and there are no grouping or subreports etc.
But user has option to select/deselect the column names to show/hide on the report. When the user select to hide couple of columns report is giving me blank/white gaps when exported to pdf or any other formats.
Is there any solution to this?
You need to ensure that you are hiding the row or the column of the table and not simply the fields. Check HarlingtonTheWizard's post at the following link:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=109566
Once the rows/columns are hidden, the height/width will collapse.
I do not consider this as the best solution but is more of a hack but this is what I did in my situation.
1)Place a white rectangle in the desired cell. Make sure that the rectangle is white and has no borders.
2)Place the textbox inside the rectangle. Set an expression to hide and show this textbox.
3)Repeat for each cell in that column.
Therefore, when the textbox is shown it will look as normal. When the the textbox is hidden, the white rectangle will work as a "placeholder" to occupy the cell.
You can try setting Report property containerwhitespace="True".

Resources