W
walter1234
I have this code which runs a Crystal Report and passes a parameter
"hello_world"
Works fine. if I remove the underscore char and pass "hello world", it fails
FileInfo logicityPath = new FileInfo(@"C:\Program
Files\SaberLogic\Logicity\Logicity Desktop.exe");
string logicity_Path = logicityPath.FullName;
FileInfo RRDPath = new
FileInfo(@"F:\Payroll\PayrollReports\ExportedReports\LineItemReport.rrd");
string rrdPath = RRDPath.FullName;
ProcessStartInfo startInfo = new ProcessStartInfo();
Process pStart = new Process();
string arguments = rrdPath + " " + "rptTxt=hello_world";
startInfo = new ProcessStartInfo(logicity_Path, arguments);
pStart.StartInfo = startInfo;
pStart.Start();
It seems that I should use string.format to build the argument, but I can't
figure out how to pas a string with an embedded space
Can someone help?
Can you point me to some documentation about how to use the excape
characters in the string.format method.
args = string.Format("{0}\"\"{1}\"", rrdPath, p1);
if I change anything, I get the red squigglies
Thanks for any help
"hello_world"
Works fine. if I remove the underscore char and pass "hello world", it fails
FileInfo logicityPath = new FileInfo(@"C:\Program
Files\SaberLogic\Logicity\Logicity Desktop.exe");
string logicity_Path = logicityPath.FullName;
FileInfo RRDPath = new
FileInfo(@"F:\Payroll\PayrollReports\ExportedReports\LineItemReport.rrd");
string rrdPath = RRDPath.FullName;
ProcessStartInfo startInfo = new ProcessStartInfo();
Process pStart = new Process();
string arguments = rrdPath + " " + "rptTxt=hello_world";
startInfo = new ProcessStartInfo(logicity_Path, arguments);
pStart.StartInfo = startInfo;
pStart.Start();
It seems that I should use string.format to build the argument, but I can't
figure out how to pas a string with an embedded space
Can someone help?
Can you point me to some documentation about how to use the excape
characters in the string.format method.
args = string.Format("{0}\"\"{1}\"", rrdPath, p1);
if I change anything, I get the red squigglies
Thanks for any help