Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,

I have created a window based application to get dates(From Date and To Date) which compares the Booking Date from the database and result will be displayed on Crystal report Viewer.

I created an exe file of it and tried to execute on Command Prompt. But i am not getting how to get those parameter in Form_Load event(crystalReportViewer1_Load).

Can anyone please help to solve this....

My command-line will be

c:> testRptExe '18/12/2012' '26/12/2012'
Posted
Updated 18-Dec-12 17:38pm
v2

This makes no sense at all. If it's windows based, there is no code behind and it's not ASP.NET. If it's a windows app, the parameters are passed in to the entry point as an array. And, your question therefore is nonsensical
 
Share this answer
 
Comments
PRAKASH_N 18-Dec-12 23:37pm    
I am Sorry... I don't have much idea abt Window based app's. I thought the Form_Load() method will be the code-behind . So i used that word.. But i need solution for question!!!
Christian Graus 18-Dec-12 23:41pm    
Despite your question being a nonsense, I answered it. The entry point for your app is passed a collection of strings, that is the command line parameters. I don't have a windows based app open, but I think it's Program.cs that it lives in. Look for a Main method.
you can use this to read command line arguments from non-main method
C#
foreach (string arg in Environment.GetCommandLineArgs())
{
    Console.WriteLine(arg);
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900