Empty file while try export report to HTML using Aspose.Words

Hi,

i’m trying to export my report from ReportViewer control (VS2012) in local processing mode to HTML format using trial version of Aspose.Words for Reporting Services.

All other formats added by Aspose such DOC or MHTML and native ReportViewer formats are working correctly, but when i try to export report to HTML, i get an empty file.

Also when i try to export report programmatically to any of Aspose formats - i get reference not set and out of range exceptions (native formats are fine).

Our company wanted to buy licence for your products, but without working report to HTML export feature, this will not be possible.

I attach below the whole c# project (including ReportTest.rldc file) and separate rdlc.

Hi there,

Thanks for your inquiry.

Carlos_II:

All other formats added by Aspose such DOC or MHTML and native ReportViewer formats are working correctly, but when i try to export report to HTML, i get an empty file.

I have tested the scenario and have not found the shared issue while using latest version of Aspose.Words for Reporting Services 4.3.0. Please use the latest version of Aspose.Words for Reporting Services 4.3.0.
Carlos_II:

Also when i try to export report programmatically to any of Aspose formats - i get reference not set and out of range exceptions (native formats are fine).

Please create a standalone/runnable simple application (for example a Console Application Project) that demonstrates the code you used to generate your output document.

Hi,
thank you for your answer.

I reinstalled Aspose Words for RS

i'm adding extension and report this way:

protected void Form1_Load(object sender, EventArgs e)
{
ReportViewerHelper.AddAsposeExtensions(reportViewerWin); // here i'm addingextensions
this.processViewer(); // method which loads correctly report to report viewer

this.reportViewerWin.RefreshReport();
}

All works good until i try to save report to one of aspose's formats. At this point i get an exception like on first attached picture.

With the programmatically render is similar problem. After i add aspose extensions and generate correct report, i use those code (it's very similar to the code from your manuals):

Warning[] warnings;
string mimeType;
string encoding;
string extension;
string[] streamIds;

byte[] reportBytes = localReport.Render(
"AWHTML",
null,
out mimeType,
out encoding,
out extension,
out streamIds,
out warnings);

using (FileStream stream = File.OpenWrite(@"renderedRep.html"))
stream.Write(reportBytes, 0, reportBytes.Length);

And again, as extension parameter i write native parameter such "Word" it renders perfect, but with aspose extension (as on example above) i get cast exception (as on image attached below). Render sees extension, but can't render report without error.

I can't figure out what is wrong with this...



Hi there,

Thanks for your inquiry. I have tested the scenario and have not found the shared issue. Are you using latest version of Aspose.Words for Reporting Services 4.3.0?

Please try the attached test application which uses ReportViewerHelper.AddAsposeExtensions. Let us know if you still face any issue.

Could you please share your test application here for testing which you are using to render report programmatically? I will investigate the issue and provide you more information.

Yes, i’m using the latest version. I’ve tested your test application, and with simple reports it’s all right, but when i’m loading my custom reports with VB code and trying to export this via aspose extensions, there is still an error from inside of your library (microsoft’s exports to pdf, excel and word are working properly)… Maybe your libraries are not supporting VB code in reports or some report properties or tags?


I’m using VB functions mostly for data language localisation e.g. english or german.
Maybe, if you don’t support VB code in report, you could only make function in your parser, which when it meets some VB function, raises a new Event, which i could handle programmically?

Hi there,

Thanks for sharing the detail. Could you please use the select statement (to populate the data) inside

your RDL file and share that RDL file with us. You may share the application which execute the custom reports with VB code here for testing. We will check the shared
issue with your RDL file and provide you more information.

Please see the following DataSet example with select statement for your kind reference:

<DataSets>

<DataSet Name=DataSet1>

<Query>

<DataSourceName>DataSource1</DataSourceName>

<CommandText>select 1 as value, ‘label1’ as label

union all

select 2 as value, ‘label2’ as label

union all

select 3 as value, ‘label3’ as label

union all

select 4 as value, ‘label4’ as label

</CommandText>

</Query>

<Fields>

<Field Name=value>

<DataField>value</DataField>

<rd:TypeName>System.Int32</rd:TypeName>

</Field>

<Field Name=label>

<DataField>label</DataField>

<rd:TypeName>System.String</rd:TypeName>

</Field>

</Fields>

</DataSet>

</DataSets>


Hi,

I changed my report using your instructions, i changed also analogously local connection settings in “LocalReport” processing.

I’ve created new exemplary project called “AsposeReport” which demonstrates the whole situation. The Report called “Caesar_CaesarHistoryAspose.rdl” is in the “bin/Debug” directory. As an example it connects in local processing mode with an empty sql compact database "DatabaseAspose.sdf"

The problem remains still the same: I can correctly load my report, add Aspose extensions, export to word/pdf/excel, but by exporting to extensions added by Aspose i’m getting an exception and the created file is blank.

Best regards,
Karol

Hi Karol,

Thanks for sharing the detail.

I have tested the scenario and have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSRPT-194. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSRPT-194) have been fixed in this Aspose.Words for Reporting Services release.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.