Click here to Skip to main content
15,905,073 members
Home / Discussions / C#
   

C#

 
AnswerRe: What is XML and XSL? Pin
Support12330-May-06 3:52
Support12330-May-06 3:52 
AnswerRe: What is XML and XSL? Pin
Saeed Rezaey30-May-06 3:55
Saeed Rezaey30-May-06 3:55 
AnswerRe: What is XML and XSL? [modified] Pin
MCSD-Gandalf30-May-06 3:58
MCSD-Gandalf30-May-06 3:58 
AnswerRe: What is XML and XSL? Pin
AbdulRahmanOfpk30-May-06 4:08
AbdulRahmanOfpk30-May-06 4:08 
QuestionRe: What is XML and XSL? [modified] Pin
NaNg1524130-May-06 4:29
NaNg1524130-May-06 4:29 
AnswerRe: What is XML and XSL? Pin
Dustin Metzgar30-May-06 5:01
Dustin Metzgar30-May-06 5:01 
QuestionMultiple row select in a datagrid? Pin
MCSD-Gandalf30-May-06 3:09
MCSD-Gandalf30-May-06 3:09 
QuestionAddIn not responding for VS.Net 2003 Pin
Ruhina30-May-06 2:54
Ruhina30-May-06 2:54 
Questionan sql query error ? help please ... Pin
cmpeng3430-May-06 2:32
cmpeng3430-May-06 2:32 
AnswerRe: an sql query error ? help please ... Pin
NaNg1524130-May-06 2:40
NaNg1524130-May-06 2:40 
AnswerRe: an sql query error ? help please ... Pin
Guffa30-May-06 4:20
Guffa30-May-06 4:20 
AnswerRe: an sql query error ? help please ... Pin
Stefan Troschuetz30-May-06 2:48
Stefan Troschuetz30-May-06 2:48 
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 

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.