|
hello sir,
in a visual c# project iam using typed dataset
when i want to show data in a report using recordselectionformula it displays only feild name .Please help me
monu
getting started
|
|
|
|
|
It would help if you post the code part where it goes wrong.
|
|
|
|
|
my code are
SqlConnection cn=new SqlConnection(ConfigurationSettings.AppSettings["con"]);
SqlDataAdapter ad=new SqlDataAdapter("select * from printfees ",cn);
fees dt=new fees();
//fees is the name of typed dataset
ad.Fill(dt);
CrystalReport2 crv1=new CrystalReport2();
crv1.SetDataSource(dt);
crv1.RecordSelectionFormula="{printfees.registrationnumber}= '"+txtregistration.Text+"' ";//and {printfees.feesofmonth}='"+txtmonth.Text+"' and {printfees.session}='"+txtsession.Text+"' ";
CrystalReportViewer1.ReportSource = crv1;
|
|
|
|
|
Still not quite understanding what is your problem.
By the way, it is better to filter data that only you need first in your SQL, rather than pull ALL data into a dataset then pass ALL the data to Crystal Report to let Crystal Report filter the data.
|
|
|
|
|
there is any build in control for wordpad lie in c#
|
|
|
|
|
Please stop posting questions regarding the same thing. One post is enough.
Virtual1ty
"Any fool can learn from his own mistakes, but a wise man learns from mistakes of others"
|
|
|
|
|
If you post 2 more questions of this quality in the next 10 minutes you get a prize!
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|
|
Don't encourage him...he might take you seriously!
|
|
|
|
|
|
Please don't post your question 3 times.
|
|
|
|
|
You can't. Wordpad is just a simple throwaway app that reads most of a Word doc. Word is an application that has full suppor for external control.
As someone else said, ask your question once, not three times.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Don't keep asking the same question over and over again. It really irritates people...
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
can word pad is better than word in c# .i need those which become not complex and easily handle.which application i perfer
|
|
|
|
|
hmm difficult, you totally lost me here. Can you reformulate your question so we (or at least I) can understand it.
Thanks.
|
|
|
|
|
i use ms word in my c# application how i use it
|
|
|
|
|
|
Learn English a bit better. Your past two posts are poorly constructed and make no sense. You cannot use MS Word inside of your C# app (embedded in it if that is what you are trying to do). You can, however, use Microsoft Interop classes to bridge with Word.
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
how i can take an array with it's value from form to another
and i need to use this array after closing the form.
Assaf
|
|
|
|
|
Do you mean that u have a form with few TextBoxes and you want to save values in these TextBoxes in an array?
Try this then:
string[] arr = new string[numberOfTextBoxes];
arr[0] = textBox1.Text;
arr[1] = textBox2.Text;
or, if you load TextBoxes dynamically:
List%lt;string> lst = new List<string>();
foreach(Control c in this.Controls)
{
if (c is TextBox)
lst.Add(c.Text);
}
string[] arr = lst.ToArray();
Greetings - Gajatko
Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.
|
|
|
|
|
I have the array with value, i want to pass the whole array from this form to another form and close this one?
Thanks in advance
Assaf
|
|
|
|
|
An example:
you declare an array in form1
Public Static String[] arr = new String[100];
And in form2 you can do form1.arr[1] = "";
See that an array uses a fixed size, if not desired, you'd might checking out ArrayList.
|
|
|
|
|
|
Close
1) It should not be static if it is related to the instance of the form (which it is given the example).
2) It should not be public as it is a field. Make a property instead.
3) ArrayList was something we used back in the old days, now we use ObservableCollection<t> or at least List<t>.
|
|
|
|
|
hehe
1) Yes correct, but if it is an object that is between those forms only it isn't so bad if it is static (shared in vb.net) you just need to keep your head with in updating the object
2) yes, totally true, better is to make it a property, maybe I gave to much a quick and dirty solution
3) I didn't know the ObservableCollection and I looked it up and it is for .NET 3.0 only. I am using ArrayList a lot and it is working great for me But maybe List is better because you have the sort things etc...
Thanks for the added value, I can learn from it ![Smile | :)](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
1) A lot of beginner in OO have problem with the difference between a class and an object. Hence it is a problem "mudding" the concept by using statics.
3) The main reason to use List<t> is not that it has sort etc (ArrayList has that as well). The reason is that it is strongly typed. Besides making the code a LOT easier to write (and read) it does offer some performance benefit on value type collections as well. It's not just the ArrayList that has been replaced - you have Dictionary<keytype, valuetype=""> instead of Hashtable etc.
The System.Collection.Generic still have on main problem: They do not raise events when changed... which pretty much means they are useless in a lot (if not most) cases, as you can't build a prober UI on them.
|
|
|
|