|
Hi All!!
i want to to create crystal report at run time and set all its properties like texts,sections etc. but i am not getting the way to get in. it has many classes like
ReportObject
ReportClass
ReportDefinition
ReportDocumnet
but this is confusting that how to take start...
i want to do like this (this is just assumption)
CrystalReport report = new CrystalReport();<br />
Section section = new Section();<br />
report.Secctions.Add(section);
can anyone help??
sorry for my bad English.
|
|
|
|
|
Hi, I have a problem with drag and drop: every sample about it i have found shows only how to drag a text from a textbox to another or a listview/treeview item to another. Instead, I have some controls (some shapes) and i need to allow to the user to drag them over the form like the visual studio IDE, with the resizing handles, the drawing of the dragged control's border, etc... exactly how the IDE! Can anyone help me, showing some samples (in vb.net or c#)?
|
|
|
|
|
May be a good starting point[^].
|
|
|
|
|
Ok, so I have this app that you fill in your subject and then the message and then it formats it in the particular way i told it to, onto my webserver as a .xml file....
XmlTextWriter writer = new XmlTextWriter("poofacedjohn.xml", null);
But, what I need is for the name of the xml file not to be poofacedjohn.xml, but rather the year, month, day, hour, and minute of the local machine...
like.....
20030426_1718.xml
2003 04 26 17 18
|year||month||day|_|hour||minute|
how would I acheive this...? I can do it in asp.net, but it's not working for me as just a regular windows app.
/\ |_ E X E GG
|
|
|
|
|
String szfilename = System.DateTime.Now.ToString("yyyyMMdd_HHmm") + ".xml";
|
|
|
|
|
My C# app has a RichTextBox which is using a right-click context menu. How can I add icons next to the text in the menu?
I found a few places that said they had add-ins to do this, but I'd rather just understand how it works to do it myself.
Can anybody explain it, or point to a resource which explains it?
Thanks.
There are only 10 types of people in this world....those that understand binary, and those that do not.
|
|
|
|
|
Windows Forms (at least in .NET 1.0) does not allow that. You'll need to use a library such as Lutz Roeder's CommandBar for .NET[^].
Cheers,
Arun
|
|
|
|
|
How can I access MySQL from C# without using stuff that I have to configure outside of my program? (The tutorials I see require me to configure ODBC for example)
I want to be able to just enter the address in my program and connect to it, but I see no easy functions like mysql_connect() or so...
|
|
|
|
|
SourceForge.net has a project that is developing a managed MySql provider.
|
|
|
|
|
I've looked everywhere to try and find out how to print decent images.
I've used a few programs which seem to be programmed in Delphi, and have asked the programmers if they do anything special when loading or printing and the answer is NO.
So why can't I get the same quality printing when using C#, the images are the right size from the start, so I just shove them into the printpage and fire them out to the printer.
The program is for printing CD covers, and the text etc is just not sharp.
Can anyone Please help, I'm a newbie and at a total loss at where to loko next.
|
|
|
|
|
I've been wondering whether VS.NET 2002 projects will work in VS.NET 2003. Will it need to go through some kind of a conversion process or something like that?
|
|
|
|
|
I think it's best to just open your 2002 projects in 2003 and recompile them... I found that Microsoft didn't change much of their methods' parameters or functions, just added some new stuff to the .NET framework...
|
|
|
|
|
The .csproj file format is upgraded, and VC#.NET 2K3 will automatically prompt when you open a C# 2K2 project.
|
|
|
|
|
VB.NET and C# projects will go fine. The only trouble will be with C++ projects, because there were some language changes, but not a big deal.
My latest article: GBVB - Converting VB.NET code to C#
|
|
|
|
|
We know the default TCP/IP port of SQL Server 2000 is 1433.
I can connect to DB from remote using SQLConnection class. But when the default port is changed, I couldn't.
How can I connect to DB with different TCP/IP port?
|
|
|
|
|
Hi mkomasi,
I have'nt tried much on SQL Server. Although, you may like to try http://www.connectionstrings.com/[^] for a variant of ConnectionString that can faciliate connecting to a different port. Alternatively, does OLEDB allow that? A suitable connectionstring should help you there too? Try that URL.
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
The content of the textbox is a pathname.
I want to change the path and then press
"save as default" -> now the default path
should be the new one (even after restarting)
Is this possible?
thanks and regards
markus
|
|
|
|
|
Yes, search on "Dynamic Properties", you can bound the Text property of your TextBox to a config file.
Hope this helps.
Andres Manggini.
Buenos Aires - Argentina.
|
|
|
|
|
yes that seems to work
but when i try to save the new path i get an exception:
"Collection is Read Only"
my code:
private void button1_Click(object sender, System.EventArgs e)
{
Configuration.ConfigurationSettings.AppSettings.Set
("textBox1.Text", newPath);
}
thanks and best regards
|
|
|
|
|
Hi all...I'm writing a small program (learning C#....yes I'm a beginner). I am using the RichTextBox control that the users can enter or paste in some text. Then afterward, I want to go through that text in the control character by character and be able to determine each characters font style, size, etc.....
Can anyone point me in the right direction for that? I was able to set fonts, etc... correctly (giving them a context menu to do a few things), when its all said and done I want to parse the style, character by character.
Help Please! Small example, or web page example, or even a pointer as to what methods to start with would be helpful.
Thanks.
There are only 10 types of people in this world....those that understand binary, and those that do not.
|
|
|
|
|
For finer control over richtext, you can serialize the contents to a file or string and then parse it individually using the RT file format, you can get the format from wotsit[^]
- Kannan
|
|
|
|
|
I have a weblog thing I made in C#, ASP.NET, it works fine and everthing and stores each entry into and .xml file. Now usually I edit and make new entrys though internet explorer, but then I though how cool would it be to make an application in C# to take the .xml file edit it in the program, then click the save button and have it update the .xml!
Does anybody have any tips or places to look, for help on this???
/\ |_ E X E GG
|
|
|
|
|
|
Thanks for the effort, but that's not what I really wanted... dont' worry about it....
/\ |_ E X E GG
|
|
|
|
|
...
Prepare for confusion, but please help.
I have a plugin framework, using reflection.
This works brilliantly and I will release the code eventually. However, one of the plugins is calling an async callback. This throws an invokation exception:
Cannot load type GoogleSearch.GoogleSearchForm, GoogleSearch, Version=1.0.1212.26393, Culture=neutral,<br> PublicKeyToken=null. at System.Runtime.Remoting.Messaging.MethodCall.ResolveMethod(Boolean bThrowIfNotResolved)
at System.Runtime.Remoting.Messaging.MethodCall.ResolveMethod()
at System.Runtime.Remoting.Messaging.MethodCall..ctor(IMessage msg, Boolean needAccessCheck)
at System.Runtime.Remoting.Proxies.AgileAsyncWorkerItem..ctor(IMethodCallMessage message, AsyncResult ar, Object target)
at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
at GoogleSearch.SearchDelegate.BeginInvoke(String url, String& result, AsyncCallback callback, Object object)
at GoogleSearch.GoogleSearchForm.search_Click(Object sender, EventArgs e) <br>in c:\documents and settings\administrator.jonny\my documents\visual studio projects\screenmate\googlesearch\google.cs:line 219
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods<br>+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.RunDialog(Form form)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at System.Windows.Forms.Form.ShowDialog()
at GoogleSearch.GooglePlugin.LoadGoogleForm()<br> in c:\documents and settings\administrator.jonny\my documents\visual studio projects\screenmate\googlesearch\google.cs:line 36
Now, let me tell you how the app works. The main app gets methods via reflection. And in the end get to this point:
object o = Activator.CreateInstance(t);
MethodInfo mi2 = t.GetMethod("AcceptRect");
Rectangle rect = new Rectangle(this.Location,this.Size);
mi2.Invoke(o,new object[]{rect});
Now that works fine on all plugins, including the troublesome one.
Now in the plugin class, there is a call to another class in the plugin dll. One based on a windows form. The form loads ok.
A button on the form starts an async callback to process some data. NOW THIS DOESN'T WORK.
GoogleSearch.GoogleSearchForm gs = new GoogleSearch.GoogleSearchForm(this.bob);
gs.ShowDialog();
The above opens the form. (This is all within the same dll and namespace)
SearchDelegate search = new SearchDelegate(this.Search);
string result;
search.BeginInvoke(url, out result, new AsyncCallback(this.AnnounceSearch),search);
public delegate string SearchDelegate(string url, out string result);
public string Search(string url, out string result)
{
ArrayList ar = new ArrayList();
Uri uri = new Uri(url);
WebRequest wr = WebRequest.Create(uri);
WebResponse resp = wr.GetResponse();
Stream s = resp.GetResponseStream();
StreamReader sr = new StreamReader(s);
string t = sr.ReadToEnd();
sr.Close();
return (result = t);
}
public void AnnounceSearch(IAsyncResult iar)
{
SearchDelegate search = (SearchDelegate)iar.AsyncState;
string result;
search.EndInvoke(out result, iar);
this.panel1.Controls.Clear();
MakeControlsDelegate del = new MakeControlsDelegate(MakeControls);
this.Invoke(del,new object[]{result});
}
public delegate void MakeControlsDelegate(string t);
public void MakeControls(string t)
{
ArrayList gr = this.ParseGoogle(t);
foreach(LinkLabel ll in gr)
{
this.panel1.Controls.Add(ll);
}
Ok, I think thats everything now...
Anyway, the above code WORKED PERFECTLY when it was not a plugin and was just a compile time dll.
The only thing i've changed is the fact that the form is being run from a late-binding dll.
"If you just say porn then you get all manner of chaff and low grade stuff." - Paul Watson, Lounge 25 Mar 03 "If a man is standing in the middle of the forest speaking and there is no woman around to hear him, is he still wrong?" - Anon
Jonathan 'nonny' Newman
Homepage [www.nonny.com] [^]
|
|
|
|
|