This question is locked. New answers and comments are not allowed.
Hi,
I need to send Gird rows in an email.
So I have choosen exporing the grid content to a PDF file and sending it as an attachement.
To send it as an attachement I want to save the file on the server.
Following is the code which I am using to create file on the server.
With the above code I am able to create a pdf file on the server, but facing problem while exporting data (Stream) in the file.
Please help.
FYI: I am using OOB application.
Regards,
SivaPrasad.B
I need to send Gird rows in an email.
So I have choosen exporing the grid content to a PDF file and sending it as an attachement.
To send it as an attachement I want to save the file on the server.
Following is the code which I am using to create file on the server.
RadDocument document = CreateDocument(customerGridView); document.LayoutMode = DocumentLayoutMode.Paged; document.Measure(RadDocument.MAX_DOCUMENT_SIZE); document.Arrange(new RectangleF(PointF.Empty, document.DesiredSize)); PdfFormatProvider provider = new PdfFormatProvider(); using (dynamic fso = AutomationFactory.CreateObject("Scripting.FileSystemObject")) { string path = "C:\\Shiva\\App_Data\\Reports\\Tran.pdf"; dynamic file = fso.CreateTextFile(path, true); using (Stream output = file) { provider.Export(document, output); } file.Close(); }With the above code I am able to create a pdf file on the server, but facing problem while exporting data (Stream) in the file.
Please help.
FYI: I am using OOB application.
Regards,
SivaPrasad.B