send a parameter to Crystal report in webform application

S

Simon

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!
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top