Click here to Skip to main content
15,887,347 members
Home / Discussions / C#
   

C#

 
AnswerRe: an sql query error ? help please ... Pin
albCode30-May-06 2:58
albCode30-May-06 2:58 
Questioncommand prompt with fop problem Pin
Support12330-May-06 2:30
Support12330-May-06 2:30 
QuestionRe: command prompt with fop problem Pin
Support12330-May-06 2:31
Support12330-May-06 2:31 
AnswerRe: command prompt with fop problem Pin
NaNg1524130-May-06 2:37
NaNg1524130-May-06 2:37 
AnswerRe: command prompt with fop problem Pin
NaNg1524130-May-06 2:36
NaNg1524130-May-06 2:36 
GeneralRe: command prompt with fop problem Pin
Support12330-May-06 2:40
Support12330-May-06 2:40 
GeneralRe: command prompt with fop problem Pin
NaNg1524130-May-06 2:41
NaNg1524130-May-06 2:41 
GeneralRe: command prompt with fop problem [modified] Pin
Support12330-May-06 2:53
Support12330-May-06 2:53 
hi,

sorry, it didn't work

public void shellControl2()
{
if(CustCd != "")
{
ProcessStartInfo startInfo = new ProcessStartInfo("cmd.exe");
// /c switch sends a command

startInfo.Arguments = "/C " + "\"" + @Convert.ToString(TempPath) + "\\fop.bat\" -xml \"" + @Convert.ToString(TempPath) + "\\ClientRecordCard.xml\" -xsl \"" + @Convert.ToString(TempPath) + "\\" + @Convert.ToString(TempName) + ".xsl\" -pdf \"" + @Convert.ToString(Salon.Library.GlobalVariables.Reports_Path) + "\\ClientRecordCard.pdf\"";
// redirect messages to this program
startInfo.RedirectStandardError = true;
startInfo.RedirectStandardOutput = true;
//don't execute using shellexecute API
startInfo.UseShellExecute = false;
//Don't open command prompt window
startInfo.CreateNoWindow = true;
System.Diagnostics.Process p = System.Diagnostics.Process.Start(startInfo);
string output = p.StandardOutput.ReadToEnd();
string error = p.StandardError.ReadToEnd();
p.WaitForExit();
if (output.Length != 0)
{MessageBox.Show(Convert.ToString(output));
shellControl1.WriteText(output);}
else if (error.Length != 0)
{MessageBox.Show(Convert.ToString(error));
shellControl1.WriteText(error);}
}
}

This is the code snippit i'm using to send a command to command prompt to run the fop batch file to create a pdf file from xml and xsl files. if you can help it would be great. i had it working fine when all the files were in "C:\Reports\" But we had to move it to the derectory where the user installs the program and only the pdf file(Result) would be stored in the "C:\Reports\" directory.

He who laughs last...

-- modified at 9:09 Tuesday 30th May, 2006
GeneralRe: command prompt with fop problem Pin
NaNg1524130-May-06 2:59
NaNg1524130-May-06 2:59 
GeneralRe: command prompt with fop problem Pin
Support12330-May-06 3:13
Support12330-May-06 3:13 
GeneralRe: command prompt with fop problem [modified] Pin
NaNg1524130-May-06 3:12
NaNg1524130-May-06 3:12 
GeneralRe: command prompt with fop problem [modified] Pin
Support12330-May-06 3:15
Support12330-May-06 3:15 
GeneralRe: command prompt with fop problem [modified] Pin
NaNg1524130-May-06 3:23
NaNg1524130-May-06 3:23 
GeneralRe: command prompt with fop problem [modified] Pin
Support12330-May-06 3:33
Support12330-May-06 3:33 
GeneralRe: command prompt with fop problem [modified] Pin
NaNg1524130-May-06 3:34
NaNg1524130-May-06 3:34 
GeneralRe: command prompt with fop problem [modified] Pin
Support12330-May-06 3:43
Support12330-May-06 3:43 
GeneralRe: command prompt with fop problem [modified] Pin
Support12330-May-06 4:01
Support12330-May-06 4:01 
AnswerRe: command prompt with fop problem Pin
Dan Neely30-May-06 3:56
Dan Neely30-May-06 3:56 
GeneralRe: command prompt with fop problem Pin
Support12330-May-06 4:03
Support12330-May-06 4:03 
QuestionUnique ID Pin
NaNg1524130-May-06 2:29
NaNg1524130-May-06 2:29 
QuestionC#: Very important: do u know how to compare excel sheets formats? Pin
haiaw30-May-06 2:20
haiaw30-May-06 2:20 
AnswerRe: C#: Very important: do u know how to compare excel sheets formats? Pin
haiaw30-May-06 4:05
haiaw30-May-06 4:05 
AnswerRe: C#: Very important: do u know how to compare excel sheets formats? Pin
Dan Neely30-May-06 4:26
Dan Neely30-May-06 4:26 
GeneralRe: C#: Very important: do u know how to compare excel sheets formats? Pin
haiaw30-May-06 9:28
haiaw30-May-06 9:28 
QuestionHow to set focus on the form. Pin
analytiks30-May-06 2:09
analytiks30-May-06 2:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.