I have one problem with creating dynamically data source SSRS reports.
Locally in SSDT tool is working fine, but after publishing, on Report Manager, gives mi silly error : "An error has occurred during report processing. Could not find stored procedure XXX". The stored procedure is created in the same way in all databases.
What is the problem?
Thank you in advance.
If the issue is only with this one stored proc then try using the full name including Schema.
e.g.
dbo.spr_YourStoredProc
Or feel free to share the image of stored proc name in database explorer window and your data source window so that we can comment better?
I use dynamically data source in order to get the same report in different companies.Firstly, I created parameter #company that contains values of Initial Catalog (database of each company). In data source I created expression:
="Data Source=10.0.23.8;Initial Catalog="+Parameters!company.Value.Then I embedded
this data source in Data Set. Note: This Data Set gave result, while connection string was static(one company). Locally in SSDT it works, when I change Data Source that has expression instead of static connection string, but in Report Manager is not working. Locally I used Windows integrated authentication. Stored procedure is created in all databases.Remotly I get this message: An error has occurred during report processing. (rsProcessingAborted)
Query execution failed for dataset 'DnevnaProdajaRC102'(rsErrorExecutingCommand)
Could not find stored procedure 'dbo.neo_dnevna_102_novo'.
If data set is simply query, then I get message: An error has occurred during report processing. (rsProcessingAborted)
Query execution failed for dataset 'SpisakRadnika'. (rsErrorExecutingCommand)
Invalid object name 'Radnik'. Radnik is a table and is located in all company databases.
Related
I have a static Pentaho Report(.prpt) on my pentaho server.I am trying to find the way to pass paramater to my pentaho report and refresh(update) the report using pentaho scheduler.I am able to run the sql query each time the scheduler runs.
But I want to pass parameter(user data to be used in mysql query) dynamically so that I am able to generate user specific reports for all users using same prpt file on my server.
How can that be achieved? Can anyone explain with an example regarding the dynamic query scripting in Pentaho Report Designer as there is no material which can be found for the same.
I am using Pentaho Report Designer and Server(8.1).
You must first create a parameter on the report (under the Data Tab, choose Parameters and right-click to create a new parameter). Those parameters can be passed from the URL, or set via a selector/dropdown.
Then you can use the parameter by entering it into the query with a syntax such as shown below:
select * from sales where customer = '$(customerParam)'
I'm trying to plot data to a shapefile in SSRS. I linked my SQL Server successfully and selected my Stored Procedure, but when I go to set my Spatial and Analytical Dataset Fields SSRS tells my
Procedure or function 'uspStoredProcedure' expects parameter '#eventId', which was not supplied.
I don't understand because I explicitly entered eventId on the page directly before this, ran the query and everything came up just as expected.
I have a dynamic data source in my SSRS Report. It will get its server name from a parameter defined in the report. I defined my dynamic data source connection string as
="Data Source="+Parameters!HostServer.Value+";Initial Catalog=DBName"
When I am trying to define a data set using this data source, I am not able to extract the fields out of the query used in the data set. The error I am facing is that "Could not update a list of fields for the query. Verify that you can connect to the data source and the query syntax is correct..."
If I use the same query against my server in SSMS editor, I am getting expected output. And the parameter has already a default value which I suppose the report will use while testing connection.
If anyone know how to resolve this connectivity issue with dynamic data sources, please help.
You should create another temporarly datasource where you need to set connection to one of your databases. Then when you define dataset use that temporarly datasource in order to populate the available fields. Once the fields are created, you can change the connection back to your dynamic data source. After that delete temporarly datasource and it all should to work.
have a Stored Procedure which has XML as Output and it shows xml output in SSMS. How should I generate an XML file to a specific location from this Stored Procedure using SSIS. I found a link which suggests using VB and script task to do this.Can this be done without using Script Task ? Also I tried following steps in this link :
How to export from SQL Server to XML
The Package fails at Execute SQL Task itself and gives the error [Execute SQL Task] Error: Executing the query "EXEC USP_PMAXML" failed with the following error: "Could not find stored procedure 'EXEC USP_PMAXML'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Thanks for your time and help.
A) The error you are receiving indicates it cannot find the stored procedure. You will want to verify
the stored procedure exists
The account access the stored procedure has execute permissions for it
The stored procedure exists in the default schema, probably dbo, for the account. {I've seen issues where procedures are created under user schemas [domain\user].USP_PMAXML }
The Connection Manager you are using is pointing the correct server and catalog (database).
B) If you would like to use an out of the box approach and avoid scripting, then remove your Execute SQL Task. Below I show an Execute SQL Task for reproduction purposes. It creates a stored proc that generates XML.
Add a Data Flow Task.
Within the Data Flow Task, add an OLE DB Source.
Configure your OLE DB Source to use the connection manager and the stored procedure we verified is correct from step 1
Assuming there should only be one file generated, add a Derived Column Transformation out of the OLE DB Source and inside of it, define the output file name which I assume is C:\ssisdata\so_xmlExtract.xml. I will further assume you rename the column as FileName. The exact value you would use is "C:\ssisdata\so_xmlExtract.xml" Note the doubling of slashes as we must escape the \ character as well as wrap with double quotes.
At this point, you're ready to use the Export Column Transformation. Examples Export Varbinary(max) column with ssis and
Using SSIS to extract a XML representation of table data to a file
I wanted to find out if it is possible to call MS Access Stored Queries with parameters using DAAB.
I am using the Northwind sample database to test this scenario I have created the following Stored Query with parameter in MS Access:
PARAMETERS FirstName Text ( 255 );
SELECT Employees.ID
FROM Employees
WHERE (((Employees.[First Name])=[#FirstName]));
This query is stored with name: GetEmployeeIDByName
I have created a wrapper over the DAAB to allow access to various databases like SQL, Oracle, any OLEDB and and ODBC database.
Below is the sample code for my test:
Database db = new GenericDatabase("Provider=Microsoft.ACE.OLEDB.12.0; Data Source=C:\Database\Access\Northwind 20071.accdb",OleDbFactory.Instance);
DbCommand cmd = db.GetStoredProcedure("GetEmployeeIDByName");
db.AddInParameter(cmd,"#FirstName",DbType.String,40);
object employeeID = db.ExecuteScalar();
I get an error Invalid Operation. I am not sure if I am calling the stored Queries correctly as I am able to call Stored Queries that do not have any parameter without any errors.
I was able to resolve the issue. The issue was with the Northwind sample database. I then imported Northwind database from SQL Server into MS Access and also created the stored queries in MS Access. Here is the detailed discussion that I had with the Enterprise Library DAAB's team: entlib.codeplex.com/Thread/View.aspx?ThreadId=223653 Hope it helps. Access does not care about the # character you can call the parameter with or without the # character.