Report Parameter Populating Another Report Parameter
Feb 16, 2007
OK, I'm pretty sure that the answer to my questions is "no", but the boss is pushing, and I thought I'd double check.
I want the selection of one report parameter to decide what shows up for another report parameter. Specifically in my case it has to do with dates. I have narrowed the results down to monthly dates, meaning that the starting dates always start with mm/1/yyyy and the ending dates are always mm/31/yyyy (for a 31 day month).
The boss wants the ending dates to always be >= the month of the starting dates. So, if the user choose 1/1/2007 for starting, the minimum ending date would be 1/31/2007, etc.. Since the parameters are loaded at report initiation, and SSRS isn't really event driven, I didn't think this was possible. I just wanted to make sure before I tell the boss that it's not. Please advise.
Hello, since a couple of days I'm fighting with RS 2005 and the Stored Procedure.
I have to display the result of a parameterized query and I created a SP that based in the parameter does something:
SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON CREATE PROCEDURE [schema].[spCreateReportTest] @Name nvarchar(20)= ''
AS BEGIN
declare @slqSelectQuery nvarchar(MAX);
SET NOCOUNT ON set @slqSelectQuery = N'SELECT field1,field2,field3 from table' if (@Name <> '') begin set @slqSelectQuery = @slqSelectQuery + ' where field2=''' + @Name + '''' end EXEC sp_executesql @slqSelectQuery end
Inside my business Intelligence Project I created: -the shared data source with the connection String - a data set : CommandType = Stored Procedure Query String = schema.spCreateReportTest When I run the Query by mean of the "!" icon, the parameter is Prompted and based on the value I provide the proper result set is displayed.
Now I move to "Layout" and my undertanding is that I have to create a report Paramater which values is passed to the SP's parameter... So inside"Layout" tab, I added the parameter: Name allow blank value is checked and is non-queried
the problem is that when I move to Preview -> I set the value into the parameter field automatically created but when I click on "View Report" nothing has been generated!!
I had thought that this was possible but I can't seem to figure out the syntax. Essentially I have a report where one of the parameters is populated by a stored procedure.
Right now this is easily accomplished by using "exec <storedprocname>" as the query string for the report parameter. However I am not clear if it is possible to now incorporate User!UserID as parameter to the stored procedure. Is it? Thanks
I have a report parameter called para1 which is a drop-down list and what I want to do is display another report parameter based on the para1 selection.
So for example, para1 contains a, b, c choices. if a user selects b, I would like para2 to display but if the user selects a or c, I don't want the para2 to display.
I'll go to a dataset, open up the query designer, add a new parameter, then refresh the fields, but the parameter won't be added as a report parameter. If I go to the dataset properties under the list of parameters, the value in the dropdown will be blank. However, sometimes this will automatically add.Â
Is this a bug in Visual Studio? How do I get around this?Â
I have created a menu report listing available reports and am setting the Jump to settings of each text box in the list to take the user to the relevent report. But I am having a problem setting up drill down to reports with multivalued parameters.
What I want to happen when the user drills down is for the report to open up with no parameter values selected. This works for single value parameters where I have set Null as the default value. But I have not been able to figure out how to do this with MVPs. Does anybody know if this is possible?
As a workaround I have been using Jump to URL (rather than Jump to report), which has no problem opening the report without having to pass any values for the MPV. But I do not like using this as I use different DEV/UAT and PROD environments so would have to amend the URL for each environment.
Seems like this should be possible... Any idea?
Cheers, Mike
PS: I should add I can Jump to reports with MVP without specifying a parameter in development studio but not when the report is published.
I have a fairly complex report that was given to me that was hard coded for single parameters. There is a dropdown for each market (created from a query in SSRS). The users have to run for each market each week.
Is there a way to use this report as a Sub-report inside a list of a master report and then use a mult-value parameter?
I want this multi-value parameter to build the values for the list and then run the "sub-report" for each value.
I am working on reports in SSRS 2008 (not R2)... There are some reports with parameters that are hidden when the report is accessed through normal URL using ReportViewer.asx..The thing is that these hidden parameters need to be visible when the report is accessed using SSRS Report Manager.
I am extracting RS reports through a WebService: report = execService.Render("EXCEL", null, out extension, out mimeType, out encoding, out warnings, out streamIds);
Some works fine but some are generating the following SoapException:
Error during processing of €˜ReportParameterTime€™ report parameter. ---> Error during processing of €˜ReportParameterTime€™ report parameter. ---> Error during processing of €˜ReportParameterTime€™ report parameter. I set required parameters to their default values. In this specific report I have two required parameters: 1: ReportParameterTime, String 2: ReportParameter1, String
I set them to their default values (ReportParameterTime to "[Czas].[Kalendarzowy].[Rok].&[2007]" - means Time Calendar Year 2007) but I am getting the exception above. I set parameters using this code:
Where parameterValues is a List<ReportExecution2005.ParameterValue>.
When I am using Microsoft.Reporting.WinForms.ReportViewer the report is generated without any problems. I can see one parameter to choose: "Kalendarzowy" (means adj. Calendar) and can select years, the default value is "2007".
What am I doing wrong and how can I fix this error ? Does anybody know ?
Hi, I'm having problems navigating from one report to another one if the second report has a multi-valued report parameter. When I navigate to the second report, I don't pass any parameters, but I get an error "parameter is missing a value" for the multi-valued report parameter. I have it setup as allow "multi-value" and "blank value". Any idea what the issue might be? Thanks.
I am designing a report which will be used under the subreport control of a master report, now i am using a stored procedure for the subreport which has two parameters.
In the subreports dataset parameters tab, how can i mention the master reports columns, since i do not see the master reports columns here. since it is a different report.
If i use a hardcoded select query then i can just say
select address, city, state, zipcode from customer where (customerid = @customerID)
but i am using a stored proc. how to define the parameters under datasets parameter tab.
I have a report parameter textbox in my SSRS report which has the parameter properties as "allow null value" and "allow blank value" checked.
How I can ensure that when the value is entered in textbox, it should accept any character ie. The SQL code I should write so that all the characters inputted via the report parameter are accepted.
I have a RDLC report in an aspx page. The report has a table one of whose data column has a hyperlink.
ServerName Date ProjectStatus
Srv1 01/10 Green Srv2 01/10 Red Srv 3 01/10 Green
and the second shows the detailed history per server,
eg for Srv1
Table 2 ServerName Date ProjectStatus
Srv1 01/10 Green Srv1 01/09 Green Srv1 01/08 Red Srv1 01/07 Red Srv1 01/16 Red
On click of the hyperlink a report parameter SelectedServerName is set to say Srv1 (1st row). The report is reloaded and Table 2's data set fetches the results only for Srv1 .
This works fine in RDL format.
But when i embed the report in an aspx page in RDLC format the Parameter value is not set even after clicking the link.
Hardcoding the value works fine
ReportParameter[] p = new ReportParameter[1];
p[0] = new ReportParameter("SelectedServerName", "Srv1");
ReportViewer1.LocalReport.SetParameters(p);
How do i pass the value of ServerName corresponding to the link clicked and refresh the report? in RDLC?
I'm trying to figure how do I pass from Report Parameter for @MemberName parameter (NON-QUERIED) such as: 'Domain Admins','Local Install','maadmin','Helpdesk Systech','Administrator'
My query for dataset is:
SELECT id, ComputerCN, GroupName, MemberName, ScanDate FROM tbl_GROUPMEMBERS WITH (NOLOCK) WHERE ComputerCN LIKE '%' + @ComputerCN + '%' AND MemberName NOT IN (@MemberName) ORDER BY ComputerCN ASC
How do I pass this value into IN? It seems that it passed the whole string instead.
I have a stored procedure that works fine in reporting services. It grabs the total of Yes's and No's by dates . But then i went ahead and added 2 more parameters to the proc, and now the totals are all wrong. I dont understand how that can mess everything up. Here is the previous stored proc, that gives the correct sum. I just want to know what im doing wrong, that the totals are completely off now. Did i set up the parameter wrong in reporting services. I have the 3 parameters list in the report parameter section, and even have them cascading off of each other. That seems to work fine. but for the first matrix in my report, but the second matrix with this stored proc, is way off. Please help!!.
Code Snippet ALTER PROCEDURE [dbo].[Testing_Questions_ALL_YESOrNO] @Question char(80) AS BEGIN
SELECT Qry_Questions.Question , Qry_Questions.Date , Qry_Questions.response , B.Total FROM Qry_Questions INNER JOIN Qry_Sales_Group ON dbo.Qry_Questions.sales_person_code COLLATE SQL_Latin1_General_CP1_CI_AS = dbo.Qry_Sales_Group.SalesPerson_Purchaser_Code INNER JOIN ( Select COUNT(qq.response)as Total, Question, Date, response FROM Qry_Questions qq Where qq.response in ('Yes','No') GROUP by qq.[Question] , qq.Date,qq.response ) B ON Qry_Questions.Date = B.Date AND Qry_Questions.Question =B.Question and Qry_Questions.response=B.response WHERE Qry_Questions.[Response Type]='YesNo' and Qry_Questions.Question=@Question GROUP BY Qry_Questions.question,Qry_Questions.Date,Qry_questions.Response,B.Total ORDER BY Qry_Questions.Question, Qry_Questions.Date
END SET NOCOUNT OFF
Here is the edited version which only has two new parameters added to the proc. The edits are highlighted.
Code Snippet ALTER PROCEDURE [dbo].[Testing_Questions_ALL_YESOrNO_Totals] (@Region_Key int=null,@QuestionCode char(5),@Question char(80)) AS BEGIN
SELECT Qry_Questions.Question , Qry_Questions.Date , Qry_Questions.response , B.Total FROM Qry_Questions INNER JOIN Qry_Sales_Group ON dbo.Qry_Questions.sales_person_code COLLATE SQL_Latin1_General_CP1_CI_AS = dbo.Qry_Sales_Group.SalesPerson_Purchaser_Code INNER JOIN ( Select COUNT(qq.response)as Total, Question, Date, response FROM Qry_Questions qq Where qq.response in ('Yes','No') GROUP by qq.[Question] , qq.Date,qq.response ) B ON Qry_Questions.Date = B.Date AND Qry_Questions.Question =B.Question and Qry_Questions.response=B.response WHERE Qry_Questions.[Response Type]='YesNo' AND REGION_KEY=@Region_Key AND LEFT(Qry_Questions.[Question Code],2)IN (@QuestionCode) AND Qry_Questions.Question=@Question GROUP BY Qry_Questions.question,Qry_Questions.Date,Qry_questions.Response,B.Total ORDER BY Qry_Questions.Question, Qry_Questions.Date
I'm having a parameter definition problem . The parameter will have a list of available values, i want to define the default value as the last available value.
Example:
Available values: A, B, C, D, E.
Default value: E.
I could define a member in my mdx query to define a default value, but that's not a good idea. It slows the report performance.
I am designing a report which need to take parameter input by user when the report is open. Can anyone please tell me how to do this? Using MS SQL 2005 report. Thanks.
All, I have a report that needs to return a number of columns from a table based on 2 parameters [StartDate & EndDate [datetime]].
Here is my dataset Select * from table1 where start_date between @StartDate and @Enddate. In table1 [start_date datetime ,example value=[3/6/2008 6:41:47 PM]]
My problem is how do I convert the start_date to [3/6/2008] within my Dataset. Something like the below.[I get an error when I do the below] Select * from table1 where convert(varchar(10),start_date,111) between @StartDate and @Enddate.
The reason for doing this is because when I pick, StartDate as 01/01/2008 and EndDate as 1/31/2008.My report only return's values of 01/01/2008 to 01/30/2008.The items that falls on 1/31/2008 do not get displayed as the datasets does not consider time when comparing,but only the date part.
Do give me a suggestion,solution to this.Thank You in advance!
I am having a problem where I have a Summary Report for a Region that lists out data for each community in that region (sample below):
West Region Count
Community 1 N/A
Community 2 14
Community 3 41
Community 4 25
Community 5 38
Community 6 67
Community 7 40
Community 8 52
I have navigation setup such that when I click on a Community (like Community_1 above), the detailed community report is called. I am passing CommunityID as a parameter to the community report. The community report has a CommunityID (literally) parameter setup. This seems fine, but when I click on a community from the Region report (for example, Community_1 above), the community report does not automatically get rendered, it makes me select a community before it renders. I must have something setup incorrectly, but can't figure it out. Any ideas would be appreciated.
I want the community report to be rendered based on the selected community without having to select it again.
I have a value I need to show on every report so I want to create a report parameter. It appears the only way for a report to have a parameter is for it to be a variable in the SQL WHERE clause. This value is not in the database so can't be retrieved from SQL.
How can I pass this value to the report and display it in a textbox in the footer?
I'm trying to graduate from Access to SQL and am finding that Access is still meeting my needs better than SQL.
So, I figure I'm doing something wrong.
In Access, I have queries that contain parameters. So far, I've gotten SQL to accept parameters, using =@prompt. But, this seems to be a limited parameter capability. Number one, I can't use a phrase for a prompt. Number 2, I can't do something like Access' Between [upper] And [lower]; I've not found away to use parameters as bounds in SQL.
Hello I have an ASP.NET application where I can filter data from an SQL DB by certain criterias. Users are now also able to click on a link which redirects them directly to the SQL Server Reporting Services application. What I'd like to have is a possibility to pass an object (as string) from my ASP.NET app to the textbox of the search criteria from the Reporting Services app.
Example: - ASP.NET appl.: The user selected a FileId=84 -> then he clicks on the hyperlink to the SQL RS - The SQL RS appl. opens and the textbox FileId is filled with "84"
it of course isn't a problem to pass the FileId to the hyperlink the user clicks on, but is it possible that the SQL RS appl. can somehow read it from the URL and pass it to the textbox? Or does someone have another solution?
I've got a question regarding report parameters and how to handle them with report details.
Let's assume I've got a matrix with the year in columns and articles in rows. The detail block consists of the turnover and the amount of each article selled.
Is it possible to set a report parameter that'll let the user decide, via a drop down box, If he will the see the turnover, the amount or both? I know that it works for values but can I apply a parameter to columns?
In an "Windows Forms" project using VisualBasic 2005, I need to modify a parameter value in a report (.rdlc). In this report, called "RapportDeVente.rdlc", I have defined a parameter "rptPar_ProsID" as integer. I have included an control "ReportViewer" in a form called "Impression.vb". In another form used to select the report's parameters, I want to modify a parameter's value from a TextBox "txbProsID". I write this code : ...
I obtain this Warning about var "p ": "Warning 1 Implicit cast of 'Microsoft.Reporting.WinForms.ReportParameter' as 'System.Collections.Generic.IEnumerable(Of Microsoft.Reporting.WinForms.ReportParameter)'."
When I read the documentation it seems correct !?...
I have a report with a parameter that I would like to have created every night but also allow a user to change the default parameter and rerun it if they need to . When the Snapshot is opened, the parameter box is disabled. How can I work around this?
I have this error when my users try to view some reports in the CRM 3.0 samebody knew how is the soluction, maybe permision but I try to give all roles in the CRM 3.0 and I add in the Group List of my server (CRM)