Hi,
I have a Stored Procedure that takes about 20 minutes to
fill a Dataset, then I bind it to a report and try to
export in a PDF format. It works with my smaller reports,
but not my biggest - not mentionning the most important.
The error message is the following:
Missing parameter field current value.
It happens when I use the Export() method. I can assure
you that both the SP and the report are working fine when
not used in the web application. Here's a sample of my
code:
[...]
SqlDataAdapter sqlDataAdp = new SqlDataAdapter
(sqlSelectCmd);
sqlSelectCmd.Co mmandType =
System.Data.Com mandType.Stored Procedure;
sqlSelectCmd.Co mmandTimeout = 30*60;
DataSet ds = new DataSet();
int rows = sqlDataAdp.Fill (ds);
SqlConn.Close() ;
ReportDocument rpt = new ReportDocument( );
rpt.Load(Server .MapPath(".") + @"\Reports\" + reportArgs
[1]);
rpt.SetDataSour ce(ds);
string fileName = Server.MapPath( ".") + @"\Reports\" +
Session.Session ID.ToString() + ".pdf";
DiskFileDestina tionOptions dfdo = new
DiskFileDestina tionOptions();
dfdo.DiskFileNa me = fileName;
ExportOptions exp = rpt.ExportOptio ns;
exp.Destination Options = dfdo;
exp.ExportDesti nationType =
ExportDestinati onType.DiskFile ;
exp.ExportForma tType = ExportFormatTyp e.PortableDocFo rmat;
rpt.Export(); // It stops right here
[...]
I have a Stored Procedure that takes about 20 minutes to
fill a Dataset, then I bind it to a report and try to
export in a PDF format. It works with my smaller reports,
but not my biggest - not mentionning the most important.
The error message is the following:
Missing parameter field current value.
It happens when I use the Export() method. I can assure
you that both the SP and the report are working fine when
not used in the web application. Here's a sample of my
code:
[...]
SqlDataAdapter sqlDataAdp = new SqlDataAdapter
(sqlSelectCmd);
sqlSelectCmd.Co mmandType =
System.Data.Com mandType.Stored Procedure;
sqlSelectCmd.Co mmandTimeout = 30*60;
DataSet ds = new DataSet();
int rows = sqlDataAdp.Fill (ds);
SqlConn.Close() ;
ReportDocument rpt = new ReportDocument( );
rpt.Load(Server .MapPath(".") + @"\Reports\" + reportArgs
[1]);
rpt.SetDataSour ce(ds);
string fileName = Server.MapPath( ".") + @"\Reports\" +
Session.Session ID.ToString() + ".pdf";
DiskFileDestina tionOptions dfdo = new
DiskFileDestina tionOptions();
dfdo.DiskFileNa me = fileName;
ExportOptions exp = rpt.ExportOptio ns;
exp.Destination Options = dfdo;
exp.ExportDesti nationType =
ExportDestinati onType.DiskFile ;
exp.ExportForma tType = ExportFormatTyp e.PortableDocFo rmat;
rpt.Export(); // It stops right here
[...]