I would like to know if it is possible to set the default values of a shared dataset with the results of another dataset.
I am currently creating datasets to allow a user group to run ad hoc sql reporting on a SharePoint intgrated deployment.
I know how to do this in an actual report but I would like to do it in the shared dataset so that users would not then have to configure the parameters in the report when they are creating ad hoc reports.
I can see how do create default parameters if I type in the values, however the values may change over time so I want to autmotaically pick up any changes from the database by running a query to get the appropriate values.
Has anyone achieved anything similar before or could suggest an alternative way to achieve this?
PS quite new to SQL reports. Thanks in advance
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 am running SQL 2012 and I have a SSAS multidimensional cube that holds measures for our retail business. I have created an SSRS report that pulls the data from the SSAS cube. I want the user to be able to run the report and only pass the users specific store revenue, customer count, ect, on the SSRS report that they are viewing.
I have created a parameter from the cube. Under the report parameter that was created from the cube I put in under default values, specific values, this expression for the value ="[DimUserTable].[Username].[UserID].&[" + User!UserID + "]", the report will not run. It gives the error;
For more information about this error navigate to the report server on the local server machine, or enable remote errors
Query execution failed for dataset 'Revenue'. (rsErrorExecutingCommand)
Does anyone have any idea how I can accomplish getting only the users store information to show on the report they are viewing?
You only need to pass the user id to the parameter.. your query should take care of the filtering using the parameter. Something like
where [DimUserTable].[Username] = #userid
I would use the following as the default value for the userid parameter
=User!UserID.Substring(User!UserID.LastIndexOf("\")+1)
Of course, this depends on what your cube holds for userid value. If it does NOT include the domain or machine name.. use the above.. else just use =user!userid
I've created a snapshot of my report in order to improve the performance. However, it appears that it's only using the snapshot on the default values for the report. If I change the values, it appears that it's calling the procedure again (?) or rendering the report again.
The report has a dataset which calls a procedure (no input parameters), which can be filtered using the input parameters.
The snapshot has been created using the Snapshot Options and Processing Options. Any ideas what I need to do in order for the report to use the snapshot all the time?
That is basically how snapshots work - they are a point-in-time copy of the report results taken with the default parameter values. If you change the parameters on the report then SSRS will not use the snapshot because the report results could be different.
It sounds like your report is always returning all data from the procedure, which is then filtered at report rendering time based on the parameter values. This is not a good design and is probably the reason for your report performance problems. Try modifying the procedure to accept parameters and passing these from the report - this way the procedure only returns as much data as is necessary to display in the report and the report server does not have to do filtering when rendering the report.
I am currently trying to automate reports using SSRS in SQL Server 2008, requiring little to no user input at all.
I have the queries already to acquire the data, but they require datetime parameters which are retrieved from an invoices table in the database.
Is there any way to automate this, without requiring user input? I'd like to have these reports fire off every Monday morning without prompting. We also have an internal web site which is used for administrative work, written in ASP and C#, that I can use in conjunction in need be.
Regards and thanks
You should be able to do this. In each report you can set a query to retrieve parameter values and you can also specify a query for the default values.
So
Add a parameter and have that parameter be passed to your stored proc that gets your data
Set the available and default values for that parameter to a sql query that returns the value you need for the parameter.
You'll need to do this for each parameter. Then as long as all parameters in the report have default values the report will run without prompting for parameters.
I am in a process of generating reports using SSRS. I have multiple servers with multiple oracle databases on each server. I am wondering if I can create multiple shared data sources, and shared data sets, and create one reports by switching data sets and data sources.
Otherwise I will have to create multiple reports for each data source, which can run into 100's of reports.
Any suggestion help would be highly appreciated..
Thanks
Nirmal
Almost everything in Reporting Services is an expression, including the SQL Statement of the dataset. This means it can be altered on the fly. Assuming the datasource credentials you use can access the databases you want to get to, then you just supply the database as a parameter and you're good to go. Of course, for databases on other servers you will need to use linked servers so the server you connect to can link across to the other server to access the database.
We have a table with a nice user readable name for the database such as "End of Financial Year 2009" which holds the database name for that data. Create a dataset to use this as a parameter - display the nice name as the label and get the server+databasename connection string from the value.
Then your dataset just looks like:
="SELECT * FROM " & Parameters!Database.Value & "TableName"
This assumes the databases have the same structures as far as the report's needs are concerned.
You have to set the fields manually but it gives you flexibility.