Solved

ssrs problem when adding fields to existing table

Posted on 2014-03-24
4
758 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
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 12

Assisted Solution

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help with SQL Server Stoplist 2 18
Can someone plz fix this..getting an error 3 18
T-SQL: Nested CASE Statements 4 24
conditional join based on column 4 8
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
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

920 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

13 Experts available now in Live!

Get 1:1 Help Now