469,953 Members | 2,480 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,953 developers. It's quick & easy.

ReportDocument.Load

Hello everybody,
I am trying to create a web application to generate Crystal Report with
Parameters. However I noticed that
ReportDocument.Load is used twice when the parameter page is loaded for the
first time and then again when the user enters the parameters in the
parameters page.
1) The first time ReportDocument.Load is used when the Crystal Report is
loaded and the parameter page is created.
2) The second time the ReportDocument.Load is again used when the user
enters the parameters in the parameters page.
My problem is I do not want the ReportDocument.Load to be used
twice along with the Parameter table . Would be greatful if anyone can help
me with any solution. The code is written below..
private void Page_Load(object sender,System.EventArgs e)
{
string reportname= "C:\ReportWithParameter.rpt"
LoadReportName(reportname)
}
private void LoadReport(string reportName)

{
crDoc=new CrystalDecisions.CrystalReports.Engine.ReportDocum ent();
crDoc.Load(reportName);

CrystalDecisions.CrystalReports.Engine.ParameterFi eldDefinitions
crParamFieldDefinitions =
crDoc.DataDefinition.ParameterFields;
// create the table to hold the controls
Table table = new Table();
table.Width = 300;
table.BorderWidth=1;
table.BackColor = Color.LightGray;
table.BorderColor = Color.Gray;
table.CellSpacing = 10;
// table.GridLines = GridLines.Horizontal;
string paramName;

TableRow
summaryRow = new TableRow();
TableCell summaryCell = new TableCell();
ParamTable.Rows[0].Cells[0].Controls.Add
(table);

Session["Report"] = crDoc;
}

}
Pls guide...

Rahil





}

--
Message posted via http://www.dotnetmonster.com
Nov 19 '05 #1
0 2537

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Jason Huang | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.