﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebGrid Enterprise - WebGrid Export Error</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-Export-Error/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>WebGrid Export Error</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-Export-Error/</link><pubDate>Thu, 24 Jun 2010 02:32:48 GMT</pubDate><dc:creator>acinonyxscepticus@gmail.com</dc:creator><category>WebGrid Export Error</category><description>&lt;p&gt;It seems that adding the dummy printer only worked in the development environment and not on the production server.  Why this is, I don't know.  It is likely related to increased security in the production environment.  We will remove the dummy printer from production and use the suggested code fix to allow exporting of the grid.  Unfortunately, this is the only option left available to us.  I must add the code that you suggested to 315 grids throughout our project in order to re-instate the exporting functionality that we had with WebGrid 3.5 but that we lost when we had to go to the WebGrid 4.0 version.&lt;/p&gt;&lt;pre&gt;        protected void wgSearchResult_PrepareExportExecute(object sender, ISNet.WebUI.WebGrid.PrepareExportExecuteEventArgs e)
        {
            DataDynamics.ActiveReports.ActiveReport report;
            report = (DataDynamics.ActiveReports.ActiveReport)e.GetType().GetProperty("ReportObject").GetValue(e, null);
            report.Document.Printer.PrinterName = "";
        }
&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;This code seems to work whether the web server has printers installed or not.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>WebGrid Export Error</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-Export-Error/</link><pubDate>Fri, 18 Jun 2010 13:41:57 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><category>WebGrid Export Error</category><description>&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Hi James,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; Forgive me, I think I will need more time to discuss this with our Developer. I will let you know if I got news from them regarding this. Sorry for the inconvenience. Thank you and have a nice day.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Andi Santoso&lt;/span&gt;&lt;/p&gt;</description></item><item><title>WebGrid Export Error</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-Export-Error/</link><pubDate>Fri, 18 Jun 2010 09:15:03 GMT</pubDate><dc:creator>acinonyxscepticus@gmail.com</dc:creator><category>WebGrid Export Error</category><description>&lt;blockquote style="padding-left: 10px; margin: 0px 0px 0px 5px; border-left: rgb(204,204,204) 1px solid"&gt;&lt;p&gt;&lt;span style="font-size: 9pt"&gt;Sorry, but I can not reproduct your issue. From what I see, the error is not occur on the coding. It seems that something wrong with the printer of yours. Have you tried to turn off your printer? &lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;This error is difficult to reproduce on a development computer because on a development computer, the computer is a client machine and a server at the same time.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;This error is trying to say that the server where the website is running doesn't have a printer.&amp;nbsp; As silly as it sounds, you must have a printer on the web server just to allow the exporting of grids.&amp;nbsp; At least you don't have to have a real printer on the web server, you can install a dummy file printer and it will work.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;To confirm this problem, on a development server, remove all printers, every last one of them.&amp;nbsp; Now try to export the grid from a &lt;span style="text-decoration:underline;"&gt;remote&lt;/span&gt; client computer (that computer can have printers or not, it doesn't matter).&amp;nbsp; Then, install a file printer on the development server and you can immediately export grids when the website is accessed from the remote client, you don't even have to restart the server.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;I hate having printers unecessarily added to production servers, but we had to do this just to support exporting from grids.&amp;nbsp; We added one&amp;nbsp;file printer as follows:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;&lt;/span&gt; &lt;/p&gt;&lt;span style="font-size: 9pt"&gt;&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 36pt"&gt;&lt;span style="font-size: 15px; font-family: calibri"&gt;Printers&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size: 15px; font-family: calibri"&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 36pt"&gt;&lt;span style="font-family: wingdings"&gt;&lt;span style="font-size: 15px"&gt;à&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 36pt"&gt;Add Printer &lt;/p&gt;&lt;/span&gt;&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 36pt"&gt;&lt;span style="font-family: wingdings"&gt;&lt;span style="font-size: 15px"&gt;à&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 36pt"&gt;&lt;span style="font-size: 15px; font-family: calibri"&gt;Local Printer &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 36pt"&gt;&lt;span style="font-family: wingdings"&gt;&lt;span style="font-size: 15px"&gt;à&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 36pt"&gt;&lt;span style="font-size: 15px; font-family: calibri"&gt; Select port “FILE: (Print to File)” &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 36pt"&gt;&lt;span style="font-family: wingdings"&gt;&lt;span style="font-size: 15px"&gt;à&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 36pt"&gt;&lt;span style="font-size: 15px; font-family: calibri"&gt;Manufacturer “HP”, Model “HP 2500C Series PCL5e” (the printer model that you use doesn’t actually matter)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 36pt"&gt;&lt;span style="font-family: wingdings"&gt;&lt;span style="font-size: 15px"&gt;à&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 36pt"&gt;&lt;span style="font-size: 15px; font-family: calibri"&gt;Name the printer&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 36pt"&gt;&lt;span style="font-family: wingdings"&gt;&lt;span style="font-size: 15px"&gt;à&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 36pt"&gt;&lt;span style="font-size: 15px; font-family: calibri"&gt;Do not share the printer&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 36pt"&gt;&lt;span style="font-family: wingdings"&gt;&lt;span style="font-size: 15px"&gt;à&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 36pt"&gt;&lt;span style="font-size: 15px; font-family: calibri"&gt;You do not want to print a test page&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 36pt"&gt;&lt;span style="font-family: wingdings"&gt;&lt;span style="font-size: 15px"&gt;à&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 36pt"&gt;&lt;span style="font-size: 15px; font-family: calibri"&gt;Finish&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&amp;nbsp;</description></item><item><title>WebGrid Export Error</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-Export-Error/</link><pubDate>Tue, 05 Jan 2010 20:44:09 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><category>WebGrid Export Error</category><description>&lt;p&gt;&lt;span style="font-size: 9pt"&gt;Hi Nicola,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;    &lt;span style="font-size: 9pt"&gt;Please try this workaround for your issue. &lt;/span&gt;&lt;/p&gt;&lt;pre&gt;Protected Sub WebGrid1_PrepareExportExecute(ByVal sender As Object, ByVal e As ISNet.WebUI.WebGrid.PrepareExportExecuteEventArgs) Handles WebGrid1.PrepareExportExecute
        Dim report As New DataDynamics.ActiveReports.ActiveReport3()
        report = e.GetType().GetProperty("ReportObject").GetValue(e, Nothing)
        report.Document.Printer.PrinterName = ""
    End Sub

&lt;/pre&gt;
&lt;p&gt;   &lt;span style="font-size: 9pt"&gt; I hope it helps and please let me know if it works on your issue.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;Andi Santoso&lt;/span&gt;&lt;/p&gt;</description></item><item><title>WebGrid Export Error</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-Export-Error/</link><pubDate>Tue, 05 Jan 2010 05:03:20 GMT</pubDate><dc:creator>nicola.lorusso@loransrl.net</dc:creator><category>WebGrid Export Error</category><description>&lt;p&gt;Hi Andi,&lt;/p&gt;
&lt;p&gt;thanks for your reply.&lt;br /&gt;I tryied to put your code into my project but I have an error on ReportObject object (it seems to be not referenced on my project, but I set it!)&lt;/p&gt;
&lt;p&gt;I've attached 2 images to explain my issue.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Nicola&lt;/p&gt;</description></item><item><title>WebGrid Export Error</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-Export-Error/</link><pubDate>Tue, 05 Jan 2010 04:14:43 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><category>WebGrid Export Error</category><description>&lt;p&gt;&lt;span style="font-size: 9pt"&gt;Hi Nicola,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sorry, but I can not reproduct your issue. From what I see, the error is not occur on the coding. It seems that something wrong with the printer of yours. Have you tried to turn off your printer? Or, if it is still not working, here is a workaround, please do following steps:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;&amp;nbsp;1. Open a WebGrid Serverside event called PrepareExportExecute.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;&amp;nbsp;2. Set the printer name to an empty string.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;   private void WebGrid1_PrepareExportExecute (object         	sender,ISNet.WebUI.WebGrid.PrepareExportExecuteEventArgs e) 
   { 
       e.ReportObject.Document.Printer.PrinterName = ""; 
   }&lt;/pre&gt;

&lt;p&gt;&lt;br /&gt;&lt;span style="font-size: 9pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I hope it helps and could you please to let me know if it is working. Thank you.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;Best Regards,&lt;br /&gt;Andi Santoso&lt;/span&gt;&lt;/p&gt;</description></item><item><title>WebGrid Export Error</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-Export-Error/</link><pubDate>Mon, 04 Jan 2010 08:41:34 GMT</pubDate><dc:creator>nicola.lorusso@loransrl.net</dc:creator><category>WebGrid Export Error</category><description>&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;I have this error while I try to export my webgrid (in any format): "Printer does not support Letter papersize. Please use PaperKind.Custom in your PageSettings or specify a papersize supported by the current printer".&lt;/p&gt;
&lt;p&gt;I've created a TempReports folder in my project root with full access for Everyone. What's wrong?&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Nicola&lt;/p&gt;</description></item><item><title>WebGrid Export Error</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-Export-Error/</link><pubDate>Thu, 03 Dec 2009 23:28:59 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><category>WebGrid Export Error</category><description>&lt;p&gt;&lt;span style="font-size: 9pt"&gt;Hi Jocelyn,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Sorry but i can't replicate your issue since exporting works well on me, and your attachment can't be opened. From what you describe to me, you used "AllowExport="true", which is not right. You should set it as "AllowExport="Yes". &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; And remember to add one folder to save the export file and named it "TempReports" and give an "Allow" access for Everyone to access it. I hope it helps and do not hesitate to ask if you have any more questions.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;Thank you,&lt;br /&gt;Andi Santoso&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>WebGrid Export Error</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-Export-Error/</link><pubDate>Thu, 03 Dec 2009 09:55:32 GMT</pubDate><dc:creator>jcrendulic</dc:creator><category>WebGrid Export Error</category><description>&lt;p&gt;I am suing the AllowExport="true" in the LayoutSettings.  I am getting an error.   See attached screenshot.&lt;/p&gt;
&lt;h2&gt;&lt;span style="font-size: 8pt"&gt;&lt;span style="font-size: 9pt"&gt;&lt;i&gt;Object reference not set to an instance of an object.&lt;/i&gt; &lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-family: arial, helvetica, geneva, sunsans-regular, sans-serif "&gt;&lt;b&gt;Description: &lt;/b&gt;An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Exception Details: &lt;/b&gt;System.NullReferenceException: Object reference not set to an instance of an object.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item></channel></rss>