Hello all,
I have a winform application, where in we get the parameters from the reporting service and we display them in a panel for user's to input their criteria. So far everything worked good, but now we have a requirement wherein dynamic functionality is needed.
For Example:
Based on a selection of a combobox value, we want the other control to be enabled or disabled. Also we want default value of a control to be calculated based on another control's value like .. if user enters value "1" in textbox1 then texbox 2 should have default value of "6". (Textbox1 + 5).........and mix and match of such capabilities.
The Question is........IS IT POSSIBLE? and if yes...HOW!!!
VDeepak,
You can not enable and disable control, but you can provide default value to parameters by using "Cascade Parameters". I customary write a stored procedure to provide my values.
Ham
|||Thanks for the reply Cris,
Getting the default values from strored proceduers was never a problem. The problem here is to get the dynamic behaviour of the controls based on the retrieved parameters from the reporting services.
any help would be appriciated.
|||Oops.. typo Carl to cris....sorry
|||Not a problem,
Okay the approach could be textbox1 is parameter pMyFirst, Textbox2 is parameter mysecond. On your second parameter fire by your default stored procedure "sp_mysecond" witht akes a parameter of "pMyFirst" inside my sp_second goes like:
If @.pMyFirst = 1
begin
return 5+1
end
If @.pMyFirst = 2
begin
return 6+2
end
Now your second textbox should have the require value based on your business rule.
Ham
|||
Thanks for the response Carl.
The validation which you detailed can be done in reporting service . But , as I explained earlier I am brining all the parameters to win-forms application which is our data entry point for the end users. Here when the user edits any default value then this change should reflect in concurrent parameters with the appropriate values in the win-form app. This is a dynamic change in all parameters.
Hope I explained it clear...
|||
VDeepak,
My bad, I missed the operative word "Win-Forms Application" - Sorry I have not yet done any Reporting Service in a Win-Form application so my experience is limited in this area.
Ham
No comments:
Post a Comment