|
Best regards to all C# coders...
Plz I need your help in getting the right code snippet on how i can instantiate, set parameters and finalize a crystal report at runtime, in which the user has to define the parameters or what he wanna see in the report!
By the way, i guess i know how to set parameters and stuff, but i only need to know how to set and instantiate a crystal report programmaticaly.
Your help is much appreciated!
Knowledge Is KinG
|
|
|
|
|
Hi all,
I have a window service and I want to call it's methods by web service.But during calling it's method the service shows an error " The underlying connection was closed: Unable to connect to the remote server ".
I have created a setup of this window service which is I am calling through ServiceController in a web service.
I have checked all connections which are working properly.Please help me to solve this problem .If you can give an idea about how to call window service methods by web service then that will be appriceable.
Thanks in advance
Regards & Thanks
Sunil
|
|
|
|
|
Hi
how can i assign a list dynamically to the toolbar having style = "DropDownButton"
sAqIb
|
|
|
|
|
ToolBarButton b = new ToolBarButton();
b.Style = ToolBarButtonStyle.DropDownButton;
toolBar1.Buttons.Add(b);
"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." - Rick Cook www.troschuetz.de
|
|
|
|
|
Thanks Stefan. I am using almost the same code to create and add toolbar buttons. But the questions was, how can i add a dynamic list to the above created toolbarbutton 'b'. (Suppose i am getting some values from a file and those values are supposed to be changed).
sAqIb
|
|
|
|
|
I'm not sure how this an be accomplished as I've never worked with ToolBar. Documentation of the ToolBarButtonStyle enumeration indicates that the code should follow this easy example:
MenuItem menuItem1 = new MenuItem("Print");
ContextMenu contextMenu1 = new ContextMenu(new MenuItem[]{menuItem1});
ToolBarButton b = new ToolBarButton ();
b.DropDownMenu = contextMenu1;
You'll have to create some more MenuItems and use the file values as text.
"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." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hi,
I have a form in my application on which a DataGrid and a tree view are present. The contents of the TreeView change with the change of the Row number of the grid. When i open the form for the first time, every thing is ok. When i close the form and then reopen it without closing my application, then the problem starts. On load, every thing goes fine, but when i select a different row, it gives exception with the message, ' Can't access disposed off object. Object name: TreeView'.' After this message the contents of the TreeView change accurately.
I am not disposing the tree view. Even in debug mode, when i check the contents of the treeview, it shows its contents correctly. But as soon as the statement containing that treeview executes, the exception is raised.
Any help, suggetion please...
Wasif Ehsan.
|
|
|
|
|
Hi,
I am working on a window based project.....
I am using VS 1.0 version...
I need to create combobox in a datagrid...
Can u help...
If possible send the code snippet...
Thanks in advance...
Regards,
Vaishali
|
|
|
|
|
Hi,
Regarding ur prob here is the solution...
============================================
Public Class Form1
Inherits System.Windows.Forms.Form
'Declare objects required to connect to the database
Private mcnSQL As New SqlClient.SqlConnection("SERVER=(local); INTEGRATED SECURITY=SSPI; DATABASE=northwind")
Private mdaEmploye As New SqlClient.SqlDataAdapter("SELECT TitleOfCourtesy, FirstName, LastName, Title FROM Employees", mcnSQL)
Private mds As New DataSet()
'We will also need a combo - After all, this is what we want to do!
Private mctlCombo As New ComboBox()
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Connect the TextChanged event to a procedure
AddHandler mctlCombo.TextChanged, AddressOf Ctrls_TextChanged
'Fill ComboBox list.
With mctlCombo
.Name = "MyCombo"
.Visible = False
.Items.Clear()
.Items.Add("Sales Representative")
.Items.Add("Inside Sales Coordinator")
.Items.Add("Vice President, Sales")
.Items.Add("Sales Manager")
.Items.Add("Flunky")
End With
'Fill the dataset
mdaEmploye.Fill(mds, "Employees")
'Set the RowHeight of the DataGrid to the height of the ComboBox.
DataGrid1.PreferredRowHeight = mctlCombo.Height
'Give the data to the DataGrid
DataGrid1.DataSource = mds
DataGrid1.DataMember = "Employees"
'Add ComboBox to the Control collection of the DataGrid.
DataGrid1.Controls.Add(mctlCombo)
End Sub
Private Sub DataGrid1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles DataGrid1.Paint
'Set the width of the ComboBox to the Width of the cell
If DataGrid1.CurrentCell.ColumnNumber = 3 Then
mctlCombo.Width = DataGrid1.GetCurrentCellBounds.Width
End If
End Sub
Private Sub DataGrid1_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.CurrentCellChanged
'Display (or hide) the ComboBox
If DataGrid1.CurrentCell.ColumnNumber = 3 Then
With mctlCombo
.Visible = False
.Width = 0
.Left = DataGrid1.GetCurrentCellBounds.Left
.Top = DataGrid1.GetCurrentCellBounds.Top
.Text = DataGrid1.Item(DataGrid1.CurrentCell).ToString & ""
.Visible = True
End With
Else
HideComboBox(sender, e)
End If
End Sub
Private Sub HideComboBox(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.Scroll, DataGrid1.Click
'Hide the ComboBox when the grid is clicked or scrolled
mctlCombo.Visible = False
mctlCombo.Width = 0
End Sub
Private Sub Ctrls_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs)
'When the an item is selected, the grid must show this new value
If DataGrid1.CurrentCell.ColumnNumber = 3 Then
mctlCombo.Visible = False
If DataGrid1.Item(DataGrid1.CurrentCell).ToString & "" = "" Then SendKeys.Send("*")
DataGrid1.Item(DataGrid1.CurrentCell) = mctlCombo.Text
End If
End Sub
End Class
|
|
|
|
|
Sorry but i am working on C# .NET.....
can u help me in tht??
Thnaks.
Regards,
Vaishali
|
|
|
|
|
|
Hi
I have to implement a file upload progress bar while uploading the file to the server.
Can anyone please help !!!
Thanks in advance
|
|
|
|
|
I am using Visual Studio 2005 Professional Edition.
I have added a CrystalReport(.rpt) file to the project. I want to increase the width of this report at design. How can i do that?
Thanks.
|
|
|
|
|
Hi
I have a byte array[12].Iwant to convert it char or string and want to store in a char array.
How can i do this in c#.
for e.g
int bResult=fin.Read(m_pbytFileBuffer,0x0,0x50);//read 0x50 byte in buufer from file
for(bytSizeOfFolderName=1;m_pbytFileBuffer[bytSizeOfFolderName]!=0x00;bytSizeOfFolderName++)//calculate size of string
;
char []FolderName = new char[bytSizeOfFolderName+1];//dec char array
???????
Parshant
|
|
|
|
|
byte[] byteArray = new byte[12] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 };<br />
string byteArrayInString = Encoding.ASCII.GetString(byteArray);<br />
char[] byteArrayInCharArray = byteArrayInString.ToCharArray();
|
|
|
|
|
Parshant Verma wrote: Iwant to convert it char
You can use following:
Array.Copy(<bytearray>,<chararray>, <no. of="" characters="" to="" copy="" from="" byte="" char="" array="">);
Regards,
Wasif Ehsan.
|
|
|
|
|
See here[^] maybe it is some helpful to you
|
|
|
|
|
what is view state in .net technology and importance of view state?
|
|
|
|
|
|
Hi,
I have a C#.net application. I have two C++ dlls with same name (but different version numbers that i see in the dll). When I use Dll Import to invoke methods on each dll separately in two different applications, all the methods in both the c++ dlls work fine.
But if i tend to use dll import and invoke the functions in the two dlls, the first dll's methods are executing fine but when the second dll's methods are invoked, there is an error stating "cannot load the second dll. method not found".
I wonder if it is something to do with loading two same named dlls in the same memory of an exe...
Please help in identifying the cause and kindly clarify my doubt.
Many Thanks.
|
|
|
|
|
Please don't cross post.
---
b { font-weight: normal; }
|
|
|
|
|
I am dealing with something related to .NET and C# and wonder about your comment. Hope you are clear in understanding my problem.
|
|
|
|
|
I am trying to use the Calculator in my win forms and i so i am trying to capture the Edit class from the Calculator ( The edit class is the textbox on the Calculator).
I am not able to figure this out..
I need some direction...
here is what i have so far...
----------------------------------------------
[DllImport("User32.dll")]
public static extern Int32 EnumChildWindows(IntPtr hWndParent, Delegate lpEnumFunc, int lParam);
-----------------------------------------------
public partial class Form1 : Form
{
delegate int CallBack(IntPtr hwnd, int iPram);
public Form1()
{
InitializeComponent();
}
private Process _Process = null;
private void button1_Click(object sender, EventArgs e)
{
this._Process = Process.Start("calc");
CallBack callback = new CallBack(EnumChildGetValue);
Win32Functions.EnumChildWindows(this._Process.Handle, callback, 0);
}
public int EnumChildGetValue(IntPtr hWnd, int lParam)
{
int txtValue;
string editText = "";
StringBuilder className = new StringBuilder(256);
txtValue = Win32Functions.GetClassName(hWnd, className, 256);
editText = className.ToString().Trim();
return 1;
}
}
in the callback i am tring to locate the different class howver this is not working correctly..
erik
|
|
|
|
|
does anyone have a tab control derived user control class which display like office 2003 shared workspace's style?
Very thanks!
jacklin
|
|
|
|
|
Hi all,
After installing google notebook, a button will be added to the right-bottom of ie. Does anybody know how to implement that?
Very appreciate for any reply.
Jie
|
|
|
|