Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ssrs problem when adding fields to existing table

Posted on 2014-03-24
4
Medium Priority
?
877 Views
Last Modified: 2014-03-26
I have needed to add columns to tables SSRS is using as sources for reports.  I have found that if I add columns to the table but not at the end this breaks the report. It seems to key the position of the column in the tablel

So if I have the following original table:

Table1
Col1
Col2
Col3

And I want to change it to the following it works fine:

Table1
Col1
Col2
Col3
Col4

However the following breaks the report:

Table1
Col1
Col4
Col2
Col3

Is there a way I can add new columns within the table and refresh the dataset to find them?
0
Comment
Question by:canuckconsulting
4 Comments
 
LVL 27

Assisted Solution

by:planocz
planocz earned 668 total points
ID: 39950657
They have to be added to the dataset first then check to see if they exists to show or hide that field.
0
 
LVL 13

Assisted Solution

by:Koen Van Wielink
Koen Van Wielink earned 664 total points
ID: 39952750
First of all, there is no reason why you would need to add a column in between other columns. Adding new columns to the end is perfectly fine, and there is no difference in performance. Sequence of columns is selected in your query, not because of the underlying table column sequence.
Secondly, adding a column to a table should not break the report. The dataset would still select the same existing columns. Unless you did something funky in your dataset query like an insert statement where you use select *. In that case because you changed the column sequence your insert statement would fail.
If you still can't work it out it would help if you can upload some sample data, your dataset query and the report RDL.
0
 
LVL 37

Accepted Solution

by:
ValentinoV earned 668 total points
ID: 39955312
As kvwielink mentioned, adding fields to tables not should break reports as long as the queries for those reports are written using best practices.  Please post some more details on how exactly the report gets broken.  Do you get any error message for instance?  The queries would also help.
0
 

Author Closing Comment

by:canuckconsulting
ID: 39957916
Hi guys,

The issue appears to be related to cached data stored in the associated .rdl.data files.  If I delete the file the report runs fine.

Cheers guys...I'm splitting the points and hope future searches will also note my comment.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question