Showing posts with label cells. Show all posts
Showing posts with label cells. Show all posts

Thursday, March 8, 2012

"Index was out of range" when two cells are merged

I receive this error during rendering when I have two cells merged together:

Error Snippet

Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index

When I "Split Cells" on the offending cells, it starts to work. This report renders without error when run on the RS server. This error only occurs when running the report locally on the "Preview" tab in the report designer.

I have closed the IDE and deleted the *.data files and restarted with the same results. Is there anyway to get more information about the error to help debug the problem?

Thanks!

~Jon

I would try copying the report content from your current report to the clipboard, deleting all of the content, and then pasting it back. This should allow the text boxes and such to be rebuilt and may clear up the issue. Keep a copy of the original RDL and compare the new (hopefully working) to the old.

Larry

|||

I found something...

It appears that I cannot merge cells in the top row in the Table Header. I can have merged cells in rows below the top row. Anytime I merge the cells on the top header row I get this index out of range error. I have no idea why. I tried it with another report and it works fine. It is just this particular report. The report is pretty simple. It does call a couple of subreports that are in the header. The crazy thing is that it renders with no problem on the RS server.

For now I just added a row at the top that doesn't contain any merged cells so that I can Preview locally as I work on the report.

~Jon

Sunday, February 19, 2012

"#Value!" error for calculated cells

I have designed an AS 2000 cube with quite complex calculated cells, which work fine in cube browser or with MDX. The moment I use Excel 2007 Pivot table (both in default or compatibility mode), it shows #Value! instead of the calculations. I thought GetPivotData simply returned values from the cube and did not do any calculations of its own... I spent a lot of time to design the cube, but now it cannot be used from Excel, which it needs to be. Any help would be greatly appreciated.

Best regards.

Have you tried creating a copy of your cube, removing all the calculated cells and then connecting to it?

This might help isolate if it is just an Excel connectivity issue or an problem to do with the calculations. Unfortunately you cannot use profiler to trace AS 2000 like you can with AS 2005 otherwise we could trace the MDX that Excel is sending to the server.

|||

Thank you Darren,

It is definitely not an Excel connectivity issue, since everything else shows on the cube. It seems to fall over when it comes across calculated cells which are defined on the cube. And it does seem to be specific to Excel only. I remember the was an issue with pivot tables when the was a limitation on the cell definition MDX length, but it is unlikely to be that (I used the very minimun number of dimensions). Maybe there is known issue with the display of certain calculated cells in Excel ...

|||I think I managed to locat ethe actual problem area - those caclulated cells use a User Defined Function. When I remove the function, the "#Value!" message disappears . It is strange, because the function is not called by excel, it should be resolved on the cube where it works 100%...|||

The problem in fact looks similar to one described in

http://support.microsoft.com/kb/238306

But that was valid for much older versions of AS and was supposed to be fixed a while ago. (I am using up to date version of AS 2000).

|||


it should be resolved on the cube where it works 100%...

I am just wondering if this is not the case. AS2k used to do a fair bit of the query resolution on the client. If you run ProcessMonitor while Excel is trying to execute the query you might be able to see if it is trying to execute the UDF on the client (although it might be hard as ProcessMonitor catches a lot of information)|||Actually an easier way might be to try installing your UDF on a client machine and see if that fixes the problem.|||

I tried that and it di dnot work. One thing I noticed Excel looked in C:\Documents and Settings\f2978326\Application Data\Microsoft\Template for UserDefined.UDF file and UserDefined is the name of the library while UDF is the name of the class that calculations use ..... Does anyone actually have the information on how PivotTable service handles cells which reference UDFs from analysis server? So far I have not been able to get it anywhere...

Monday, February 13, 2012

'Real only' Cells in SQL Server Management Studio / VS 2005

I have been using both SQL Server Management Studio and the Server Explorer of Visual Studio 2005 to populate my database tables as I write my application. Basically, I right-click on a table name and select "Open Table' in SMS and select 'View Table Data' in VS 2005. From there I normally just edit data as needed.

Today, I open up a particular table and one column of my table is made read-only, meaning I cannot update that cell in any records and I cannot add any new records. I can tell this column is read-only because the data is faded and 'Cell is Read only' is visible in the status pane under the results when I mouse-over that column. These read-only columns seem to pop-up almost at random. At work the other day a similar thing happened to anther table I was trying to modify.

It just so happens that the read-only column is the Primary Key of this particular table, but even when I remove the Primary Key designation I cannot edit data in this column. In addition, I have other tables with Primary Keys and I have no trouble updating data in those table columns.

This most certainly has me pulling my hair out and have been searching online for two days now trying to find the cause of this. Any help would be appreciated.

IMHO editing data directly to the table using the SSMS or VS has always downside for having issues with data commit. You will be able to control the transaction commit or rollback is the biggest advantage in using TSQL instead. THe behaviour you are getting is opening up in VS is considered as a view where updates are not allowed, fyi http://msdn2.microsoft.com/en-us/library/ms172022(VS.80).aspx and may be look at the properties to see update speicification to set it to UPDATE.

|||Thanks for the reply. According to this http://msdn2.microsoft.com/en-us/library/sb0bay6k(VS.80).aspx I'm doing it exactly as they explain. At this point I just want to insert a farking row and I don't care how I do it. I've tried to write straight queries and can't even get that to work. I've written command line queries for 4 years now so I know how to write SQL, but I've been screwing with this application for 2 days now just trying to insert a row, its beyond ridiculous. I still cannot find a single resource online that explains to my why I have an entire column that is read-only.

Someone for the love of God just tell me how to insert a row using this steaming pile of BS called Micrrosoft SQL Server Management Studio (or VS 2005). I have a table that looks like this:

StatID int (Primary Key)
SeasonCode char(4)
PlayerID int
StatCode char(3)
StatValue float

and all I want to do is insert a record. Someone please tell me how the fark to insert a row into this table. I don't care what it takes. The column StatID has its Identify Specification column set to 'Yes'.
|||

I had the exact same problem and found out what was causing it in my case.

I started with 'Open Table' which I then wanted to filter so I opened criteria pane. This showed '*' in the columns selected - fine, that's what I expected.

I then selected a specific column to create a filter but didn't bother to unclick the 'display' column and that column became Read Only in the results set.

When I unclicked the 'display' option for the filtered column, and executed it again, the column was editable.

I haven't had time to play around with this but it looks to me that SSMS cannot handle editing on a column that is displayed twice.

Don't ever remember having that problem in EM.

|||

When I unclicked the 'display' option for the filtered column

I meant the 'Output' option

Saturday, February 11, 2012

#Error displays

All,
I am getting an #Error message displaying in certain cells of a Matrix --
what causes this'
Thanks,
JimThe issue was that my MDX query was returning a string, once I wrapped the
expression in a cdbl() -- all worked,
"Jim_OLAP" wrote:
> All,
> I am getting an #Error message displaying in certain cells of a Matrix --
> what causes this'
> Thanks,
> Jim
>

Thursday, February 9, 2012

#DELETED displayed in all cells

I have a SQL 2000 database and I'm using Access 2003 to gain access to the
tables. All cells contain #Deleted.
What am I doing wrong?
TIA
Jon
Jon Paskett wrote:
> I have a SQL 2000 database and I'm using Access 2003 to gain access to the
> tables. All cells contain #Deleted.
> What am I doing wrong?
> TIA
> Jon
>
Does it show fine when you use Access 2000 with the database?
Anyway, most probably you have problems with primary keys - i had it couple times when i was using a
table from ODBC connection and primary key was set to the column of UNIQUEIDENTIFIER mssql type.
When i added an INT index column and set it as a primary key, everything works fine!
Also try to link those access 2000 table to a blank database created in Access 2003.
Let me know how it works!
Also if you post what columns (types) do you have in the table, i can have a look.
WYGL,
Andrey

#DELETED displayed in all cells

I have a SQL 2000 database and I'm using Access 2003 to gain access to the
tables. All cells contain #Deleted.
What am I doing wrong?
TIA
Jon
Jon Paskett wrote:
> I have a SQL 2000 database and I'm using Access 2003 to gain access to the
> tables. All cells contain #Deleted.
> What am I doing wrong?
> TIA
> Jon
>
Does it show fine when you use Access 2000 with the database?
Anyway, most probably you have problems with primary keys - i had it couple times when i was using a
table from ODBC connection and primary key was set to the column of UNIQUEIDENTIFIER mssql type.
When i added an INT index column and set it as a primary key, everything works fine!
Also try to link those access 2000 table to a blank database created in Access 2003.
Let me know how it works!
Also if you post what columns (types) do you have in the table, i can have a look.
WYGL,
Andrey