|
No. CrystalReport is only for showing and printing. It isn't design to use Textbox or any control that has user input. In design view, you only see on how this invoice or other type of report would look.
|
|
|
|
|
but i have designed a invoice windows form how can i convert it into crystal report?is this possible?i want my windows form to be printed in actual printing document.
|
|
|
|
|
sudhir behera wrote: i want my windows form to be printed in actual printing document.
You want to actually print a Screen shot of that form?
For how to use Crystal Reports:
Googl is your friend[^]
|
|
|
|
|
Hi,
I have upgraded remedy system to 7.1 and I have developed a .Net C# application which retrieves the data from the remedy database pertaining to my company. I am able to retrieve the data for a query which retrives a single record only. For queries supposed to be returning multiple rows, data is not fetched and an ODBC exception is thrown with native code 9055. I searched and found a ARS error document . Below the description of error code 9055 in the document.
*******************
9055
Error
The VUI import file is in an incorrect format.
No VUI definition from the file was retrieved during the import operation. The format of the
import file was corrupted so that it contains no VUI information.
*******************
No idea what does this mean.
Additional information regarding the exception.
Native error: 9055
Message: [AR System ODBC Driver]Data types are not appropriate for relational operation
Source: ARODBC70.DLL
SQL State: S000
BMC error reference document provides some explanation to the above message
313
Error
Data types are not appropriate for relational operation.
The data types of the fields used in a relational operation are not consistent with the operations
allowed for that operation. See the Form and Application Objects guide for information about the
allowed data types of operations.
If we have a problem with the datatyes, how we are able to fetch a single record and not the multiple records.
All was working with Remedy 6.0 and there were some changes with the database and I started to get these errors. How can I overcome this and fetch the data.
I am able to open the connection successfully.
KINDLY TREAT IT AS URGENT and any guidance to this is highly appreciated.
- Rags1512
Reference CODE:
OdbcDataAdapter odbcAdapter = new OdbcDataAdapter(query, connection);
DataSet ds = new DataSet();
try
{
int recordCount = odbcAdapter.Fill(ds);
}
catch (OdbcException oexp)
{
}Praveen Raghuvanshi
Software Engineer,
India.
|
|
|
|
|
I've looked and haven't found anything about this anywhere, so before I write an article about my solution, I thought I'd ask here.
The FileSystemWatcher supports one or more NotifyFilters when watching for changes to a folder/file. However, if you have more than one NotifyFilter specified, there is apparently no way (at least with a single FileSystemWatcher ) to determine *exactly* what change occurred that caused the Changed event to be posted.
Am I correct, or am I just not seeing it?.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Apologies for lack of formatting, doing this from my phone.
The NotifyFilters enum is decorated with the [flags] attributed. This means the enum can be treated as a bitwise flag. You can and and or such enumerations.
It's serendipidous that I can answer this, I had an interview where the asked about such enumerations. I tanked on that part, but wouldn't now!Antoine de Saint-Exupery: Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
|
|
|
|
|
It's not about the enums, it's about determining exactly what change took place to trigger the Changed event..45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
No, there's no standard way to see what exactly has been changed in the file (for example). Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
|
|
|
|
|
Actually that's a good thing, because I haven't been able to find a way without excessive coding..45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
I just found this on MSDN.
private static void OnChanged(object source, FileSystemEventArgs e)<br />
{<br />
Console.WriteLine("File: " + e.FullPath + " " + e.ChangeType);<br />
}
Does the e.ChangeType give any useful information to determine exactly what change occured?Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
Nope. It returns what I refer to as the "bulk" Changed event (or Renamed , Created , Deleted , etc)..45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Sentence like this
_toolTip.SetToolTip(toolStripBtnAbout, "About window");
caused error "cannot convert argument 1 from ToolStripButton to Control"
|
|
|
|
|
|
Message Closed
modified 23-Nov-14 6:47am.
|
|
|
|
|
thanks to all.
everithing works.
code looks like this:
public void TranslateForm(Control control, ToolTip toolTip)
{
string textProperty = null;
Type formType = control.GetType();
ResourceManager res = new ResourceManager(formType);
RecurControls(control, res, toolTip);
FieldInfo[] formFields = formType.GetFields(BindingFlags.NonPublic | BindingFlags.DeclaredOnly | BindingFlags.Instance);
foreach (FieldInfo fieldInfo in formFields)
{
// некий код, задающий локализацию для ToolTip'ов
object field = fieldInfo.GetValue(control);
PropertyInfo propertyInfo = fieldInfo.FieldType.GetProperty("Text");
//Нет свойства Text
if (propertyInfo != null)
{
//Проверка на Menu
if (field is Menu)
{
Menu menu = (Menu)fieldInfo.GetValue(control);
foreach (MenuItem item in menu.MenuItems)
{
foreach (FieldInfo innerFieldInfo in formFields)
if (innerFieldInfo.FieldType == typeof(MenuItem) && innerFieldInfo.GetValue(control) == item)
{
string resourceText = (string)res.GetObject(innerFieldInfo.Name + ".Text");
item.Text = resourceText;
break;
}
}
}
try
{
if ((fieldInfo.Name != "tbDjvuPageNumber")
&& (fieldInfo.Name != "lblDjvuPagesCount"))
{
textProperty = (string)res.GetObject(fieldInfo.Name + '.' + propertyInfo.Name);
if (textProperty != null && textProperty != "" && field != null)
propertyInfo.SetValue(field, textProperty, null);
}
}
catch { }
propertyInfo = fieldInfo.FieldType.GetProperty("ToolTipText");
if (propertyInfo != null)
{
try
{
textProperty = (string)res.GetObject(fieldInfo.Name + '.' + propertyInfo.Name);
if (textProperty != null && textProperty != "" && field != null)
propertyInfo.SetValue(field, textProperty, null);
}
catch { }
}
}
}
if (control is Import)
control.Text = (string)res.GetObject("$this.Text");
}
private void RecurControls(System.Windows.Forms.Control parent, System.Resources.ResourceManager resources, System.Windows.Forms.ToolTip toolTip)
{
foreach (Control control in parent.Controls)
{
string toolTipText;
control.SuspendLayout();
try
{
toolTipText = (string)resources.GetObject(control.Name + ".ToolTip");
if (toolTipText != null && toolTipText != "")
toolTip.SetToolTip(control, toolTipText);
}
catch
{
}
if (control.Controls.Count > 0)
RecurControls(control, resources, toolTip);
control.ResumeLayout();
}
}
|
|
|
|
|
Hi All,
I am having the error message "Inheritance.TeamManagement.salary is inaccessible due to its protection level" when I build my program. I have done some research into this problem and some of the articles I was reading say that the problem could be caused by the constructor having been declared as private instead of public. I did not declare my constructor as private so I really don't know what to do now. The following is a snippet of code from my program. Please take a look and help point out what I am doing wrong.
using System;
using System.Collections.Generic;
using System.Text;
namespace Inheritance
{
public class TeamManagement
{
private string name;
private double salary;
public TeamManagement(string nameVal, double salaryVal)
{
name = nameVal;
salary = salaryVal;
}
public string ToString()
{
return "TeamManagement[name=" + name + ",salary=" + salary + "]";
}
}
}
namespace Inheritance
{
public class Executive:TeamManagement
{
private string role;
public Executive(string nameVal, double salary, string roleVal):base( nameVal, salaryVal)
{
role = roleVal;
}
public
string ToString()
{
return "Executive[name=" + name + ",salary=" + salary + "]";
}
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Inheritance
{
public class Owner:Executive
{
public Owner(string nameVal, double salary, string roleVal):base( nameVal, salaryVal,roleVal)
{
}
public
string ToString()
{
return "Owner[name=" + name + ",salary=" + salary + "]";
}
}
}modified on Friday, February 12, 2010 11:06 PM
|
|
|
|
|
ASPnoob wrote: private double salary;
private fields can only be accessed in the class where they are defined.Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
|
|
|
|
|
Hi thanks for replying,
However your reply is helping as that is not the cause of my problem. I have stated that according to what I have read relating to this problem, the cause of the error message I am receiving is due to declaring a constructor as private. That is not how I declared my constructors, all of them is public as you can see.
|
|
|
|
|
ASPnoob wrote: not the cause of my problem
No that is not the cause of your problem. Your error stated: "TeamManagement.salary is inaccessible due to its protection level" which means that the field "salary" is inaccessible due to its access level. Has nothing to do with your constructor declaration. That is just a cause.Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
|
|
|
|
|
The fields name and salary are private which is as it should be. If you want these to be accessible to inheriting classes then you have a couple of choices.
1 Change the fields access modifiers - this is not recommended however! You could use (from least bad to worst)
protected - they will only be visible to TeamManagement and classes derrived from it.
internal - they will be visible to all classes in the assembly.
public - they will be visible to everyone.
2. Expose them via a property. I've rewritten your code below that way, and made a couple of other changes to make it more usable.
namespace Inheritance
{
public enum TeamManagementType
{
TeamManagement = 0,
Executive = 1,
Owner = 2,
}
public class TeamManagement
{
private string name;
private double salary;
private TeamManagementType teamManagementType;
public TeamManagement(string name, double salary)
: this(name, salary, TeamManagementType.TeamManagement)
{ }
internal TeamManagement(string name, double salary, TeamManagementType teamManagementType)
{
this.name = name;
this.salary = salary;
this.teamManagementType = teamManagementType;
}
public string Name
{
get { return name; }
}
public double Salary
{
get { return salary; }
}
public override string ToString()
{
return string.Format("{0}[{1}, {2}]", teamManagementType, name, salary);
}
}
public class Executive : TeamManagement
{
private string role;
public Executive(string name, double salary, string role)
: this(name, salary, role, TeamManagementType.Executive)
{ }
internal Executive(string name, double salary, string role, TeamManagementType teamManagementType)
: base(name, salary, teamManagementType)
{
this.role = role;
}
public string Role
{
get { return role; }
}
}
public class Owner : Executive
{
public Owner(string name, double salary, string role)
: base(name, salary, role, TeamManagementType.Owner)
{ }
}
} Notice by using the changes I have amde, the base ToString method hasn't needed to be rewritten in the derived classes so the properties haven't actually been needed as yet, but I've included them as no doubt they will be later.
|
|
|
|
|
I'm not going to read unformatted code, you should use PRE tags when publishing some code.
My suggestion is you rely on line nmbers to discover which line is not acceptable. Exceptions, compiler errors, and IDE editors all are capable of providing line number information.
My guess is you have a private field that needs to be protected so a derived class can access it.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.
|
|
|
|
|
Hi
Anyone know how to call a .aspx web-form from Microsoft CRM 4?
When I resolve a Case in MS CRM 4 I want to run a .aspx web-form. Anyone knows if this can be done in a workflow?
Regards,
Henrik
|
|
|
|
|
It's said that information stored in ttf files are strokes in bezier format.
How to extract such information? i.e., what's the details in a ttf file?
Thanks!
|
|
|
|
|
Reading the documentation[^] usually helps..
Be careful though, they use "long" for "int32", which these days is really an odd thing to do IMO
Some information about what to do with the information in the ttf file is here: digitizing letterform designs[^]
|
|
|
|
|
Hi
I am creating a windows service which is using timers. I know I shouldn't use something like DispatcherTimer or Forms.Timer. The problem with other timers(like System.Timers.Timer or System.Threading.Timer) is that its events are raised in background threads. I tried to use the System.Threading.Timer and than use Dispatcher.CurrentDispatcher to marshal the event to the thread that created the timer but this did not work ok. I am asking the following:
Can I use Dispatcher.CurrentDispatcher and Dispatcher.Invoke in windows service app. ?
If not, can somebody direct me in the right way to solve my problem?
Any advice will be appreciated,
Uros
|
|
|
|
|