SQL Server 2005 Report Manager - data source connection info deleted? - sql-server-2005

Just started a new job and one of my duties is to create/alter reports and make them accessible on our report server for the rest of the company. I've created a new report (from an existing report) in Visual Studio 2005 and it works fine in VS. After I Upload the file to the report server using Microsoft SQL Server Report Manager and try to view the report it says "The report server cannot process the report. The data source connection information has been deleted. (rsInvalidDataSourceReference)"
I checked in Properties > Data Sources and the first option "A shared data source" is selected with a alert next to it saying "The shared data source reference is no longer valid". The odd thing is that the original report that I used to create this one has the same alert and same settings, but it executes fine. They are very similar - original reports by year and the new one is by month.
I'd really appreciate any help i can get on this one as I don't have anyone in the company I can lean on. I'm very unfamiliar with these applications so it could be that I just need some basic first steps to troubleshoot this issue.

Did you upload the datasource as well?

Related

Replicating sql server report database to a different machine then modify data source automatically

I have a SQL server reporting service production environment. I need to duplicate this environment on a totally different machine including the source data, let's call it Dev environment. I have backed up and restored both the source database (sourceDataDB) and the report databases (ReportServer and ReportServerTempDB) to this new machine. Re-configured the new reporting service to point to the new report database. Everything works except when I run a report, the report pull out data from the original source database instance instead of the newly created instance. Of course, I can manually modify the data source information from the Report Manager on the new report server. The challenge is every time the ReportServer and ReportServerTempDB got refreshed from the production database, the modified data source got replaced with the one from production environment.
I wonder if there is a way to automate the process of modifying data source information after each database refresh, either from the database end or from the report manager. I only have one data source that is shared with all the reports. This is a SQL Server 2008 R2
Thanks in advance.

Auto update reports generated in report studio, when new rows are added in database

I am using Cognos 10. I have created a model in FM using some tables in DB2. Then I have created a package and published it. I have also generated reports on this in report studio. Everything went well and the report looks fine.
Now the actual problem is, I added some rows to the tables which I used for this project and the previous report is not updating. I tried refreshing data source in FM but it didn't update. So I had to create a new model and publish a package and generate a new report each time I add data to my DB2 tables.
I have seen Tableau reports being auto-update when database changes occurs. Is this possible with Cognos?
Is there any other way in which I can just do something in report studio and the report automatically updates to the new data present in DB2 tables?? So that I don't have to create a new model,package and report for each DB2 insert??
I met the same issue here if I use a Framework Manager model. The only solution that I found right now is to write SQL directly in Report Studio.
It can be problem with local cache. I had this issue before. The new data row was not shown in Report after insert. I needed to disable local cache in the Framework to make it work.

How to distribute a SSRS report?

(distinction, I'm talking about distributing a report--not deploying a report to a report server)
To our product we've recently added support for it so it can dump various stats to a database (mssql server). Since then, I've made reports (where the datasource is my own sql server). But if I want to get these reports into the hands of customers (pointing to their own database, obviously) so they don't need to make their own (or if they don't want/can't make their own) is there a good way to do this?
I'd rather not have to give instructions on how to use the report creator and have them copy/paste what I've done nor have them open it and change the datasource. I'm completely new to using SSRS and don't know any of its intricacies. I know I can query the database to see what reports are available, is there a way to just add an entire report to the database via code (c# or java)?
Assuming that they have SSRS installed and configured, and assuming that their DB (tables, SPs etc.) match your report - one of the way this could be done is:
When creating your report use a shared datasource (don't use one embedded into report)
Ask a customer to create shared data source in their SSRS instance under the same name, but pointing to their DB
Profit! That's it, all you have to to is to give them the RDL file, they will upload it to their SSRS. It will use shared datasource they provided to pull data from their DB

Reporting Services multiple report folders, same data source name, but want different DB

TThanks, for reading, I'll try to explain my issue in a detailed format as the question I'm asking is a bit high-level for my experience-level.
I'm using VS2005 and SQL Server 2005 with Reporting Services. All of my reports are built in VS2005. The reports are deployed to folders named "Amort" or :Amort_Test" on the Report server depending on the configuration I choose when I deply (Production delpoys to "Amort", Test deploys to "Amort_Test").
In Reporting Services Report manager, I have a data source setup call AMORT (and that is the datasource in my VS2005 reports). The datasource is of type Microsfot SQL Server and the connection string is "Data Source=uslibsql310;Initial Catalog=AMORT_P".
What I'd like to do is have the ability for the reports in the "Amort" folder point to a database called AMORT_P on my server (uslibsql310) while the reports in the folder "Amort_Test" point to the database called AMORT_T on the same server (uslibsql310). Obviously my current configuration, where reports in both folders point to the same datasource, says that reports point to the AMORT datasource which currently points to AMORT_P.
My initial thought was that I could create a new datasources, call it AMORT_Test and have its connection string be ""Data Source=uslibsql310;Initial Catalog=AMORT_P". However, every time I'd deploy my reports, I'd have to change the datasource in VS2005 to read AMORT_Test instead of AMort and then deply, which would be abit of a hassle.
Can anyone think of a more user-friendly solution to this? I'm one who normally finds the quickest solution and goes with it, but in this case I think there must be a way to set this up so that the reports in one folder know to pick one DB and the reports in another folder know to pick a different DB, but my current setup doesn't allow that. I'm not sure where to start in trying to figure this out as I'm a bit of an RS novice.
You're almost there, I think. If I understood correctly, here's your current setup:
One shared datasource
Reports all use that shared datasource for datasets
Two configurations: test and production, each with its own target folder
What you can do now is set OverwriteDataSources to False. Manual labor is required to set the connection string for deployed reports only:
For initial deployment of reports
When you want/choose to change the connection for deployed reports
This manual labor can be either:
Changing the connection string, temporarily enable OverwriteDataSources, and re-deploy
Going to the report manager web frontend to change the connection string
However, your default setup would be to deploy reports to both configurations, without having to worry about connecting test reports to production databases and vice versa.

extract raw SQL query from a Crystal Report .rpt file

I've got an .rpt file that I did not write and can find no documentation about. I want to be able to review the SQL that is generated from this report so that I can figure out, well, what data it was pulling and what WHERE clause parameters were used.
I can open it up and see the report layout. But when I select Database|Show SQL Query... the report tries to connect to the data source. The problem is, the data source being used is unknown to me, probably an ODBC connection used by whoever wrote the query. All I can do at that stage is 'Cancel' and I'm back to looking at the report designer.
Am I missing something? Can I get to the SQL query without connecting to the datasource? It seems like viewing the selection criteria shouldn't be dependent on a data connection.
Thanks.
version: Crystal Reports 2008
I know that this is an old thread, but I encountered this same problem. Effectively we used to have a database/application that has since been aquired by an external agency.
Although they now have the database/application they don't have access to crystal reports, so we can't just send them the old report that we used to run. Likewise we can't run it as we don't even have the database set up anywhere.... So instead our plan was just to extract the SQL code generated by the report and forward that on.
We experienced the same problem, but the solution is actually pretty simple.
If you don't have access to the original data source, just create a new 'blank' datasource (such as an ODBC connection). As long as the connection to the datasource works (i.e. it is some kind of valid datasource this it works fine). When running the 'Show SQL' option point the report to this datasource. As long as you don't try to actually run the report (and only show the SQL) the operation wont fail. This worked for our situation anyway. (Crystal Reports 2008)
(I can give more details if it helps in any way.)
It should be possible to find out some details about the existing datasource, by selecting Database > Set Datasource Location... .
As well as enabling you to change the datasource location, this should show you some information about the current datasource, such as which type of datasource is being used, and possibly (dependant on the type of driver) the name of the database. It is likely to be less helpful if (as you surmise) the datasource is ODBC, but if it uses a native driver there may be something useful.
Without the password, I'm not sure how much you can do. It seems "Show SQL Query" requires to report to run first, then generate the SQL plan.
It's not ideal, but you could go to Database > Visual Linking Expert to at least see the tables and how they are joined, and the go to the Record Selection Formula Editor and see what the custom WHERE statements are.
Viewing the SQL of a Command in a Crystal Report File
There are times you have just the report file, but not the associated database structure that the report uses.
This is common when dealing with example reports of functionality you wish to mimic.
This is a workaround ONLY to allow you to see the SQL of a Command that a Crystal Report is based on, when you don't have the underlying database connection that the report is based on.
In essence, the dialog box has to be satisfied before it will show the SQL, so we fool it with a legitimate Data Source, just not one that would work with the SQL that is actually in the SQL Command.
Why does a report use a command? Doesn't Crystal Reports have the ability to link tables?
When a Crystal Report is based on a record set that is too complex for the table linking functionality within Crystal Reports, the report can instead be based on a SQL Query, usually developed/tested in another editor tool and pasted into the command. This allows advanced SQL functions to be utilized.
If you don't already have a Data Source on your computer set up that you can connect to, you will need to build one first.
A simple Microsoft Access .mdb file saved in a simple location will suffice.
I placed mine with the path C:\A_test\test.mdb to make it easy to find.
If you don't have one, google for a sample mdb file and download it, saving it with a name and location you can remember. (You won't ever actually open this file, but just connect to it.)
Once you have the file saved, open the ODBC Administrator and create a New Data Source.
(you can get to the ODBC Administrator quickly from Start > type ODBC in the Search)
On the User DSN tab, click the Add button.
Scroll down the driver list to Microsoft Access Driver (*.mdb), select it and click the Finish button.
In the Data Source Name box, type a name (I used MyTest).
Click the Select Button and select the mdb file you saved from a previous step, click OK.
Click OK again. You will see your new Data Source listed by the name you gave it. Click OK.
You now have the data source you will need for the next steps.
Open the Crystal Report you want to see the SQL command for, and click on Database Expert button or Database>Database Expert Menu.
Under Selected Tables, right click on the Command and choose View Command
The Data Source Selection Box appears. Select the Data Source you created (or one you already use) and click the Finish button. The View Command box should open with the SQL in the left pane. Copy the SQL into your favorite text editor.
Whats happening is that the crystal reports needs a database to connect to regardless if its the original source DB or not.
Create a local database or use a database stored on a server, added it to your ODBC Datasources and use it when connecting. After a successful connection you should be able to view the SQL query without an error.