My application has a form called frmReport which contains a crystal report viewer object called crvMain. That form has no methods.
The application also has a form called Form1 and it contains some input fields and a button called "ShowReport"
When the user clicks "Show Report", this code is invoked:
frmReport f = new frmReport();
f.crvMain.ReportSource = this._CRPath;
f.crvMain.SelectionFormula = CrystalSelect;
this._CRPath is the actual network path to the Crystal Report being called. CrystalSelect is a string containing a list of order numbers to be used as the seleciton criteria in the Crystal report.
This works fine, and the report shows the correct information.
However, the report has a formula called "ReportUser" and I now need to fill that from this code with Environment.UserName.
How can I do that? If I can't do that, is there some other method short of a table write/read to accomplish this?
Thanks in advance for your help.