Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7174941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:10:15+00:00 2026-05-28T16:10:15+00:00

Im trying to load a xml file into a dataset and generate crystal report

  • 0

Im trying to load a xml file into a dataset and generate crystal report with loaded data.

im using Crystal Reports WPF Application for the project.

public partial class Window1 : Window
{
    public Window1()
    {
        InitializeComponent();
        reportViewer.Owner = this;

        DataSet dset = new DataSet1();

        DataSet reportData = new DataSet();
        reportData.ReadXml("http://192.168.1.10/test/persons.xml");

        dset.Tables[0].Merge(reportData.Tables[0]); 


        ReportDocument report = null;
        report = new CrystalReport1();
        report.SetDataSource(dset.Tables[0]);
        reportViewer.ViewerCore.ReportSource = report;
    }

}

This working fine and my question is how to move download xml and set report codes to a different event to load report after the application is shown?

Regards

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T16:10:16+00:00Added an answer on May 28, 2026 at 4:10 pm

    Here is the Window Lifetime Management events: (MSDN)

    • Activated
    • Closed
    • Closing
    • Deactivated
    • SourceInitialized

    I believe Activated event is what you need. Considering that Activated event fires not only when a window opened first time but also when ALT+TAB switches and so on so to filter out first windo opening from other Activated events just use boolean flag setting it to true when first time Activated event was handled:

        bool firstActivateAlreadyHandled = false;
        protected override void OnActivated(EventArgs e)
        {
            base.OnActivated(e);
    
            if (!this.firstActivateAlreadyHandled)
            {
                 // your code here
                 this.firstActivateAlreadyHandled = true;
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently trying to load a slightly large xml file into a dataset.
I'm trying to load Gravatars into Flash. Luckily, they provided a crossdomain.xml file at
I am trying to load an xml file from wikipedia into my flash movie.
I'm trying to embed an XML file into a C# console application via Right
Im trying to load a csv file into a datatable using oledb. This is
I was trying to insert new data into an existing XML file, but it's
Hi I'm trying to convert the XML file into associative array by using the
i am trying to load this xml file into the dropdownlist: http://sites.google.com/site/shadchanproject/Home/lots1.xml i want
I am trying to load an XML file into a tree view control, edit
I am trying to extract information from an XML file into an object using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.