send a parameter to Crystal report in webform application

Discussion in 'ASP .Net' started by Simon, Jul 9, 2003.

  1. Simon

    Simon Guest

    Hi,
    I am using ASP.NET with C# and Crystal Report. I have a textbox et
    a asp.net button. I send a number in the texte, I push the button and
    I want to see the report with value related to the number in the
    textbox. The problem is that I need to call the crystal report
    function in the "override protected void OnInit(EventArgs e)" function
    to see my graphic and picture in the report. When I push the button,
    the content of the textbox is not filled yet in the OnInit... how can
    I send parameters to crystal report if I must use the OnInit ? Page
    load is too late...


    my crystal report function looks like that (where txtIDPaquet.Text is
    the name of the parameter field..):
    crFunction()
    {
    mReportDocument = new ReportDocument();
    mReportDocument.Load(Server.MapPath("\\" + Request.ApplicationPath) +
    "\\" + CST.PREFIXE_RAPPORTS + CST.FICHIER_RAPPORT_HISTORIQUE_PAQUET);
    crystalView.SelectionFormula = "{TablePaquets.ID} = " +
    txtIDPaquet.Text;
    this.crystalToolBar.Visible = true;
    this.crystalView.Visible = true;
    lblMessageErreur.Visible = false;
    crystalView.ReportSource = mReportDocument;
    crystalToolBar.activeCrystalToolBar(mReportDocument,crystalView);
    }


    thank you!
    Simon, Jul 9, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. James Wallace
    Replies:
    0
    Views:
    1,051
    James Wallace
    Oct 17, 2003
  2. Mustufa Baig

    How to display crystal report via webform..

    Mustufa Baig, May 13, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    1,959
    Lucas Tam
    May 13, 2005
  3. Learner
    Replies:
    1
    Views:
    2,052
    Christopher Reed
    Jan 25, 2006
  4. Comfort

    LOAD THE CRYSTAL REPORT ON A PART OF FRAME IN WEBFORM

    Comfort, Oct 18, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    132
    Comfort
    Oct 18, 2004
  5. Comfort
    Replies:
    0
    Views:
    546
    Comfort
    Oct 18, 2004
Loading...

Share This Page