How to hide Table and list borders in reports when exported as docx

Hi,
I have added extensions to local reports using Aspose.Words. i want to export my report to pdf and docx format. I have few queries regarding how to render report as docx:

  1. In rdlc file i used table and list to display records everything works fine if i export them in pdf format. But when i export report in docx format unnecessary borders and table/list borders become visible whereas in pdf report border are not visible.
  2. How can i add extension for docx in MS Sql Server reports(RDL) ?
    I used following meathod for local reports:
private static void AddExtension(this LocalReport report, string name, string localizedName, Type extensionType)
{
    const BindingFlags flags = BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance;
    // CommonService.ListRenderingExtension is an internal method that returns a list of supported
    // rendering extensions. This list is also stored in a class field so we can simply get this list
    // and add Aspose.Words for Reporting Services rendering extensions to make Microsoft Word
    // export formats appear on the dropdown.
    // Get the service type.
    FieldInfo previewService = report.GetType().GetField("m_previewService", flags);
    // Get the ListRenderingExtensions method info.
    MethodInfo listRenderingExtensions = previewService.FieldType.GetMethod("ListRenderingExtensions", flags);
    // Obtan a list of existing rendering extensions.
    IList extensions = listRenderingExtensions.Invoke(previewService.GetValue(report), null) as IList;
    // LocalRenderingExtensionInfo is a class that holds information about a rendering extension.
    // We should create an instance of this class to add the info about the specified extension.
    // Since the IRenderingExtension interface is defined in the Microsoft.ReportViewer.Common
    // assembly, use this trick to obtain the corresponding Assembly instance. This will work for
    // both Report Viewer 2005 (8.0) and 2008 (9.0).
    Assembly commonAssembly = typeof(Microsoft.ReportingServices.ReportRendering.IRenderingExtension).Assembly;
    // Now, get the LocalRenderingExtensionInfo type as it is defined in the same assembly.
    Type localRenderingExtensionInfoType = commonAssembly.GetType("Microsoft.Reporting.LocalRenderingExtensionInfo");
    // Get the LocalRenderingExtensionInfo constructor info.
    ConstructorInfo ctor = localRenderingExtensionInfoType.GetConstructor(flags,
        null,
        new Type[] { typeof(string), typeof(string), typeof(bool), typeof(Type), typeof(bool) },
        null);
    // Create an instance of LocalRenderingExtensionInfo.
    object instance = ctor.Invoke(new object[] { name, localizedName, true, extensionType, true });
    // Finally, add the info about our rendering extension to the list.
    extensions.Add(instance);
}

but it gives error message when i tried similar method for server reports.

  1. Can DocxRenderer be used to render report as docx files ? any code sample will be helpfull.

Hi

Thank you for your inquiry.

  1. Borders are disabled by default in Aspose.Words. MS Word shows invisible borders if “Hide Gridlines” option is disabled. When you open the generated document using MS Word, you should select “Hide Gridlines” from “Table” menu.
    Also, please attach your RDLC report, sample data source and output document for testing.
  2. You can just use MSI installer. Please see the following link for more information:
    https://docs.aspose.com/words/reportingservices/installing-using-the-msi-installer/
    In addition, you can install Aspose.Words for Reporting Services manually:
    https://docs.aspose.com/words/reportingservices/installing-on-the-server-manually/
  3. It is not quite clear what you mean. DocxRenderer is exactly used to allow you exporting your reports to DOCX:
    https://docs.aspose.com/words/reportingservices/integrate-with-microsoft-report-viewer-in-local-mode/

If you need to render your reports programmatically, the following article could be useful for you:
https://docs.aspose.com/words/reportingservices/rendering-reports-programmatically/
Best regards.

Hi,
Thanks for your reply.
2. You can just use MSI installer. Please see the following link for more information:
https://docs.aspose.com/words/reportingservices/installing-using-the-msi-installer/
I tried installing aspose.word on the server where i have microsoft sql server 2008 but it gives error message "Could not properly insall or configure aspose.words for reporting services. Please try installing aspose.words for reporting services manually. "
When i Tried adding it manually using this:
In addition, you can install Aspose.Words for Reporting Services manually:
https://docs.aspose.com/words/reportingservices/installing-on-the-server-manually/
Th newly added extensions are not available in the dropdown in ReportServer and there are no permission for NTFS. All the security permissions are inherreted for parent folder.
3. It is not quite clear what you mean. DocxRenderer is exactly used to allow you exporting your reports to DOCX:
Actually i want to know how can i use DocxRenderer object
i was exploring some of aspose sample code and i saw someone called save method of docxrenderer but after referening proper dll i can only see “LocalizedName” property of the object
moreover i am unable to create object of Document class.
(may be its too basic since i am new to reporting) but What is the use of docxrenderer and how can i use docxrenderer.
Thanks and regards