c# Crystal Reports 13 (2010) Whats the difference between these methods for passing parameters to Report Documents

StackOverflow https://stackoverflow.com/questions/10910264

Question

I have been using this method for passing parameters to Reports (inherited code):

ParameterValues param0 = new ParameterValues();
param0.AddValue("1");
report.DataDefinition.ParameterFields[0].ApplyCurrentValues(param0);

But revising code i saw that you can make it like this:

report.SetParameterValue(0, "1");

This way i would save having to define ParameterValues...is there any fallback? Whats the difference between these two methods?

Was it helpful?

Solution

We have been using the second method for a while and it doesnt seem to affect functionality or performance...so we will it from now on as it is shorter...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top