Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Clicking Crystal Report's Print button closes report.
Message
De
20/02/2009 13:52:00
 
 
À
20/02/2009 13:29:41
Sammy Derban
Ghana Telecom
Accra, Ghana
Information générale
Forum:
ASP.NET
Catégorie:
Rapports
Versions des environnements
Environment:
ASP.NET
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01383148
Message ID:
01383152
Vues:
42
>Hello all,
>I'm new to Crystal reports and have a simple report that uses the pull method.
>I use the Reportviewer Control in conjunction with the Reportdocument and form parameters to view the report.
>This works well and produces the report, but on clicking any control on the toobar like Print or Zoom the report closes leaving only the paramenter entry controls and submit buttons. i.e back to entry screen.
>Any help?
>
>Here's my code
>
> ReportDocument rd = new ReportDocument();
> rd.Load(Server.MapPath(@"~\Reports\Inventory\CrystalReportTest.rpt"));
> ParameterFields paramFields = new ParameterFields();
> ParameterField pUOM = new ParameterField();
> ParameterDiscreteValue dcUOM = new ParameterDiscreteValue();
> pUOM.ParameterFieldName = "PUOM";
> // setting the values of discrete objects
> dcUOM.Value = DropDownList1.SelectedValue.ToString();
> // now adding these discrete values to parameters
> pUOM.CurrentValues.Add(dcUOM);
> // now adding all these parameter fields to the parameter collection
> paramFields.Add(pUOM);
> CrystalReportViewer1.ParameterFieldInfo = paramFields;
> CrystalReportViewer1.ReportSource = rd;
> CrystalReportViewer1.Visible = true;
>TIA
>Sam

See if the solution here helps you:

http://forums.asp.net/t/992330.aspx

Also, not sure about this, but I haven't got time to look at it: rd.Load(Server.MapPath(@"~\Reports\Inventory\CrystalReportTest.rpt"));

Check the value returned by Server.MapPath and see if the report actually exists in that location and is visible when you click on the print or zoom button.

If you use a hardcoded path to a report in a test, does it work?
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform