|
I need to call Business Object Reports from Windows C# application. It should invoke the BO using BO API from C# winform pass the login credential to the BO and invoke that report in windows application.
Does any one have idea how to achieve that or someone has already implemented this in their application.
thanks in advance
Share knowledge to enhance your learning
|
|
|
|
|
first design your report then add it to your project, add a CrystalReportViewer
rpt_cust rpt=new rpt_cust();
CrystalReportViewer1.ReportSource=rptcust;
CrystalReportViewer1.Refresh();
i hope that help
|
|
|
|
|
Hi Friends
I want to resize form slowly with timer control.
please notice below code :
<br />
Timer1.Interval=100;
Timer1.Enabled=true;<br />
<br />
private void Timer1_Tick()<br />
{<br />
if (Form1.Height <= 1000)<br />
Form1.Height += 50;<br />
}<br />
Now when i run the project, Form size change, but with flicks like seeng monitor on tv!!!
What should i do ?![D'Oh! | :doh:](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_doh.gif)
|
|
|
|
|
You should enable double buffering on your form. Click here to see how.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hi-
<br />
private void BuddyList_AfterSelect(object sender, TreeViewEventArgs e)<br />
{<br />
if (this.BuddyList.SelectedNode.Parent != null)
{<br />
this.BuddyList_User();<br />
}<br />
}<br />
<br />
private void menuItem3_Click(object sender, System.EventArgs e)<br />
{<br />
<br />
if (this.BuddyList.SelectedNode.Parent != null) <br />
{<br />
MessageBox.Show (this.BuddyList.SelectedNode.Text);<br />
}<br />
}<br />
In my menuItem3_Click event I cannot access the selected node of my treeview which is called BuddyList. It throws an object reference error: Object Reference not set to an instance of an object.
However in the function above that in a BuddyList (Treeview) event I access the SelectedNode with no problem and I am not sure why.
When the treeview is rightclick a context menu is display, then when a user selects an option from the context menu the event menuItem3_Click above, needs to check to make sure that the selected tree node is a root node and then display a message box.
Any ideas?
Thanks,
Jon Scalet
|
|
|
|
|
When the context menu is popping up, is it selecting/deselecting the currently selected node? That's my best guess.
If you need to, you can always cache the selected node in a class variable and just use that.
That said, always code defensively. Check for nulls before dereferencing them is always a good practice, especially when you cannot guarantee its not null.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Is Jesus the Jewish Messiah?
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
Here's whats happening a right click is not trigger the AfterSelect event in the treeview (hence there is no selected node) so you were right.
How would I trigger the After Selected with a right click?
Thanks,
Jon
|
|
|
|
|
You may need to create a class that inherits from the TreeView and code a public function ("RaiseAfterSelect", we'll say) that calls the OnAfterSelect protected method of the TreeView. Then when you want to raise the AfterSelect event, just call the RaiseAfterSelect method you just coded up.
Another way, of course, is to set the selected node of the treeview in code via treeView.SelectedNode = someNode;
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Is Jesus the Jewish Messiah?
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
how to embed a vedio file into a c# web form also a powerpoint into a c# web form
too important
walaa
|
|
|
|
|
You can embed video using a number of 3rd party libraries: Windows Media Player COM object, the Managed DirectShow libraries available on this site, and so on.
You can embed a PowerPoint presentation by adding a reference to the Microsoft Office PowerPoint COM object, I'd assume.
|
|
|
|
|
Hello all,
I wanted to run this by some other folks for a sanity check before I do it.
I have an application (written by a friend) that deals with a heirarchy of objects. Each of the objects in the heirarchy implements an interface called IValidation. IValidation exposes an event that indicates when the validation state of an object has changed, and also has a property called ValidationIssues, which is List<validationissue>. Each validation issue returned contains a description of the issue, the severity, and a reference to the object with the problem. I control this interface completely and it is not used anywhere else, so I can alter it as needed.
Currently, the application loads the object heirarchy into a treeview control on the left side of a form. Context menus in the treeview allow the addition and removal of items in the heirarchy. At the bottom of the form is a list box that contains a list of all the validation issues. The rest of the form is a property grid that allows you to edit the properties of the item selected in the treeview. Double-clicking on an item in the listbox will also bring up the associated object in the property grid.
When something happens that changes the validation state of any object in the heirarchy, an event is fired that works its way all the way back to the root of the heirarchy. The form listens for that event coming from the root object. When this occurs, the form pulls back the new list of validation issues, sorts it and binds it to the listbox.
Anyway, this approach is slowed (horribly) by a couple of problems:
1) The entire set of validation issues is rerun anytime something changes in any object in the heirarchy.
2) Each object's ValidationIssues property returns a List<validationissues>. If an object contains child objects, then the validation issues from those objects are added to the list returned using AddRange.
I was thinking of doing a few things to speed this up:
1) Caching. Each object should maintain its list of validation issues, instead of requiring them to be regenerated each time the property is accessed.
2) Better use of the list. Maybe I could add a method to the interface to allow passing in a List<validationissue> reference to cut back on the copying between lists.
3) Maybe I could extend the List<validationissue> class to make it so that it has a method for removing only validation issues from a particular object. Then, when I got a ValidationChanged event, I could just add the validation issues for that particular object.
Any thoughts?
|
|
|
|
|
Sounds like you know what to do. One thing I'd recommend is running the code under some performance profiler such as Ants Profiler[^] to see where the real slow parts are; from there you'll have a better idea of what needs to be optimized.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Is Jesus the Jewish Messiah?
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
I agree with Judah, it sounds like you know what has to be done.
One thing that popped into my mind while reading your explanation is that you might want to add something to the validation logic which verifies that the validation issues need to be recalculated. Of course, I'm not sure if this technique is appropriate for whatever it is your app is doing. But if it isn't necessary to revalidate every time a property changes, perhaps it would be worth the extra effort to add a property to IValidation which returns true if the object actually requires re-validation, else false. It could cut down on a lot of unnecessary validation.
Just a thought...
Josh
|
|
|
|
|
Actually that functionality was already there, but wasn't being used. I never did implement the whole caching thing, but I fixed so that only the object whose validation state changed was updated. The performance improvement was very dramatic. I'll probably try the caching next to see if I can get it to be really snappy.
|
|
|
|
|
I have a tab control that is part of a spit container. The tab control is in the upper panel and in the bottom panel there is a help field that displays info\rules for the current item.
I would like to fire one generic event on the enter of each item of the tab control that will populate the help field from the item.tag. I was hoping to get away from having to have an Enter event on each of the items in the tab page (there are over 200 items on the tab page). I would like to have one generic method that would fire when the user navigates to a new item. It would need to determine the current item and and get the tag for the item and repopulate the help field.
Any ideas on how to implement this?
TIA
New C# Developer!
|
|
|
|
|
Write a recursive method which hooks the Enter event of every control on each tab page. All of the controls' Enter events are handled by the same method. In that handler you can update the help info in the bottom container.
Josh
|
|
|
|
|
do you have an example? not quite sure how to implement as I am new to this framework.
|
|
|
|
|
This is what I had in mind:
private void Form1_Load(object sender, System.EventArgs e)
{
this.HookEnterEvents( this.tabControl1 );
}
private void HookEnterEvents( Control current )
{
if( current is TabControl )
{
foreach( TabPage page in (current as TabControl).TabPages )
this.HookEnterEvents( page );
}
else
{
foreach( Control ctrl in current.Controls )
this.HookEnterEvents( ctrl );
current.Enter += new EventHandler(OnControlEnter);
}
}
private void OnControlEnter( object sender, EventArgs e )
{
this.statusBar1.Text = (sender as Control).Tag as string;
}
Josh
|
|
|
|
|
Josh,
That is exactly what I was looking for and works great!
Thanks for your quick reply!
Bob
|
|
|
|
|
Hello everyone,
i'm working on a program that uses Crystal Reports.
How can i print the report without using the CrystalReportViewer control?
The only way i know to print a report is using that component and hit the print button on it. Is there another way without see the preview of the report?
Thanks in advance.
Enrico
VentoEngine corp.
Program your life ^^
|
|
|
|
|
i made an application that connects to microsoft exchange server, i can get and create appointments, but the problem is that i`m not sure how to edit an appointment without knowing its location on exchange server :https:\\server\user\inbox\file.eml. i see that every appointment has an uid, but i`m not sure how to use it.
thanks in advance
|
|
|
|
|
I have a context menu that contains a ToolStripTextBox control that I am using with a DataGridView. What I want to do is have the context menu appear when I right click on certain column headers and allow the user to change the text in the column header. The problem is that the columns I want to change are dynamically added to the DataGridView at runtime and for some bizare reason the ToolStripTextBox doesn't appear in that case. If I set the context menu at design time to the DataGridView I can see the ToolStripTextBox is there, but when I try it with the dynamically created columns it isn't. I even added a regular menu item to the context menu and that will appear on the dynamically added columns but the ToolStripTextBox is left out. Does anybody have any idea what is going on here? Is it a bug?
Here's the code where I add the columns:
DataGridViewTextBoxColumn dgvtbc = new DataGridViewTextBoxColumn();
dgvtbc.HeaderText = name;
dgvtbc.DataPropertyName = name;
dgvtbc.Name = name;
dgvtbc.HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
dgvtbc.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
dgvtbc.DefaultCellStyle.Format = "f3";
dgvtbc.SortMode = DataGridViewColumnSortMode.NotSortable;
Padding newPadding = new Padding(0, 5, 0, 5);
dgvtbc.HeaderCell.Style.Padding = newPadding;
dgvtbc.HeaderCell.ContextMenuStrip = cmsIngHeaders;
dgvSamples.Columns.Add(dgvtbc);
table.Columns.Add(name, typeof(double)).DefaultValue = 0;
Thanks.
|
|
|
|
|
Hi,
I have created a web service that contains a fuction
[WebMethod]<br />
public int SavePersonInfo( object user )<br />
{<br />
WebBLL.User WebUser = (WebBLL.User)user;<br />
int Id = WebUser.RegisterUser( WebUser );<br />
return Id;<br />
}
when i call this fuction like this....
prashant1.Service1 mySer = new BLL.prashant1.Service1();<br />
int val = mySer.SavePersonInfo( this );
It's giving me error...
An unhandled exception of type 'System.InvalidOperationException' occurred in system.xml.dll
Additional information: There was an error generating the XML document.
Pls if anybody have any idea regarding this help me out...
Thanx & regards
Anuj Kamthan
Software Developer
Solversa Technologies,
Pune - 411007, India.
http://www.solversa.com
-- modified at 9:47 Tuesday 2nd May, 2006
|
|
|
|
|
Is it maybe a serializable issue. Is your user object marked as serializable?
|
|
|
|
|
Yes it mark as a serializable.
Anuj Kamthan
Software Developer
Solversa Technologies,
Pune - 411007, India.
http://www.solversa.com
|
|
|
|