|
hi Robi,
use RecordSelectionFormula/SelectionFormula only to limit the number of records based on a specific criteria. to sort fileds add a SortField to the DataDefinition object of the report. make sure you have created the sort formula in report before assigning a value to it at runtime.
Rep repObj = new Rep(); //existing report in project
FieldDefinition fd = repObj.Database.Tables[0].Fields[0]; //indices as appropriate
repObj.DataDefinition.SortFields[0].Field = fd;
repObj.DataDefinition.SortFields[0].SortDirection = CrystalDecisions.Shared.SortDirection.DescendingOrder;//as appropriate
this.crystalReportViewer1.ReportSource = repObj ;
|
|
|
|
|
ok
hi
i have problem in doing with database files
i created small project whitch can doing with database just like
(Insert - Update - Delete) Records .
the project doing well (no bugs - no errors)
but if i want to run this source code in another pc
what should i do to run automaticly without modifying sqlconniction string
or attach the dataBase then
is there any way to doing with dataBase files directly
or what the last step i should do to build my project (just to run on other pc's)
please if any one can help
send me at
kifahhk@hotmail.com
|
|
|
|
|
The only way to avoid connection strings is to
1 - use Access MDB files and ship them with the app
2 - use localhost in the connection string and make sure SQL Server is installed as an unnamed instance with your app. And that scripts run to create the database.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,
Is there a possibility to add reference to assembly that is an exe ??
if so please tell me how?
karam C Bose
|
|
|
|
|
Hi!
With VS2005 you can directly reference an exe, IIRC.
With VS2003 or earlier, you can simply rename the .exe to .dll and reference this file.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
|
I created a .dll in C# using the "Class Library" option in Visual Studio .NET 2005. I also created a test application, and the .dll works flawlessly with it. The problem comes when I try to add it to Access (2000 or 2003). Access says it can't be done. I have come to believe that I need to register the .dll and I've tried to do so using the following lines in the command prompt:
cd /d %windir%\system32
regsvr32 "(absolute path to .dll)"
When I do this, I get an error saying that it can't find the entry point of the .dll. I don't know how to fix this. Any help is greatly appreciated.
-Fred Morstatter
|
|
|
|
|
Hi , to register your .Net DLL as a COM like stuff, you have to use regasm.exe tool, also do not forget to give the [GUID.....] attribute to your class,
you can also go by another approach of using tlbexp.exe to get a COM like dll and then register using regsvr32.
Live and let live
|
|
|
|
|
You're mistaken. The dll is not a COM dll, and therefore cannot be registered. What makes you think that Access should be able to use a .NET dll ? 2000 is before .NET was released.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi Chris,
We can export it in to COM using tlbexp, is that not possible??
|
|
|
|
|
1. How to get actual usage of processor?
2.How to get actual usage of RAM ?
3.How to get list of physical drives ?
4.How to get information about network card?
I will be very greatfull if you could give me answer to any of that questions, thank you very much in advance!
|
|
|
|
|
WMI is what you need for most of this. To get the drives is easy, there's an API that returns them all, in System.IO, from memory.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Could you tell me some more about it?
|
|
|
|
|
hi there.
to use WMI, visit "http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/wmi_reference.asp"
here is an example to collection physical drive info.
namespace: System.Management
ConnectionOptions conOpt = new ConnectionOptions();
conOpt.Username="administrator";
conOpt.Password="password";
ManagementScope localScope = new ManagementScope("\\pcgnadeem",conOpt);//computer name
ManagementObjectSearcher searcher = new ManagementObjectSearcher();
//searcher.Scope=localScope;//required only for remote computers
ObjectQuery query = new ObjectQuery("Select Name from Win32_LogicalDisk Where DriveType=3");
searcher.Query=query;
ManagementObjectCollection ResultsCollection = searcher.Get();
foreach(ManagementObject obj in ResultsCollection){
MessageBox.Show(obj["Name"].ToString());
}
|
|
|
|
|
hi,
in the link below is an example of what I want to achieve, but in a smart client winforms app.
in my app, the listboxes would be directly on the Employee add/edit form.
http://examples.codecharge.com/ExamplePack/ManyToManyListboxes/ManyToManyListboxes.php?emp_id=20
i've been googling for days, but haven't found an example, and I am too unexperienced to figure it out by myself.
any help or pointing in the direction very much appreciated
am using VS2005, in a C# Windows application.
Let's say I want a form to add a new Employee and assign projects to him on the same form by having a list of available projects and a list of selected projects.
Should the first list box be databound to a bindingsource ? When I assign a project to the employee it should dispaear from the available list, but not from the underlying database.
The selected projects should add records to the Employee_project table (join table for the many to many relationship)
I'd like to see an example of this using bindingsources as the datasource for the listboxes.
i'm using nettiers/codesmith
|
|
|
|
|
hi all,
I am presently creating a text editor for c# .In that application I would like to include one help file in the menu item for c#.I have written the help file in notepad and now when I click the c# menuitem it should open the help notepad to the viewer.
can anyone tell me how to do this.
Don't wait to hear a word of thanks from anybody when you help them instead ask them to help three other people and ask them to continue in chain.
|
|
|
|
|
you could try Process.Start()
ex Process.Start(@"C:\windows\system32\notepad.exe",@"C:\help.txt")
More Info[^]
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
hi all,
I am presently creating a text editor for c# .In that application I would like to include one help file in the menu item for c#.I have written the help file in notepad and now when I click the c# menuitem it should open the help notepad to the viewer.
can anyone tell me how to do this.
Don't wait to hear a word of thanks from anybody when you help them instead ask them to help three other people and ask them to continue in chain.
|
|
|
|
|
process.start can be used to open a file with the default program.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,
I am working on simple file downloader but I got stuck, I dont know how to limit speed of download ?
Is there any way to limit download speed ?
|
|
|
|
|
I want to draw a line on the panel of another form(such as Form2),part of
the code :
private void button3_Click(object sender, EventArgs e)
{
Form2 form = new Form2();
Graphics graphics = form.panel1.CreateGraphics();
graphics.Clear(System.Drawing.SystemColors.Control);
Font drawFont = new Font("Arial", 10);
SolidBrush drawBrush = new SolidBrush(Color.Red);
Pen pen = new Pen(drawBrush);
graphics.DrawLine(pen, 0, 0, 100, 100);
form.ShowDialog();
}
But I couldn't see the red line,I don't know why.
Thanks for your help!
|
|
|
|
|
Try this
private void button3_Click(object sender, EventArgs e)
{
Form2 form = new Form2();
Graphics graphics = form.panel1.CreateGraphics();
graphics.Clear(System.Drawing.SystemColors.Control);
Font drawFont = new Font("Arial", 10);
SolidBrush drawBrush = new SolidBrush(Color.Red);
Pen pen = new Pen(drawBrush);
form.Show();
graphics.DrawLine(pen, 0, 0, 100, 100);
}
|
|
|
|
|
Thank you very much!But when I move the Form2,the line disappear.
|
|
|
|
|
That is because the form gets damaged. You have to redraw the line each time the form gets damaged.
|
|
|
|
|
You're confusing the concept of "drawing a line" with "creating a static line control". Drawing is done in response to a paint message by Windows. The call to form.Dialog() causes the instance of Form2 to repaint itself. Since the form doesn't contain a red panel with a red line, it isn't shown when the form is displayed.
/ravi
|
|
|
|