Click here to Skip to main content
15,845,436 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i've set two parameters fields in crystal report as FromNumber and ToNumber,
on prompting the above values i enter two diffrent values for both fields on prompting window, how can i get these values in my code to send them as parameters to a method...
Posted

Try This...

VB
Dim pmtDiscValue As New ParameterDiscreteValue

pmtDiscValue.Value = txtMinValue.text
cryRpt.ParameterFields("FromNumber").CurrentValues.Add(pmtDiscValue)
pmtDiscValue.Value = txtMaxValue.text
cryRpt.ParameterFields("ToNumber").CurrentValues.Add(pmtDiscValue)



Let me know if you have any question related this post.
 
Share this answer
 
v2
Comments
durgeshtupkar10 30-Aug-12 2:13am    
bu im not putting values as 1 and 100 from code as above, i'll provide it on prompt for entering values before displaying crystal report...
durgeshtupkar10 30-Aug-12 2:45am    
plz. reply...
Vipul J Patel 30-Aug-12 3:02am    
Will you please provide more input so i can give you the proper solution.
durgeshtupkar10 30-Aug-12 3:18am    
see, i have given 2 parameter fields in crystal report as fromnumber and tonumber, whenever i execute application it asks me in prompt window to provide values for fromnumber and tonumber and clicks ok, those values i want in code.
(prompt window is supplied by crystal report itself, how can i access those values???)
Though they are not in C# yet good enough for direction:
VB.NET Crystal Reports String parameter [^]
For passing parameter from TextBox to Crystal report Using vb.Net[^]

Look at them and see how it is done. Try out.
 
Share this answer
 
Comments
durgeshtupkar10 30-Aug-12 2:15am    
im not using any special control like tetbox, im inserting these two values in prompting window of crystal report,how can i get these values in code
Sandeep Mewara 30-Aug-12 5:02am    
If you are inserting it in report, then you cannot get in code. They are not connected like this.

You can pass value from code to report.
durgeshtupkar10 30-Aug-12 2:45am    
plz. reply...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900