Ssrs display of report parameter
In an SSRS 2008 r2 report, I have a parameter called 'report' where the user can select what report(s) they want executed. When report4 and/or report5 are selected. I want like a parameter called 'sort' to be displayed. If report4 or report5 are not selected,
I do not want the parameter called 'sort' to be visible.
Thus is there a way to make a parameter visible based upon the value of 'report' having report4 or report5 selected? If so, can you show me how to setup the conditional display of this parameter?
Parameter visibility can be set to Visible, Hidden, or Internal, but dynamic visibility is not available.
David Dye My Blog
Similar Messages
-
URGENT: Report parameter form set to yes in calling report from menu
I have write this code for calling report from menu module. But where i put the code
PARAMFORM='YES' to display the report parameter form in order to enter the parameter by user.
DECLARE
pl_id ParamList;
repid REPORT_OBJECT;
v_rep varchar2(100);
v_server VARCHAR2(100);
rep_status varchar2(100);
v_host VARCHAR2(100);
BEGIN
select rep_server into v_server from reports_data;
select machine into v_host from reports_data;
pl_id := Get_Parameter_List('tmpdata');
IF NOT Id_Null(pl_id) THEN
Destroy_Parameter_List( pl_id );
END IF;
pl_id := Create_Parameter_List('tmpdata');
Add_Parameter(pl_id,'P_C_NAME',TEXT_PARAMETER,:GLOBAL.COMPANY);
Add_Parameter(pl_id,'P_B_NAME',TEXT_PARAMETER,:GLOBAL.BRANCH);
Add_Parameter(pl_id,'P_user',TEXT_PARAMETER,:GLOBAL.user);
repid := find_report_object('REPORTOBJ');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_FILENAME,getpath||'E_open_balance.RDF');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'htmlcss');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,v_server);
v_rep := RUN_REPORT_OBJECT(repid, pl_id);
rep_status := REPORT_OBJECT_STATUS(v_rep);
WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
LOOP
rep_status := report_object_status(v_rep);
message('Running');
END LOOP;
IF rep_status = 'FINISHED' or rep_status is NULL THEN
WEB.SHOW_DOCUMENT('http://'||v_host||'/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server='||v_server,'_blank');
ELSE
null;
END IF;
END;Jeneesh,
SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,
'paramform=YES
what about this variable ?
P_VAR1 = ........'); -
SSAS report action to pass multi-value list of dimention key values to a SSRS report parameter
This was originally posted on StackOverflow and suggested I try here as well.
I want to create a report action in an SSAS OLAP cube that generates a list of formatted values to pass into an SSRS report parameter that accepts a multi-valued parameter list. This would be applied at the
cell level in the SSAS action. I have found a solution that gets me most of the way:
How to Pass Multiple Values from an SSAS Report Drill Through Action to an SSRS Multi-Value Parameter, but not quite. The action does appear in Excel and works
if I run the action from a cell that is at or below the dimension attribute I am generating the list for, in this case,
Account Key.
Below is a link to a screen capture (unable to embed it due to lack of reputation) showing the action and dimension structure in Excel. The action works as long as I run it at the
Account Key level or below. I want to be able to run it at higher levels, such as
Account Major and still have it generate all then related Account Key values for the SSRS report parameter. Running it at the higher
Account Major level does not trigger the report to run.
Excel Action Screen Shot:
http://i.stack.imgur.com/QCGSp.png
Below is the MDX I am using to generate the value for the report parameter:
UrlEscapeFragment(
GENERATE(
DESCENDANTS(
[Account].[Account Key].CurrentMember,
[Account].[Account Key].[Account Key]
[Account].[Account Key].CURRENTMEMBER.Name,
"&rp:Account="
I am hoping that I can somehow modify the MDX above to make it return all the
Account Keys for any attribute of the Account dimension when ran from any measure cell, not just when ran at self and children of
Account Key in the pivot table.
Also, if it helps, I can execute the following MDX query on the cube and get the results I am looking for.
WITH MEMBER [Measures].[Account Key List] as
GENERATE(
DESCENDANTS([Account].[Account].CurrentMember, [Account].[Account].[Account]),
[Account].[Account].CURRENTMEMBER.NAME,
"&rp:Account=")
SELECT {[Measures].[Account Key List]} on 0,
([Account].[Account Company Number].[Account Company Number],[Account].[Account Major].[Account Major]
) on 1
FROM [Company 10 Action Demo]
Below are partial results:
10.116&rp:Account=10.116.010
10.117&rp:Account=10.117.010&rp:Account=10.117.020
10.120&rp:Account=10.120.005&rp:Account=10.120.006&rp:Account=10.120.010&rp:Account=10.120.020&rp:Account=10.120.030&rp:Account=10.120.040&rp:Account=10.120.050&rp:Account=10.120.060&rp:Account=10.120.380&rp:Account=10.120.999
10.123
Questions
Any ideas what I might need to do to get Account Key to be returned for any attribute of the
Account dimension?
Would I possibly have to alter my Account dimension in the cube to get this to work?
Thanks in advance.
Edit 1 - Adventure Works Cube Version
I was unable to get the suggested answer with the "Exists" function to work. To better demonstrate this issue, I have recreated it using the Adventure Works Cube.
I will focus on the Customer dimension, specifically the Customer and
Education attributes. I created a report action called Test Report Action. Below is the XML created for it in the cube.
<Action xsi:type="ReportAction" dwd:design-time-name="f35ad5ee-5167-4fb8-a0e0-0a74cc6e81c6">
<ID>Report Action 1</ID>
<Name>Test Report Action</Name>
<TargetType>Cells</TargetType>
<Target></Target>
<Type>Report</Type>
<ReportServer>SQLSERVER</ReportServer>
<Path>ReportServer?/Test Report</Path>
<ReportParameters>
<ReportParameter>
<Name>Test Customer Existing</Name>
<Value>UrlEscapeFragment(
GENERATE(
EXISTING DESCENDANTS(
[Customer].[Customer].CurrentMember,
[Customer].[Customer].[Customer]
[Customer].[Customer].CURRENTMEMBER.Name,
"&rp:Customer="
)</Value>
</ReportParameter>
</ReportParameters>
<ReportFormatParameters>
<ReportFormatParameter>
<Name>rs:Command</Name>
<Value>Render</Value>
</ReportFormatParameter>
<ReportFormatParameter>
<Name>rs:Renderer</Name>
<Value>HTML5</Value>
</ReportFormatParameter>
</ReportFormatParameters>
</Action>
Below are the steps to re-create the issue.
Connect to the cube in Excel
Add dimension Customer -> More Fields -> Customer
Add measure Internet Sales -> Internet Sales Amount
Right-click Internet Sales Amount cell, select "Additional Actions" -> "Test Report Action" and see customer values created for URL
When the action is ran at this point with Customer, I see the values created in the URL shown message box (since there is no SSRS report server at location specified).
Now the part I'm unable to resolve
Remove the Customer dimension and add Customer -> Demographic -> Education
Right-click Internet Sales Amount cell, select "Additional Actions" -> "Test Report Action"
Nothing happens. If I ran the action on the cell next to "Bachelors", I would want it to build up all the list of all the "Customers" that make up the "Bachelors" in the
Customer dimension as part of the report parameter. If no attributes where used in the cube from the
Customer dimension for that cell, then I would like it to return "All Customers", or something similar to show that all customers are included in the aggregations.
I am not too MDX savvy, thus far. I think I need to somehow join the
Customers to Internet Sales Amount in the Generate function portion. I have tried several different combinations of the
Customer dimension and Internet Sales Amount, along with various functions to see if I could get this to work with no success. I am hoping that someone more knowledgeable the me will have a solution. If you need more details,
please ask and I will provide them.Simon,
Thanks for you help with this. This morning I found a workaround. Below describes what that is.
What I ended up doing was getting a list of values from a degenerate dimension that I could use to pass to SSRS to get a list of transactions for a report. Below is how I did this, in relation to the Adventure Works cube using the degenerate dimension
Internet Order Details.
WITH MEMBER [Measures].[Order Param List] AS
GENERATE(
EXISTS([Internet Sales Order Details].[Sales Order Number].[Sales Order Number].Members, ,
"Internet Sales"),
[Internet Sales Order Details].[Sales Order Number].CurrentMember.Name,
"&rp:OrderNum=")
SELECT {[Measures].[Order Param List], [Measures].[Internet Sales Amount]} ON 0
,([Date].[Calendar].[Date]) ON 1
FROM [Adventure Works]
This will get a list of Sales Order Number in a text string, separated by "&rp:OrderNum=" for each measure of
Internet Sales. This would allow me to create an SSRS report to bring back detail information for each
Sales Order Number. Below are some sample results.
May 16, 2007 SO50493&rp:OrderNum=SO50494&rp:OrderNum=SO50495&rp:OrderNum=SO50496&rp:OrderNum=SO50497&rp:OrderNum=SO50498&rp:OrderNum=SO50499&rp:OrderNum=SO50500 $12,157.80
May 17, 2007 SO50501&rp:OrderNum=SO50502&rp:OrderNum=SO50503&rp:OrderNum=SO50504&rp:OrderNum=SO50505&rp:OrderNum=SO50506&rp:OrderNum=SO50507&rp:OrderNum=SO50508 $13,231.62
May 18, 2007 SO50509&rp:OrderNum=SO50510 $4,624.91
With this, I can then create a Report Action in SSRS with a Parameter Value of
UrlEscapeFragment(
GENERATE(
EXISTS([Internet Sales Order Details].[Sales Order Number].[Sales Order Number].Members, ,
"Internet Sales"),
[Internet Sales Order Details].[Sales Order Number].CurrentMember.Name,
"&rp:OrderNum=")
The way I was going about it before was flawed, as I was trying to get a list of the granular values from each dimension used to build the measure value and pass each one of those as separate parameters. I just needed to set something unique for each fact
measure transaction that represents the value and uses that in a query parameter for the SSRS report. -
I have SSRS parametarized report in that one data set have repeated values with query parameter . but while am mapping that query
parameter to report parameter i need to pass distinct values. How can i resolve thisHi nancharaiah,
If I understand correctly, you want to pass distinct values to report parameter. In Reporting Service, there are only three methods for parameter's Available Values:
None
Specify values
Get values from a query
If we utilize the third option that get values from a dataset query, then the all available values are from the returns of the dataset. So if we want to pass distinct values from a dataset, we need to make the dataset returns distinct values. The following
sample is for your reference:
Select distinct field_name from table_name
If you have any other questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
How to display Reports parameter form in Oracle Forms 10g.
hello,
am migrating from Forms 6i applications to Forms 10g.
one of my application contain report, that report display parameter form
I wrote below code for WHEN-BUTTON-PRESSED Trigger
DECLARE
pl_id ParamList;
v_report_id report_object;
v_report varchar2(100);
vjob_id varchar2(100);
vc_rep_status varchar2(100);
BEGIN
pl_id := create_parameter_list('my_list');
add_parameter (pl_id,'P_HOSPITAL_ID',text_PARAMETER,
:bm_hospitals.hospital_id);
add_parameter(pl_id,'PARAMFORM',text_PARAMETER,'NO');
v_report_id := FIND_REPORT_OBJECT('bm_r001');
v_report := RUN_REPORT_OBJECT ( v_report_id,pl_id );
vjob_id := substr ( v_report, length(<reportservername>)+2,
length( v_report) );
vc_rep_status := REPORT_OBJECT_STATUS (v_report);
IF vc_rep_status = 'FINISHED' THEN
WEB.SHOW_DOCUMENT ('/reports/rwservlet/getjobid'|| vjob_id||
'?server=rep_mohahubkpcomp_ORaHOme_IAS'||'&userid=
bedman/bedman@bedman'||'¶mform=yes','_blank');
ELSE
message ('Report failed with error message '||vc_rep_status);
END IF;
Destroy_Parameter_List(pl_id);
END;
The Above code is running report and displaying Output perfect but cannot
display the Parameter Form at runtime.
any help in this very thankful.
Regards
Gagan.In Your code there is a line:
add_parameter(pl_id,'PARAMFORM',text_PARAMETER,'NO');
which actually disables the report parameter form.
The line:
WEB.SHOW_DOCUMENT ('/reports/rwservlet/getjobid'|| vjob_id||
'?server=rep_mohahubkpcomp_ORaHOme_IAS'||'&userid=
bedman/bedman@bedman'||'¶mform=yes','_blank');
displays the report to which vjob_id refers. At this point the report is competed so the parameters userid and paramform are useless.
Hope this helps.
Regards
Bekcic Aleksandar -
How to display a Report 9i from Forms if the Report has a Parameter Form?
Hi,
could some one please post me a code sample to show how to call a (paper layout, RDF) Report from Forms if I would like it to display the Report's parameter form first?
Thank you in advance.
Tamas Szecsy
I used the following code segment do achieve the job, but I get "REP-546: Warning: The value of restricted LOV parameter P_ALAL is not among the selectable values" message, even though I would like to specify the P_ALAL value on the report's parameter Form.
declare
paramlist_id ParamList;
tmp_riport_name varchar2(200);
report_id report_object;
report_job_id varchar2(200);
tmp_id number;
begin
-- init
tmp_riport_name := null;
-- parameter list
paramlist_id := get_parameter_list('mytmp_params');
if not id_null(paramlist_id) then
destroy_parameter_list(paramlist_id);
end if;
paramlist_id := Create_Parameter_List('mytmp_params');
add_parameter( paramlist_id, 'PARAMFORM', TEXT_PARAMETER, 'YES' );
-- call report
report_id := find_report_object( 'DUMMY' );
if report_id.id is null then
return;
end if;
-- display
set_report_object_property( report_id, report_execution_mode, runtime );
set_report_object_property( report_id, report_comm_mode, synchronous );
set_report_object_property( report_id, report_destype, 'preview' );
set_report_object_property( report_id, report_desformat, 'PDF' );
set_report_object_property( report_id, report_server, 'rep_geoias' );
set_report_object_property( report_id, report_filename, :ALAP_REPORTS_NAME||'.rep' );
report_job_id := run_report_object( report_id, paramlist_id );
tmp_id := to_number(substr( report_job_id, length(name_in('rep_geoias'))+2 ));
web.show_document( '/reports/rwservlet/getjobid'||tmp_id||'?server=rep_geoias', '_blank' );
END;I think you specified report object name incorrect.
in command line:
repid := FIND_REPORT_OBJECT('REPORT1');
Report1 must be name of report object in Form Builder.
However to call report from Oracle Form you must do more work. For example:
- Create report server name
- Adding some code to set property for report object base on report server you created.
Cheer! -
IE 11 not displaying report parameter window
We have noticed that IE 11 is not displaying the input parameter window where user inputs their parameters like date ranges or other parameters. While parameter windows shows up in firefox.
We are using crystal reports 2011 on tomcat 7 production servers.
Does someone have a fix for that or any input on what can I do to fix the problem?
Thank you.Update to SP 13:
SAP Crystal Reports, developer version for Microsoft Visual Studio: Updates & Runtime Downloads
And for "SAP Crystal Reports, developer version for Microsoft Visual Studio", post your queries here:
SAP Crystal Reports, version for Visual Studio
Many thanks,
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter -
Report Parameter Form not displayed
When I ran a report using the following procedure code in web-enabled Oracle forms ,
PROCEDURE RUN_REPORT IS
pl_id ParamList;
BEGIN
pl_id := get_parameter_list('tmpdata');
if not id_null(pl_id) then
destroy_parameter_list(pl_id);
end if;
pl_id := create_parameter_list('tmpdata');
add_parameter(pl_id, 'PARAMFORM', TEXT_PARAMETER, 'YES');
run_product(REPORTS, 'D:\ORACLE\DIVISION', SYNCHRONOUS, runtime, FILESYSTEM, pl_id, NULL);
END;
No parameter form was displayed. What do you suspect? Or report parameter form cannot be used in web-enabled Oracle forms.
Hope some experts here broaden my mind!
Many thanks,
RichardRichard,
passing paramform=yes will do it. However, beside of that I wouldn't recommedn using run_product for reports on the Web, indeed paraneter forms are a bit tricky and don't work out of the box. There is a work around that i documented in a Forms/Reports integration Whitepaper available in teh Forms6i collateral section on otn.oracle.com/products/forms. This description uses run_report_object, addressing the Reports Server.
Frank -
Hi,
I'm trying to figure how to change the actual page title that is displayed in the top left corner of the Browser
"Home - Report Manager" to something more meaningful to my company, so that when a user bookmark the page it will pickup the title from there.
According to the default Link: /Reports/Pages/Folder.aspx?ViewMode=List I opened up
Folder.aspx, and all I see is a reference to Folder.aspx.cs, I could not locate this file and I'm not sure if there is where I can change the title.
I can change the Site Title by clicking on the "Site Setting" link but this does not allow the change of the Page Title that is on the top left corner of the browser.
Thanks for your help in advance.Hi Chillette,
In Reporting Services 2008 R2 or later, if we add a bookmark for a folder or report on report manager, the title of the site will display as folder name-Report Manger or report name-Report Manager. In Reporting Services 2008 or earlier, it will display as
Report-Manager only. We can rename the title of the site manually after we add the bookmark.
So in your scenario, you can update the report server to SQL Server Reporting Services 2008 R2 or rename the title of the site manually after we add the bookmark.
If you have any questions, please feel free to ask.
Regards,
Charlie Liao
Charlie Liao
TechNet Community Support -
[SSRS] Abnormal behavior for parameter usage in checking case within query of dataset
Details :
Following error is displayed when I preview a report (SUR_EXPLORER-NG.rdl) in Microsoft Visual Studio:
“An error occurred during local report processing.
An error has occurred during local report processing.
Cannot set the command text for dataset 'GET_FDA_CONFIG_ID'.
Error during processing of the CommandText expression of dataset 'GET_FDA_CONFIG_ID'.”
Following is the query set in dataset 'GET_FDA_CONFIG_ID':
=IIF(
Parameters!IN_Dimension.Value = -1,
"SELECT -1 AS FDA_CONFIG_ID FROM DUAL WHERE :H_IN_InstanceId = :H_IN_InstanceId",
"SELECT RA_SUMM_RECON_MEASURE.FDA_CONFIG_ID AS FDA_CONFIG_ID FROM RA_SUMM_RECON_MEASURE, RA_SUMM_RECON_HISTORY WHERE RA_SUMM_RECON_MEASURE.RECON_ID
= RA_SUMM_RECON_HISTORY.RECON_ID AND RA_SUMM_RECON_HISTORY.SUMM_RECON_INSTANCE_ID = :H_IN_InstanceId"
As a trial, I change the report parameter used in the checking condition as follows (SUR_EXPLORER-OK.rdl):
=IIF(
Parameters!H_IN_InstanceId.Value = -1,
"SELECT -1 AS FDA_CONFIG_ID FROM DUAL WHERE :H_IN_InstanceId = :H_IN_InstanceId",
"SELECT RA_SUMM_RECON_MEASURE.FDA_CONFIG_ID AS FDA_CONFIG_ID FROM RA_SUMM_RECON_MEASURE, RA_SUMM_RECON_HISTORY WHERE RA_SUMM_RECON_MEASURE.RECON_ID
= RA_SUMM_RECON_HISTORY.RECON_ID AND RA_SUMM_RECON_HISTORY.SUMM_RECON_INSTANCE_ID = :H_IN_InstanceId"
Then the mentioned error message is not shown (of course I can’t get desired report generated as the logic is incorrect).
Besides, I try with other report parameters but the mentioned error message is not shown.Hi chrisd921,
According to your description, you want to do a dynamic query based on parameter select in your report dataset. Right?
In Reporting Services, if we use query to retrieve data when creating dataset, this query will only be processed one time during report processing. So we can't make it change to another query after we change the parameter selection. And we can't combine
the data from two query together in a dataset, because in a dataset, if multiple result sets are retrieved through a single query, only the first result set is processed, and all other result sets are ignored. For your requirement, it can't be achieved currently.
In this scenario, we suggest you add one more column, and put in "-1" in detail row. Then control the visibility to show either "-1" or report data.
Reference:
Report Embedded Datasets and Shared Datasets (Report Builder and SSRS)
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
Ssrs 2008 r2 using parameter values
In an existing ssrs 2008 r2 report, I have a requirement from a user where they want to add 2 more parameters to the report. Right now there is an option where the user can choice to generate report1, report2, report3, report4, report5, report6, report7,
report8, and/or any combination of the reports I just listed.
This is setup by using an expression in the visibility property for each of the 8 tablixes.
For your information, the following is an example of how to display one of the reports or not:
=iif(InStr(join(Parameters!report.Value,","),6)>0,false,true)
Now the user wants to be able to add the parameters of customer and inventory_item based upon if report7 and/or or report8 is selected.
Now can you tell me the following:
1. Would you show me the code I can use in the dataset to select report7 and/or report8?
2. If the above is not possible to select specific reports, then would the dataset query need to look something like: where @report is null or where @report is not null? What would you suggest?Hi midnight_car,
According to your description, you have specified visibility for each tablix in a report with IIF() function. When you select 7 or 8, you want to add an additional parameter to filter displayed tablixes, right?
In Reporting Services, since we can’t specify the visibility of a parameter as an expression, we could add a cascading parameter. When the first value is 7 or 8, then selected values from the cascading parameter can filter the displayed tablixes. Please
refer to steps below:
1. Sample data.
2. Create a new dataset with the query below:
select distinct SalesTerritoryRegion as region from dbo.DimSalesTerritory
where SalesTerritoryRegion=
case when 3 in (@report)or 4 in (@report)
then SalesTerritoryRegion
else 'NA' end
3. Specify the parameter @region using the new dataset.
4. Query in main dataset like below:
select SalesTerritoryRegion as region,SalesTerritoryCountry as country,SalesTerritoryGroup as [group] from dbo.DimSalesTerritory
where SalesTerritoryRegion= case when 3 in (@report) or 4 in (@report)
then @region
else
SalesTerritoryRegion end
4. Preview the report.
If you have any question, please feel free to ask.
Best regards,
Qiuyun Yu
Qiuyun Yu
TechNet Community Support -
Creating snapshot in SSRS 2008 R2 report will disable some parameters.
Hi guys.
I'm new to SSRS, so the question that I'm going to ask might sound stupid, hope you guys don't mind.
I have a few reports that display data based on the snapshot. I found out that some of the parameters on certain reports were disabled and some are not. When I removed the snapshot setting and display the report based on latest data, those disabled parameters
will be enabled again.
After some search from Google, I understand that when using snapshot, the parameters will be disabled. But in my case, not all parameters are disabled. And there is some reports with snapshot, all of their parameters are enabled. Please help me on this if
there is any settings that I need to do to enable all of the parameters.
Thanks and have a nice day.Hi engloon,
According to your description, you want to enable parameters when creating a snapshot. Right?
In Reporting Services, Snapshots can be created manually or at scheduled intervals for any report that can run unattended. Furthermore, if the report uses parameters, you must specify default values to use when the report runs. You can specify stored credentials
and parameter values in the property pages for the report.
In this scenario, you may have default values for parameters in some reports so that it looks those reports have parameters enabled. So if you want to have snapshot rendered with parameter selection, you can specify the default values in Parameter tab. Please
follow the steps below:
Open Report Manager, and locate the report for which you want to modify parameter settings.
Hover over the report, and click the drop-down arrow.
In the drop-down menu, click Manage. This opens the General properties page for the report.
Select the Parameters tab. If the Parameters tab is not visible, the report does not contain parameters.
Reference:
Create, Modify, and Delete Snapshots in Report History
Add a Snapshot to Report History (Report Manager)
Parameters Properties Page (Report Manager)
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
Problem using default value of report parameter 1 to validate parameter 2 passed in to report
I am having a problem with an SSRS report using the default value of report parameter 1 to validate parameter 2 passed in to report (via C#) instead of using the value of parameter 1 that is also passed into the report. Here are the
simplified details:
Using SSDT, SQL Server 2008 R2
SSRS report has 2 parameters:
P1 -- text, hidden, default value 'R1', ... front-end C# code can pass 'R2' or 'R1'
P2 -- text, allows multiple values, list of available values provided by stored procedure (sproc_list) that takes P1 value as a parameter. Hence, sproc_list either provides a list for P1 = 'R1' or P1 = 'R2'.
List for P1 = 'R1' is 'A', 'B', 'C'
List for P1 = 'R2' is 'A', 'B', 'D'
Values for P1 and P2 can be passed in via C# to the report.
The C# front-end displays 2 report choices to the user, R1 and R2, where both choices call the same RDL; but choice R1 passes in 'R1' for P1, and the choice R2 passes in 'R2' for P1.
Upon a users 1st time use of the report no parameters are passed in. Then when the user exits the report, the parameter value for P2 that was chosen is saved off to a file for R1 or R2, and used the next time the user selects the report.
Everything always works fine for report R1 since the default value for P1 is 'R1'.
When R2 is chosen and the user selects 'D' as the value for P2, runs the report, then exits, the P2 value of 'D' for R2 is saved to a file. When the user returns the next day to run report R2, 'R2' is passed for P1, and 'D' is passed for P2.
This is when the problem occurs. The value of 'D' for P2 is validated against a list generated for P2 based on the default value of 'R1' for parameter P1. Hence, SSRS considers 'D' an invalid value for P2 and blanks out the P2 parameter.
The user can then use the drop down list for P2 and choose 'D', but this defeats the purpose of saving the parameter values to be used the next time.
Why is the stored procedure that provides a list of available values for parameter P2 using the default value of 'R1' for parameter P1 instead of using the value of 'R2' passed into the report for parameter P1?Hi Tom,
Sorry for my delay.
If I understand correctly, you have two parameter in your report. It is a couple of cascading parameter. If we have choose ‘R1’ of P1, the P2 values is A, B, C. ‘R2’ of P1, corresponding P2 values is A, B, D. What your requirement is to save the end use
select option of these two parameters.
In SSRS, if we have configure the parameter with default value. When we run the report, the parameter will fill with the default value to filter data. If we want to save the last status we are render the report, we need to update the default value of P1.
If we are query the default value from database, if possible, we can
update the database try to resolve the issue. Alternatively, we can set the dynamic default value for the parameter.
Hope this helps.
Regards,
Alisa Tang
Alisa Tang
TechNet Community Support -
Ssrs 2008 r2 date parameter not working all the time
In an SSRS 2008 r2 report, I am not getting some records selected when I run the report in the ssrs 2008 r2 report.
However when I run the sql in ssis manager, the records are selected. Thus I am trying to determine why some of the records are not selected whe running the ssrs report.
In the table called 'transactionfile', the fields that I am trying to determine where there is a problem is the following:
SchoolNumber (varchar(50),null), and
TransactionPaymentDate (varchar(50),null).
Examples of data are SchoolNumber = '121' and TransactionPaymentDate = '04162014'
In the SSRS report, the parameter value for @SchoolNumber is text and the parameter value for @EndDate and @StartDate is date/time.
The following is the query I am having a problem with:
SELECT s.SchoolNumber,
CONVERT(smalldatetime,substring(TransactionPaymentDate,5,4) + '-' + substring (TransactionPaymentDate,1,2)+ '-' +
substring(TransactionPaymentDate,3,2)) as TransactionPaymentDate
from [eF].[dbo].[transactionfile] f
INNER JOIN
[eF].[dbo].schools] s
on rtrim(ltrim(s.SchoolNumber)) =rtrim(ltrim(f.SchoolNumber))
where rtrim(ltrim(s.SchoolNumber)) = rtrim(ltrim(@SchoolNumber))
AND
Cast(Right(TransactionPaymentDate,4)+Left(TransactionPaymentDate,4) as Date)
>= @StartDate
AND
Cast(Right(TransactionPaymentDate,4)+Left(TransactionPaymentDate,4) as Date) <= @EndDate
Thus could you suggerst what could be wrong when selecting some records by date?First check whether transaction payment date has 8 digit or not. In yes then try the below query,
SELECT s.SchoolNumber,
CONVERT(smalldatetime,substring(TransactionPaymentDate,5,4) + '-' + substring(TransactionPaymentDate,1,2)+ '-' +
substring(TransactionPaymentDate,3,2)) as TransactionPaymentDate
from [eF].[dbo].[transactionfile] f
INNER JOIN [eF].[dbo].schools] s
on rtrim(ltrim(s.SchoolNumber)) =rtrim(ltrim(f.SchoolNumber))
where rtrim(ltrim(s.SchoolNumber)) = rtrim(ltrim(@SchoolNumber))
AND
cast(substring(TransactionPaymentDate,5,4) + '/' +
substring(TransactionPaymentDate,1,2)+ '/' +
substring(TransactionPaymentDate,3,2) as date) between @StartDate AND @EndDate
Regards, RSingh -
Report Parameter Default Value at runtime
Post Author: DMiller
CA Forum: .NET
Hi,
I need to be able to create new parameters at runtime and have been somewhat successful in this endeavor. I have one remaining issue that I am hoping that somebody can help me with. Let me explain.
When you create a parameter from within the Crystal XI designer, you are able to specify a number of default values that will display as a list box at runtime. Eg. ParameterName is MaritalStatus and default values are ("Married", "Single", "Divorced" etc). There is also the ability to specify the Default Value in the Value Options area of the screen. This value could be set to any one of the default values above - let's say that I set it to "Single". By setting the Default Value, this causes the Parameter Fields screen, at runtime, to "Select" the specific default value set above - in this case "Single", instead of showing "..." as the parameter value.
The default value setting in the Value Options is beneficial when you have reports that are usually run with certain parameter values and only occasionally these need to change. Instead of having to specify every parameter value, the user only has to set the ones that have not been defaulted or they want to change.
So, I have been successful in creating the parameters at runtime and successfully running the report. I have been unsuccessful in setting the "Default Value" as seen in the Value Options area. I have tried a number of properties on the report parameter object and have not found anything to set this.
Does anybody know how to set the "Default Value" as seen in the Value Options area in the designer at runtime?
Thanks for any help.Post Author: JerryB
CA Forum: .NET
You have described my scnario to a tee. Did you ever figure out how to get the single default value that is available in the "value options" area when working within the Crystal Reports development environment. I am using VB.Net and have a nice report menu form and viewer but recently a user ask me to set the default value in one of my combo boxes and I have been unsuccessful in finding the correct property to use.
Maybe you are looking for
-
How can I display an analog input to PXI-5105 out on LabVIEW?
Hi ALL, I am very very new to LabVIEW and I just started to fiddle around with it. I am running LabVIEW 2010 SP1 version on Windows 7 OS. I also have NI PXIe-1073 chassis with PXIe-6361 and PXI-5105 modules and the chassis is connected to my PC via P
-
Where is the Stop method for CWDI?
All the other DMA classes have a Stop mehtod. Why not CWDI?
-
Hi, Please help me with my settings for planning strategy 70, iam using 70 for component of a finished good, when i planned my finished good it created dependent requirements for its components which are not consuming by sales order quantity for a fi
-
I don't know if this question has already posted but if not here is my problem: I repeatedly get a blank screen except for the error message "blocked plug in" when browsing in safari and trying to view web page included videos. Is this an Adobe flash
-
Overflow Exception that I can't catch...
The problem is: I have a DataField, mapped type :DecimalNullable the input mask is set to Template ( #,##0;;;;) Because it is Template I can't validate on keystroke and I can't set the max characters in the properties sheet. This works great until, S