i have this code :
ReportDocument reportDocument1 = new ReportDocument();
reportDocument1.Load(Request.PhysicalApplicationPath +
"\\reports\\VBilancio.rpt");
reportDocument1.SetDataSource(dsBil);
string TargetFileName;
FileStream fs;
long FileSize;
ExportOptions oExO;
DiskFileDestinationOptions oExDo = new DiskFileDestinationOptions();
TargetFileName = Request.PhysicalApplicationPath + "\\Export\\" +
Session.SessionID + "bilancio.pdf";
oExDo.DiskFileName = TargetFileName;
oExO = reportDocument1.ExportOptions;
oExO.ExportDestinationType = ExportDestinationType.DiskFile;
oExO.ExportFormatType = ExportFormatType.PortableDocFormat;
oExO.DestinationOptions = oExDo;
reportDocument1.PrintOptions.PaperOrientation=PaperOrientation.Landscape;
reportDocument1.SetParameterValue("data_fine",data2);
reportDocument1.SetParameterValue("data_ini",data1);
reportDocument1.Export();
reportDocument1.Close();
Response.Clear();
Response.Buffer = true;
Response.AddHeader("Content-Type", "application/pdf");
Response.AddHeader("Content-Disposition",
"attachment;filename=ReportBilancio.pdf;");
fs = new FileStream(TargetFileName, FileMode.Open);
FileSize = fs.Length;
byte[] bBuffer = new byte[(int)(FileSize)];
fs.Read(bBuffer, 0, (int)(FileSize));
fs.Close();
Response.BinaryWrite(bBuffer);
Response.Flush();
Response.Close();
this code was ok with visual studio .net 2003 but with visual studio 2005
dont'work and appears an error similar to this :
error in the motor of the query
the permissions are ok and the the virtual directory is ok
what can he be?
thanks a lot
Micky