By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,281 Members | 2,201 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,281 IT Pros & Developers. It's quick & easy.

send a parameter to Crystal report in webform application

P: n/a
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(mReportDocumen t,crystalView);
}
thank you!
Nov 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.