what i want is to open my pdf report in a new window or in the pdf application withou prompt pop window
my code looks like :
renderedBytes = localReport.Render(
reportType,
deviceInfo,
out mimeType,
out encoding,
out fileNameExtension,
out streams,
out warnings);
Response.Clear();
Response.ContentType = mimeType;
// with this instruction i open my report in pdf application but i dont want the prompt window
Response.AddHeader("content-disposition", "attachement; filename=liste." + fileNameExtension);
1-First if you use Report Viewer you can open it in anew window or in the same page and then if you wish you can export it to a pdf file (this is one way to do it ) ,so you can have a preview before exporting it to a pdf file (in my opinion it's better)
2- if you use crystal report you can open your report in a pdf file immediatly (creating the pdf containing the report
tell what is the way you prefer so i can help you further
azizp23
Member
2 Points
36 Posts
pdf report in a new window ?
Feb 04, 2009 02:37 PM|LINK
hi,
what i want is to open my pdf report in a new window or in the pdf application withou prompt pop window
my code looks like :
renderedBytes = localReport.Render(
reportType,
deviceInfo,
out mimeType,
out encoding,
out fileNameExtension,
out streams,
out warnings);
Response.Clear();
Response.ContentType = mimeType;
// with this instruction i open my report in pdf application but i dont want the prompt window
Response.AddHeader("content-disposition", "attachement; filename=liste." + fileNameExtension);
Response.BinaryWrite(renderedBytes);
Response.End();
suthish nair
All-Star
15176 Points
3304 Posts
Re: pdf report in a new window ?
Feb 04, 2009 03:02 PM|LINK
My Blog
azizp23
Member
2 Points
36 Posts
Re: pdf report in a new window ?
Feb 04, 2009 03:13 PM|LINK
that supposes that i have saved the pdf file in my disk but i want just to open the report in a window as new pdf file
suthish nair
All-Star
15176 Points
3304 Posts
Re: pdf report in a new window ?
Feb 05, 2009 04:57 AM|LINK
try using : Response.WriteFile method
refer: http://dotnetperls.com/Content/Response-WriteFile.aspx
My Blog
Roba
Member
505 Points
203 Posts
Re: pdf report in a new window ?
Feb 05, 2009 10:54 AM|LINK
1-First if you use Report Viewer you can open it in anew window or in the same page and then if you wish you can export it to a pdf file (this is one way to do it ) ,so you can have a preview before exporting it to a pdf file (in my opinion it's better)
2- if you use crystal report you can open your report in a pdf file immediatly (creating the pdf containing the report
tell what is the way you prefer so i can help you further