Crystal Report Parameter Problem

A

ashok.ponnusamy

hi,

i was created crystal report in my aspx. it's work fine. but i want to
change the parameter value by selecting value from dropdownlist in the
aspx page. First time it's work fine.second time when i pass different
data it's shows the previous Report data only not new one. I am using
stored procedure to Get report

my code is something like this

if(ddlListName.SelectedIndex>0)
{
CR = new listobjects();
CrystalDecisions.Shared.ParameterValues crParameterPattern= new
ParameterValues();

CrystalDecisions.Shared.ParameterDiscreteValue
crDiscreteValue= new ParameterDiscreteValue();
crDiscreteValue.Value=ddlListName.SelectedValue;
crParameterPattern.Add(crDiscreteValue);

CR.DataDefinition.ParameterFields["@std_id"].ApplyCurrentValues(crParameterPattern);
SetLogOnInfo(CR);
Crlist.ReportSource=CR;
//CR.Refresh();

}

And When I put this code into Some Button Click I can't Export it.

My export Code is

private void btnExport_Click(object sender, System.EventArgs e)
{

MemoryStream oStream; // using System.IO

oStream = (MemoryStream)
CR.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
Response.Clear();
Response.Buffer= true;
Response.ContentType = "application/pdf";
Response.BinaryWrite(oStream.ToArray());
Response.End();


}


Help me out from this problem.
 

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,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top