scalablelist index outside the allowed range - sql-server

While previewing and trying to export a report to PDF in Visual Studio 2010, gives the following error :
an error occured during local report processing
an error occured during rendering of the report
ScalableList: Index 8 outside the allowed range[0::7]
When i generate a report for a lesser duration it seems to work. The only solution I could find on the internet is removing HideDuplicates and installing hotfixes which doesnt work. Can somebody please give me more information about HideDuplicates and what exactly to do?
Is there any other solution to this?

Scenario:
SSRS Tablix with grouping and page breaks contains hidden column. While preview worked fine, export to PDF caused that error. The index points, in my case, to the first column which causes error. Once I made column visible, error message pointed index to the next hidden column.
Solution:
While installing hotfix was not an option, I removed hide option from the COLUMN properties, and applied it to an each individual tablix CELL property for header and detail row.
Not miraculously for Microsoft it worked for me. Long live Microsoft...

In my case, simply removing additional formatting that I had put in for branding(the company logo etc.) did the job. I am not sure of why this happened but this is a solution I came to through trial and error. Also try not to leave any blank space at the top of the report that is to be exported - i.e keep it edge to edge with the page boundary.

In my case I didn't have any "Hide Duplicates". Visual Studio 2015 SSRS report.
I went through my hidden columns and one of the columns that wasn't even on the end was triggering this area when it was set to "Hide" and not "Show" in TextBox properties. So I set it to "Show" and just shrank the column down to almost nothing. Also set the border to none and report worked and was visibly good.

Related

SQL Report Builder 3.0 - Failed to preview report

I have looked but have not been able to find another posted question that matches my scenario.
I am replicating a report from an old DB and rebuilding it using a new DB, so I'm simply copying the old report elements and pasting them into a new report template and modifying as needed. I've gotten to one part where the error I'm getting is as follows:
The Color expression for the text box ‘Textbox94’ refers to the field
‘Gallon_Qty’. Report item expressions can only refer to fields within
the current dataset scope or, if inside an aggregate, the specified
dataset scope. Letters in the names of fields must use the correct
case.
I have looked everywhere I could possibly think to look to see where this issue is hiding, but cannot find where this textbox is 'referring' to anything. Since it appears to be specific to this textbox, I presume it is specific to the text box properties of that text box, but it seems I'm mistaken. For added clarity, what I have checked includes every menu option within the text box properties (General, Number, Alignment, Font, Border, etc.) and every fx (function) button to ensure nothing was hiding (that's gotten me before). I have compared with another report element that works similarly and cannot find where the problem is. Any tips on where else I might check to uncover the root of this issue? Happy to provide screenshots if it will help, just let me know.
Side note: I can't thank you guys enough for all the help I've gotten on here!
I discovered where the issue was.
Text Box Properties>Font>Color>fx box
This is where the value was hiding. Hope this helps someone else.

adding checkbox to ssrs tablix that will be manually clicked

I have created a stock taking report in SSRS 2008. I have also added an extra column in the tablix.
The extra column I added is a column I want to have the option to manually click on the checkbox if item is in stock.
I have tried using the wingdings option using the below expression:
=iif(Fields!Expr1.Value,chr(252),chr(251))
However the result I get is not the desired result, because I get about 6 winging characters back instead of the check and uncheck boxes I required
How could I go about fixing this ?
One option is to use an Indicator, but I've preferred to use images for similar situations. Embed the two needed images in the report and switch between those dynamically. (You can make standard images of your characters in MS Paint or Paint.NET.)
Images have the disadvantage that they don't print with high resolution, but they do render on most devices (not .csv) and you don't need to worry about installed fonts on the server.
As far as fixing your immediate problem, try changing the "Markup Type" for your placeholder (Placeholder Properties -> General -> Markup type.) It sounds like something is trying to generate HTML when it shouldn't be.

Opening RDLC Layout in Visual Studio shows <<expr>> instead of value

When I open a report from Dynamics NAV 2013 in Visual Web Developer 2010, every text box shows a field that looks like
<<Expr>>
Where << and >> are the french Guillemet characters. I find this rather difficult because I have to analyze the properties of each text box, if I am looking for a particular field.
For example in this picture, how do I know which field is the Customer Name, Phone Number or VAT Registration No?
Is there any way to configure Visual Web Developer to expand the Expression like it was in Visual Studio 2008 with NAV 6.0?
Preferably I would like to either see a label instead of the generic Expr or just the old Fields!Some_random_field.Value like it was in Visual Studio 2008.
Ah, another feature of NAV & RDLC :)
You'll find that the Expr text appears when an expression reaches a certain "complexity" -- e.g. from just a field;
=Fields!TotalText.Value
to
=(Fields!TotalText.Value)
The fields in the header are usually always Expr as the values are passed using GetData and SetData (and remain that way from NAV 2009 reports). While this limitation was somewhat removed in NAV 2013, you can only put static values in the header -- they won't change across pages which is useless for multiple SO's or Customers for example.
There isn't a way to show it in the properties box, however the quickest way seems to be to select the field, Right Click, "Expression".
I'd suggest giving the textbox a name other than TextBox to make it easier to identify fields (e.g. "SalesHeaderNo");
So after a bit of research I have found another solution. There is a View Element called the Document Outline [Ctrl+Alt+T] which shows a tree like structure of the whole report. When ever you click on an item in your report, the corresponding item in the Document Outline is selected and vice versa. This is quite useful to keep a better overview over your report and to quickly navigate between the different items.
The only annoying thing is that it also shows empty text boxes, so in a sparsely populated table, you will have a lot of textbox123 items in the outline. It doesn't seem there is a way to filter these out.

Windows Forms - dataGridView column is behaving unexpected

I have a dataGridView with a few columns that I've arranged according to the order they must appear. However in Visual Studio 2010 in the design view I get this :
But when I start the project i debug mode I see this :
As yo can see the Delete column has moved. I don't know why. I tried different scenarios like editing the grid myself and moving the Delete column somewhere else but with no effect. I use a dummy class to get this empty row of data if this somehow has impact on the behavior of this column.
P.S
I tried to clean the solution and rebuild, but that didn't help either.

Tablix: Repeat header rows on each page not working - Report Builder 3.0

I have a tablix with lots of rows that span over multiple pages. I have set the Tablix property Repeat header rows on each page but this does not work. I read somewhere that this is a known bug in Report Builder 3.0. Is this true? If not, is there something else that needs to be done?
It depends on the tablix structure you are using. In a table, for example, you do not have column groups, so Reporting Services does not recognize which textboxes are the column headers and setting RepeatColumnHeaders property to True doesn't work.
Instead, you need to:
Open Advanced Mode in the Groupings pane. (Click the arrow to the right of the Column Groups and select Advanced Mode.)
In the Row Groups area (not Column Groups), click on a Static group, which highlights the corresponding textbox in the tablix. Click through each Static group until it highlights the leftmost column header. This is generally the first Static group listed.
In the Properties window, set the RepeatOnNewPage property to True.
Make sure that the KeepWithGroup property is set to After.
The KeepWithGroup property specifies which group to which the static member needs to stick. If set to After then the static member sticks with the group after it, or below it, acting as a group header. If set to Before, then the static member sticks with the group before, or above it, acting as a group footer. If set to None, Reporting Services decides where to put the static member.
Now when you view the report, the column headers repeat on each page of the tablix.
This video shows how to set it exactly as the answer described.
I have 2.0 and found the above to help; however, the selecting of a static did not highlight the cell for some reason.
I followed these steps:
Under column groups select the advanced and the statics will show up
Click on the static which shows up in the row groups
Set KeepWithGroup to After and RepeatOnNewPage to true
Now your column headers should repeat on each page.
How I fixed this issue was I manually changed the code behind (from the menu View/code).
The section below should have as many number of pairs <TablixMember> </TablixMember> as the number of rows are in the tablix. In my case I had more pairs <TablixMember> </TablixMember>than the number of rows in the tablix. Also if you go to "Advanced mode" (to the right of "Column Groups") the number of static lines behind the "Row groups" should be equal to the number of rows in the tablix. The way to make it equal is changing the code.
<TablixRowHierarchy>
<TablixMembers>
<TablixMember>
<KeepWithGroup>After</KeepWithGroup>
<RepeatOnNewPage>true</RepeatOnNewPage>
</TablixMember>
<TablixMember>
<Group Name="Detail" />
</TablixMember>
</TablixMembers>
</TablixRowHierarchy>
Open Advanced Mode in the Groupings pane. (Click the arrow to the right of the Column Groups and select Advanced Mode.)
In the Row Groups area (not Column Groups), click on a Static group, which highlights the corresponding textbox in the tablix.
Click through each Static group until it highlights the leftmost column header. This is generally the first Static group listed.
In the properties grid:
set KeepWithGroup to After
set RepeatOnNewPage to True for repeating headers
set FixedData to True for keeping headers visible
Another way to accomplish this if you still have that issue is by doing the following :
Clear all the Table header text leave it empty.
On the Reports “Header” section add textboxes inside a rectangle ,
each textbox will represent a column header for the table.
As this rectangle is on the Reports Header section it will display
on all report pages.
Thanks,
Sufian.
What worked for me was to create a new report from scratch.
This done and the new report working, I will compare the 2 .rdl files in Visual Studio. These are in XML format and I am hoping a quick WindDiff or something would reveal what the issue was.
An initial look shows there are 700 lines of code or a bit more difference between both files, with the larger of the 2 being the faulty file. A cursory look at the TablixHeader tags didn't reveal anything obvious.
But in my case it was a corrupted .rdl file. This was originally copied from a working report so in the process of removing what wasn't re-used, this could have corrupted it. However, other reports where this same process was done, the headers could repeat when the correct settings were made in Properties.
Hope this helps. If you've got a complex report, this isn't the quick fix but it works.
Perhaps comparing known good XML files to faulty ones on your end would make a good forum post. I'll be trying that on my end.

Resources