I am developing a printable report with c#.net and crystal reports 11.The stationary used is a pre-printed one and the paper size is not among the predefined ones by Windows.When i tested the print by running the application in my machine to a network connected printer(dot matrix), it was ok.But at the client site the application was run in the server which has windows 2008, through remote desktop connection and the printer was connected to the local machine.here the print becomes hazy and also it can not take the custom paper size which i defined.
can anyone help me in this matter ? This has been a serious problem for me.Actually printing on a pre-printed stationary by a dot matrix printer has always created problem for me when the paper size is customized.
Bechir BejaouiPosted Dec 21, 2008, 10:14 AM
The best one is using the Late binding technique by invoking your methods via reflection
Type myType = Type.GetType("the complete name of your type here");
Object obj = Activator.CreateInstance(myType);
// The parameters
int ArgumentNumber = 0;//put here the number of arguments
Type[] paramTypes = new Type[ArgumentNumber];
paramTypes[0]= Type.GetType("System.String for example");
.
.
.
paramTypes[ArgumentNumber-1]= Type.GetType("type here");
//Get the method going to be used
// Get the method
MethodInfo methodInfo = myType.GetMethod("method name here",paramTypes);
// set of parameters
Object[] parameters = new Object[ArgumentNumber];
parameters[0] = "sdsd";
.
.
.
parameters[ArgumentNumber-1]="vccvcvv";
Object returnVal = methodInfo.Invoke(obj,parameters);
This will increate the performance of your application