Question WPF Report Builder

kwhelchel

Well-known member
Joined
Feb 28, 2020
Messages
53
Programming Experience
Beginner
Ok so I have been able to connect and build reports in winforms with not much problem but with WPF I am getting lost on it. Been trying a few differnt things I have found but they never seem to be clear enough for me.
I have tried this and get lost 3/4 the way down wpf rdlc.
I am still trying but getting nowhere fast lol.
 
opps my bad step 5 I am down to this section.
On the UserControl_Loaded event write the following code.
I don't know where the userControl_loaded event is being generated or where to put it myself
 
So you're saying that you don't know how to create event handlers for controls? That's something that you should have learned long before trying to create a report. You double-click a control in the designer to create a handler for the default event. Not sure whether Loaded is the default event for a user control or not. If not, you use the Properties window to create a handler for any event. Click the Events button on the toolbar to switch to events and then the Properties button to switch back. Double click an event to create a handler for the selected control(s) or select an existing method from the drop-down.
 
In WPF double clicking generally opens the content tab to change the text of a control (If clicking over a text property). This happens when you click where the text property is editable. Try to avoid doing that. If double clicking, double click near the border of the control.

Where John is telling you to click is on the right side of the window (by default) and it has a lightning bolt icon. You can set all your events in the textboxes provided. And if you truly are doing this in WPF, you can also write your events out in the Xaml code.

You would be better to raise an event from the loaded event of a user control to ensure it is fully loaded. WPF has such events for user controls. If you need to ask how to set up events, you really should go back a few chapters to cover this area, as it is explained clearly very early in all basic documentation. Lets know if you have any other questions.

Screeny :
 
Yeah still kicking my butt, it is not as easy as the winforms one that I setup. this getting to be frustrating.
is there another way I can go to create reports like the rdlc way that can be used in VS 2017 with not buying so package to use?
 
What exactly is frustrating?

The screenshot I provided shows you where to go to setup events, so what is the problem? It has also been explained further up the topic. If this is the part you're having trouble with. Then don't skip chapters in your learning process and go back and learn how to deal with events. I'm not one for helping "copy and paste programmers". That said, if you want to be a better programmer, then you need to read the documentation on the topics you struggle with. When you have a specific question about your code, or an attempt you've made to implement such events, then post back and show us what you've tried. Effort reaps reward.
 
Back
Top Bottom