CR10 and C# .NET
hi I'm having a small problem, i hope someone here can help me.
I have a Report done in crystal reports 10. This reports calls a stored procedure, gives it 3 parameters and outputs the result and the 3 parameters on the report. this is working fine.
i have this code in c# to create the report convert it to pdf format and put it on my web page.
MemoryStream oStream;
Reports.StatByUser report1 = new MSPOS.Reports.StatByUser();
report1.SetDatabaseLogon("username", "password");
report1.SetParameterValue(report1.Parameter_STARTD ATE.ParameterFieldName.ToString(), "ccmanager");
report1.SetParameterValue(report1.Parameter_STARTD ATE.ParameterFieldName.ToString(), "2004-01-01 00:00:00");
report1.SetParameterValue(report1.Parameter_ENDDAT E.ParameterFieldName.ToString(), "2004-01-31 23:59:59");
report1.SetDataSource(GetUserSalesDS());
oStream = (MemoryStream)report1.ExportToStream(CrystalDecisi ons.Shared.ExportFormatType.PortableDocFormat);
Response.Clear();
Response.Buffer= true;
Response.ContentType = "application/pdf";
Response.BinaryWrite(oStream.ToArray());
Response.End();
when i call this code the pdf file is created and i have the result of my stored procedure in it, but the parameters do not appear. if i erase the line "report1.SetDataSource(GetUserSalesDS());", the i see the parameter fields in the pdf file but i dont see the result of the stored procedure.
can n e one tell me what im doing wrong??
thanks,
Mike.
|