ssrs one or more parameters required to run the report have not been specified - sql-server-2005

I'm having the error one or more parameters required to run the report have not been specified. The only thing is i've removed all but one parameter from my report and I have specified the value for that parameter. My guess is it's still looking for one of the parameter's i deleted from the report. How do I find that parameter value and get rid of it?

Replacing reports on the server often does weird things with the parameters on the server. The fix is to delete the report off the server and then deploy a fresh version.

One way this can happen is if you are using Shared Datasets and you pull in DataSets that your report is not using. Each report must define its own version of the parameters for each shared Dataset locally. So if you've included a Dataset as one of your data sources and you have not explicitly defined how this particular report will pass parameters to that Dataset, you'll get this error.

Related

Displaying the data source in SSRS

How do I return and display the data source in SSRS?
I've got multiple data sources in the report in addition to Live vs. Test systems. How do I output/display a string with the data source.
There's no built in function to get data source names in an expression.
Interestingly, you can use an expression to define a connection string. So you could use that same expression elsewhere on the report.
I was hoping there was a way to access them through Custom Code. The only approach I could find though is to query the Report Server database.

How to query access table with a subdatasheet that requires parameters

I have been tasked with creating a method to copy the contents of an entire database to a central database. There are a number of source databases, all in Access. I've managed to copy the majority of the tables properly, 1:1. I'm using VBScript and ADO to copy the data. It actually works surprisingly well, considering that it's Access.
However
I have 3 tables that include subdatasheets (to those that don't know, a subdatasheet is a visual representation of a 1 to many relationship. You can see related records in another table inside the main table). When My script runs, I get an error. "No value given for one or more required parameters." When I open Access and try to run the same query that I've written in SQL, It pops up message boxes asking for parameters.
If I use the query wizard inside Access to build the select query, no parameters are required and I get no subdatasheet in the result set.
My question is this: how do I write a vanilla SQL query in my VBScript that does not require parameters and just gives me the data that I want?
I've tried copying the SQL from Access and running it through my VBScript and that doesn't seem to do the trick.
Any help is greatly appreciated!
As it turns out, you need to make sure that you've spelled all of the field names properly in your source query. If you've included additional fields that aren't actually in the source or destination table they'll need to be removed too.

How to use a dynamic parameter with a command in crystal reports?

The problem I'm running into is quite easy to recreate.
In Crystal Reports Developer I add two different tables:
The full table "Users"
A Command containing SELECT * FROM Users
In the Field Explorer I add a new parameter and set this to dynamic. I have this parameter pull it's data from any field in either of the two tables (doesn't matter). Of course making sure the parameter is used in the record select.
If I now preview this report (in Developer) it works perfectly. I get a popup allowing me to select data from whatever field I selected in the parameter.
Using this report in Crystal Viewer it prompts for database username and password.
It seems it only does this when the same report contains both a dynamic parameter and a command. Removing the SQL command (leaving only the table) and the report works as expected.
Does anyone know how to resolve this, or is there some workaround?

Pentaho Execute SQL Statements variable conversion to null

I am using PDI to delete and insert some data from a DB. I have the following issue. I create two variables called START_DATE and END_DATE that are used to select the data that will be deleted from my DB. I am able to get them and run my transformation with no erors in the log file, but when I checked if data was deleted, I find it didn't. I send checked my "DeleteProcedure" step, and it says "Conversion error: null". I have tried different approached to take the variables and pass them as Strings, but I haven't been able to solve this issue. It cannot be a SQL mistake as I tested it with a constant and it works.
Any ideas? I attach some pics. Thanks!
As a documentation of the Execute SQL script says:
Note: When you have an issue, that the SQL is started at the initialization phase of the transformation and not for each row, make sure to check the option "Execute for each row" (see description below).
In your case it executes during the initialization phase of the transformation that's why it gets null values instead of ones from previous step.

SSRS Text Query: Variable names must be unique within a query batch or stored procedure

I am developing an SSRS 2008 report, but instead of using stored procedures, I want to use all Text queries. This report was working with stored procedures, but when I changed this report to use same logic but via text queries, I got the following error:
An error occurred during local report processing
    Query execution failed for dataset 'BRSR_Totals'
        The variable name '#END_yEAR' has already been declared. Variable names must be unique within a query batch or stored procedure.
Operation cancelled by user.
The problem is that some of my datasets (text queries) re-use the same parameters and END_YEAR is one of these parameters. How do I make this report run correctly?
One area that you might want to check is case sensitivity. SSRS is case-sensitive when considering parameter names but T-SQL does not have that case sensitivity. Take another look at your code and make sure that all parameters are using the same case.
I just resolved a similar issue using a text query to populate a dataset. It worked in SQL Server Management Studio and it worked in the Query Designer within BIDS, but failed at runtime.
The issue turned out to be BIDS helpfully adding parameters to the Dataset that this query was referencing. Switching to the Parameters tab of the Dataset Properties showed that BIDS had duplicated the parameters I had already added earlier. Deleting the duplicates resolved my problem.
To respond to the suggestion that the logic be off-loaded into a stored procedure: in this case, the report is a custom report for a single customer. The query will only ever be used in this report and makes a few assumptions about the customer's configuration that should not be available globally
I also just fixed this same issue in one of my queries. I was using a text query and had datetime variables/parameters. SSRS added a second set into the parameters for the dataset properties. I deleted them and my query ran fine after that and my graph populated.
I ran into a similar issue on a report where I had declare a substantial number of parameters at the beginning that I didn't want the end user to see. The issue I had was I was using a comma at the beginning of the line, so I had:
DECLARE #Parameter VARCHAR(4) = 'text'
, #Parameter VARCHAR(4) = 'text2'
It worked just fine in SSMS, but when I ran it in Report Builder 3.0 it threw the error shown in this thread. I changed it to remove the comma and to restate DECLARE at the beginning of each line and it worked perfectly.
Check that you didn't declare it twice, once in the CREATE PROC statement you're creating and another in the actual code...I've seen this problem while testing changes to SP code.