|
Make formula field then show this field in detail section.
|
|
|
|
|
Hi,
i really dont understand what you are asking but i assume that you want to display data (varchar,int,image,etc) from the database to crystal reports, right? OK.
- Add a report and a dataset to your solution
- design the dataset to fit 100% the store_procedure you are triggering, meaning if you have "select first_name 'FN',last_name 'LN' ..." them datatable fields as to be named FN and LN, and have same type!!!
- select the dataset as your datasource, and them drag fields to the report
- after that is easy, keep doing like it was a datagridview
DataGridView_Report.DataSource = dt;
CrystalReport_ConstructorStandings rpt = new CrystalReport_ConstructorStandings();
rpt.SetDataSource(dt);
CrystalReportViewer_Report.ReportSource = rpt;
Only beware of the image formats that are not allowed in crystal reports
(Can´t help you more, but, if you want to ask something related to this go my profile)
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
hello,
i need help me please, i make a object treeview mix combobox, i explain. i search how catch the childnode's location to aligne the combobox.
|
|
|
|
|
Hi,
I have created an array like this:
string[] arrNames = new string[6];
arrNames[0] = "x";
arrNames[1] = "c";
arrNames[2] = "v";
arrNames[3] = "b";
arrNames[4] = "n";
arrNames[5] = "m";
Without using a for loop, how can I check if my string i.e. strMyString = "b"
is in one of the array list ?
Is there something like:
if (arrNames[].indexOf("b") > 0)
{
string sFound = "found a match";
}
else
{
string sNotFound = "No match";
}
Thanks
|
|
|
|
|
Why don't you use MSDN or Google to is if there is a method called IndexOf() and if there is then which classes have it?
|
|
|
|
|
arkiboys wrote: Without using a for loop, how can I check if my string i.e. strMyString = "b"
is in one of the array list ?
Strictly speaking, you can't with an array, but you can simulate what you're trying to achieve using LINQ.
string[] arrNames = new string[6];
arrNames[0] = "x";
arrNames[1] = "c";
arrNames[2] = "v";
arrNames[3] = "b";
arrNames[4] = "n";
arrNames[5] = "m";
bool isFound = (from p in arrNames
where p == "b"
select true).SingleOrDefault();
|
|
|
|
|
Pete O'Hanlon wrote: Strictly speaking, you can't with an array
Im pretty sure you can, as mentioned just below.
|
|
|
|
|
I was carefully using the term "strictly" because the operation uses the class Array, and is not a method on the array itself. Pedantic, I know, but I'm nothing if not pedantic.
|
|
|
|
|
The actual string array does not have an IndexOf method, but the Array class has a static (and generic) IndexOf method.
string[] foo = new string[] { "a", "b", "c" };
int index = Array.IndexOf<string>(foo,"b");
|
|
|
|
|
string[] arrNames = new string[] {"a", "b", "c", "d", "e", "f"};
string status = (arrNames.Contains("b")) ? "Found" : "Not Found";
"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." - Jason Jystad, 10/26/2001
|
|
|
|
|
Ew, that smells of Extension Method.
|
|
|
|
|
I don't know if it is or not, but it fits his requirements of finding out if "b" is in the array without using a loop.
"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." - Jason Jystad, 10/26/2001
modified on Wednesday, October 15, 2008 9:13 AM
|
|
|
|
|
Array.IndexOf(arrNames, "b") will give the index or -1 if its not there
((System.Collections.IList)arrNames).Contains("b") will give a true or false
Chas
|
|
|
|
|
bool found = Array.Exists(arrNames, s => s == "b");
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - coming soon ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
Hello
I have a requirement that I need to show the vacaation plans of the Employees in the form of Gannt Chart. For that i need to implment custom calendar which can show different kinds of views like Monthly,weekly etc.
Can any body suggest good design for this in developing the user control, If any body know free custom calendar available already, kindly let me know.
Best Regards
Shankar
|
|
|
|
|
I am not aware of any free third-party controls that you could use. However, this sounds like it could be a VSTO project that integrates into MS Outlook 2007 (or 2003 if you haven't upgraded yet). Then you have the full capabilities of Outlook while still allowing your own custom logic and information.
Unfortunately I can only suggest this, I have not worked with VSTO so I would be unable to suggest anything more. Hopefully this leads you in the right direction though.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
I have a DataSet table column which I wish to populate with the value from a databound combobox
So far my thoughts have been along the lines of:
DataRowView debtor = (DataRowView)BindingContext[debtorDataSet, debtor"].Current;<br />
DataRowView keyEvent = (DataRowView)BindingContext[debtorDataSet, "DebtorKeyEvents"].Current;<br />
keyEvent["KeyEventCode"] = ((DataRowView)this.KeyEventTypeComboBox.SelectedValue).Row[this.KeyEventTypeComboBox.ValueMember];
but, without success.
Whare am I going wrong please?
|
|
|
|
|
I figured it out and used:
DataRow dr;
dr["KeyEventCode"] = this.KeyEventTypeComboBox.SelectedValue;
|
|
|
|
|
Hi,
I am using NHibernate to persist my objects. To delete an object from DB I have written the below code : I have checked my DB too and it has records.
public void Delete<T>(T item)
{
try
{
using (ISession session = factory.OpenSession())
{
using (session.BeginTransaction())
{
session.Delete(item);
<b>session.Transaction.Commit();</b> //Code is breaking here.
}
}
}
catch (Exception e)
{
System.Windows.Forms.MessageBox.Show(e.Message);
System.Windows.Forms.MessageBox.Show(e.StackTrace);
}
}
The code is breaking at line session.transaction.commit(); with following error message
"Unexpected row count: 0; expected: 1"
Please let me know how to fix this.
Thanks in Advance
Regards
Puneet
|
|
|
|
|
Hi,
long time that I did something with hibernate, but I think the problem is, that the item you want to delete is associated with another session. Try to refresh the item with the new session before you delete it (this is not the best way to do this, it is just a quick-and-dirty solution).
...
session.Refresh(item);
session.Delete(item);
...
Please let me know if this fixed your problem.
Regards
Sebastian
|
|
|
|
|
Dear all,
I'm using two web browsers one has a url to a document the other edits one of the first browser element then I replace the inner html of that element by the edited one the problen is that when replacing the inner html the path of the images changes to be the full image path instead of being like this "../images/Logo.gif" although this is the form of the path in the second browser.
I want to know how can I keep the path in the short mode between the replace operation?
Thanks.
Dad
|
|
|
|
|
Hi Guys,
I am very new to Log4Net. I need to log some logging statement in SQL Server DB. How to add the logging stmt programmatically?
I google it out for few sample, but didn't find, wht I want.
Plz help out.
Thanks,
Chintan(India)
|
|
|
|
|
|
Hi
How do you link a treeview and a list view so that when i click on the treeview it will display what node i have clicked on the List View?
Does any one Know how to do this ?
Please Help ME
|
|
|
|
|