l am trying to see how to export event veiwer log to database(mssql) and incremental updates.
sql MS server and with window 2000
if anyone knows how to do this in .net or third party software pls let me know.Are you talking about event viewer logs on the server or off of workstations?
Showing posts with label viewer. Show all posts
Showing posts with label viewer. Show all posts
Tuesday, March 27, 2012
Friday, February 24, 2012
Export To Excel
Hi Friends,
I am generating a report using sql server reporting service and
rendering it in my .aspx page in a report viewer control. Now i need
to export it to excel so that the excel file can be stored in client
pc.How do i show an save as dialoge box,so that user can either
save,open or cancel.
Please help me out.
Thanks,
RanjanOn Feb 27, 12:26 am, "Ranj" <ranjan.raghaven...@.gmail.com> wrote:
> Hi Friends,
> I am generating a report using sql server reporting service and
> rendering it in my .aspx page in a report viewer control. Now i need
> to export it to excel so that the excel file can be stored in client
> pc.How do i show an save as dialoge box,so that user can either
> save,open or cancel.
> Please help me out.
> Thanks,
> Ranjan
You should be able to use something like the following (basically,
call a header):
------
Response.Clear();
Response.AddHeader("content-disposition", "attachment;filename=" +
Session["SpecialName"].ToString() + "NameOfExcelSpreadsheet.xls");
Response.ContentType = "application/vnd.xls";
System.IO.StringWriter sw = new System.IO.StringWriter();
HtmlTextWriter htw = new HtmlTextWriter(sw);
this.ObjectName.RenderControl(htw);
Response.Write(sw.ToString());
Response.End();
------
I'm not certain this will work in the Report Viewer itself though. You
might need to add a button/etc to accomplish this outside the report
viewer. Hope this helps.
Regards,
Enrique Martinez
Sr. ASP.NET/SQL Server Developer
I am generating a report using sql server reporting service and
rendering it in my .aspx page in a report viewer control. Now i need
to export it to excel so that the excel file can be stored in client
pc.How do i show an save as dialoge box,so that user can either
save,open or cancel.
Please help me out.
Thanks,
RanjanOn Feb 27, 12:26 am, "Ranj" <ranjan.raghaven...@.gmail.com> wrote:
> Hi Friends,
> I am generating a report using sql server reporting service and
> rendering it in my .aspx page in a report viewer control. Now i need
> to export it to excel so that the excel file can be stored in client
> pc.How do i show an save as dialoge box,so that user can either
> save,open or cancel.
> Please help me out.
> Thanks,
> Ranjan
You should be able to use something like the following (basically,
call a header):
------
Response.Clear();
Response.AddHeader("content-disposition", "attachment;filename=" +
Session["SpecialName"].ToString() + "NameOfExcelSpreadsheet.xls");
Response.ContentType = "application/vnd.xls";
System.IO.StringWriter sw = new System.IO.StringWriter();
HtmlTextWriter htw = new HtmlTextWriter(sw);
this.ObjectName.RenderControl(htw);
Response.Write(sw.ToString());
Response.End();
------
I'm not certain this will work in the Report Viewer itself though. You
might need to add a button/etc to accomplish this outside the report
viewer. Hope this helps.
Regards,
Enrique Martinez
Sr. ASP.NET/SQL Server Developer
Subscribe to:
Posts (Atom)