Does SSRS 2008 support Page breaks/Page Names? - reporting-services

I made a report using Visual Studio Report Builder and had two datasets for two tables and had them exported on two Worksheets when exporting to Excel, with the help of Page breaks and Page names.
On Visual Studio, the report runs perfectly. But when uploading it to the SSRS Report Server, I get an error message:
The report definition is not valid. Details: The element 'Tablix' in
namespace
'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition'
has invalid child element 'PageName' in namespace
'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition'.
List of possible elements expected: 'TablixCorner, TablixBody,
TablixColumnHierarchy, TablixRowHierarchy, LayoutDirection,
GroupsBeforeRowHeaders, RepeatColumnHeaders, RepeatRowHeaders,
FixedColumnHeaders, FixedRowHeaders, Style, SortExpressions,
ActionInfo, Top, Left, Height, Width, ZIndex, Visibility, ToolTip,
DocumentMapLabel, Bookmark, RepeatWith, CustomProperties, PageBreak,
KeepTogether, NoRowsMessage, DataSetName, Filters, DataElementName,
OmitBorderOnPageBreak, DataElementOutput' in namespace
'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition'
as well as any element in namespace '##other'.
(rsInvalidReportDefinition)
I'm using Visual Studio 2015. My SSRS version is 2008.
I usually have to use a hack to convert my 2015 generated report to make it compatable with my 2008 version SSRS by editing the .rdl file in notepad.
Is there a hack to allow pagebreaks in a report on SSRS 2008?

Your error message tells you everything you need to know:
invalid child element 'PageName'
List of possible elements expected: 'TablixCorner, TablixBody, TablixColumnHierarchy, TablixRowHierarchy, LayoutDirection, GroupsBeforeRowHeaders, RepeatColumnHeaders, RepeatRowHeaders, FixedColumnHeaders, FixedRowHeaders, Style, SortExpressions, ActionInfo, Top, Left, Height, Width, ZIndex, Visibility, ToolTip, DocumentMapLabel, Bookmark, RepeatWith, CustomProperties, PageBreak, KeepTogether, NoRowsMessage, DataSetName, Filters, DataElementName, OmitBorderOnPageBreak, DataElementOutput'
SSRS 2008 support page breaks, it just doesn't support page names. Either get rid of the names and carry on with your hack method of ensuring compatibility, or simply set Visual Studio to target SSRS 2008 and you should be fine.

Related

How to display text/image in a report depending on buildoption?

I would like to display a text or an image on my reports depending on buildoption, ie debug/release so my users are never confused about what environment they are in.
I work in visual studio 2013. Is it possible to use app.config or something similiar for reports?
Ok, worked this one out for myself, sort of.
I added a background image and used expression (Globals!ReportFolder) if I should display it or not.
Expression was: =IIF((Globals!ReportFolder = "/Test"), "TestBackground", "")
Thanks to Sébastien Sevrin for pointing out that reports arent built and I need to look into deploysettings.

Hyperlink not working in RDLC Report text Box Property's Action :Go to URL

I have Visual Studio 2013 with update 4.And I am trying to get URL for particular Text Box in the Browser.It is very easy to set up hyperlink for text box in RDLC report.It is the Microsoft post as below.
https://msdn.microsoft.com/en-us/library/ms157159.aspx
I applied 6 steps as mentioned in above link,but Still i can't get hyperlink in RDLC report for particular Text Box.I also added EnableHyperlinks="true" in aspx and aspx.cs page too.Thanks in advance.
Try as below in aspx.cs, it works for me
ReportViewer1.LocalReport.EnableHyperlinks = True;
If it doesn't work, varify it doesn't create relative path issues. Try using System.AppDomain.CurrentDomain.BaseDirectory to create the absolute URL to required URL.
Even if it does not work, please share any error you are getting in report.

Cannot turn Off Report Pagination on Reporting Services 2008

I have a report services project that I'm rending on Mobile. The display is perfect, except that reporting services 2008 paginates the report into two separate tables for reports with many rows. I'd like to turn this off. According to research I have done, you need to set the report's InteractiveHeight to 0 to disable paging. However, there is no such element in the RDL's xml format. Is there somewhere else that this can be done, or is there something I am missing?
You can do this in the Designer:
This element will only be present if there are non-default values for InteractiveSize:
<Page>
<InteractiveHeight>0in</InteractiveHeight>
<InteractiveWidth>8.5in</InteractiveWidth>
<LeftMargin>1in</LeftMargin>
<RightMargin>1in</RightMargin>
<TopMargin>1in</TopMargin>
<BottomMargin>1in</BottomMargin>
<Style />
</Page>
If you haven't changed these values from default, they won't be in the XML:
<Page>
<LeftMargin>1in</LeftMargin>
<RightMargin>1in</RightMargin>
<TopMargin>1in</TopMargin>
<BottomMargin>1in</BottomMargin>
<Style />
</Page>
So you can add this through the Designer, or update the RDL. However, the element won't be present in all cases, as above, so you'll need to add it if its not present.
Report height could be set from designer view (valid for VS 2010). Follow below steps:
Open properties window of visual studio
Select "Report" from drop down
Expand option "Interactive Size"
Set Height Option to "0in"
Image explaining steps to follow
For newer versions of SSRS, I went to Report->"Report Properties", and set the Height to 20 inches.

Footer not hiding when export to MS Word

I only want to display the footer (which has some texts) in the first page of my SSRS report. So I code the following in Expression to hide:
=IIF(Globals!PageNumber = 1, false, true)
However, when I export to MS Word via SSRS, I get the footer in every single page (it works perfectly fine in PDF).
This seems to be a known problem according to:
http://msdn.microsoft.com/en-us/library/dd283105(v=sql.105).aspx#ReportHeadersFooters
And the document provided a workaround using "Expression with Text Runs".
I have been trying to figure out what that means and how to apply that but have been struggling for a while.
Does anyone know a work-around for this problem?
Thanks!
This answer is pretty late in coming to this user, but for any others fighting with this, please see the msdn SQL Server export to Word write-up here:
http://msdn.microsoft.com/en-us/library/cc627455(v=SQL.100).aspx
In a nutshell, toggling states anywhere in the report is not supported. Whatever the state of the report item is on the first page is what it'll be throughout the exported report. With that in mind, it appears that PDF will be a better format to support with your customers.

Is it possible to export to CSV and have the header contain spaces?

I have a requirement for an SSRS 2005 report to be exported as a CSV, where the column headers contain spaces.
Currently the CSV header column titles are derived from the textBox property names and uses underscores instead of spaces. Is there another, better approach?
For example, currently I have:
SSRS Report Header : Effective Date
TextBox Name : Effective_Date
CSV Header: Effective_Date
I would like to have:
SSRS Report Header : Effective Date
TextBox Name : Effective_Date
CSV Header: Effective Date
Looks like its not possible, with a bit more digging I found the following Stack Overflow post:
SSRS csv export with comma in the column header names
I have solved this problem myself by customizing the built in CSV rendering extension to make it use the textbox's ToolTip property as the column header. The ToolTip property will allow spaces and other punctuation so gives you the flexibility to name the columns as you like. This also has the nice side effect of giving you a relevant tool tip, reminding you of what column you're looking at on a long report where the header might not be visible!
Note: In the designer, you set the ToolTip of the data row's textbox and not the header's textbox.
This isn't easily achieved because all the rendering extensions are marked as sealed classes. So to implement this, I used a decompiler and extracted all the code relating to CSV rendering into my own project. Then changed the line that writes the header text to read from the textbox's ToolTip property instead.
In the class named CsvColumnHeaderHandler you're looking for the method OnTextBoxBegin and in particular the line:
this.m_visitor.WriteValue(textBox.DataElementName, this.m_excelMode);
Simply change this to read:
this.m_visitor.WriteValue(textBox.ToolTip, this.m_excelMode);
This custom rendering extension can then be deployed to the report server and it works perfectly.
You wont need to know how to write a rendering extension for this because, as I said, I just copied (decompiled) the code. However, you will need to know how to deploy a custom rendering extension assembly. More information on deploying can be found here: https://msdn.microsoft.com/en-us/library/ms154516.aspx
There is a solution for this. You need to select in SSRS properties press F4,
select Properties, in that select particular textbox which you want to rename.
For example, let Textbox12 as a Effective_Date. Solution: Rename the Textbox with EffectiveDate.