Solved

ssrs problem when adding fields to existing table

Posted on 2014-03-24
4
741 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 167 total points
Comment Utility
They have to be added to the dataset first then check to see if they exists to show or hide that field.
0
 
LVL 12

Assisted Solution

by:Koen Van Wielink
Koen Van Wielink earned 166 total points
Comment Utility
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 167 total points
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

744 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now