Page 1 of 1
SaveToByteArray differs
Posted: Thu Dec 03, 2009 10:14 am
by xss
hi guys,
i just discovered a small inconsistency. i load a report template (.mrt) from a file. now when i call SaveToByteArray() it gives me an byte array with 22767 bytes at 1st call. at 2nd call - u can make it just one statement after - i get an byte array with 22663 bytes?
thanks in advance.
greets xss
SaveToByteArray differs
Posted: Thu Dec 03, 2009 1:28 pm
by Edward
Hi
Please show your code and let us know the version of the report engine you used.
Thank you.
SaveToByteArray differs
Posted: Fri Dec 04, 2009 9:57 am
by xss
once again i forgot to post the version.

it's 2009.3.600.0
Code: Select all
using (Stimulsoft.Report.StiReport report = new Stimulsoft.Report.StiReport())
{
string filePath = @"D:\Report.mrt";
report.Load(filePath);
byte[] reportData = report.SaveToByteArray(); // here i get 22700 bytes for example
reportData = report.SaveToByteArray(); // and here 22650
}
additionally i set this global statics:
Code: Select all
Stimulsoft.Report.StiOptions.Dictionary.UseNullableDateTime = true;
Stimulsoft.Report.StiOptions.Dictionary.UseNullableTimeSpan = true;
Stimulsoft.Report.StiOptions.Designer.SaveReportWhenDontAskSaveReport = false;
Stimulsoft.Report.StiOptions.Configuration.SearchLocalizationFromRegistry = false;
Stimulsoft.Report.StiOptions.Dictionary.AutoSynchronize = Stimulsoft.Report.Dictionary.StiAutoSynchronizeMode.None;
Stimulsoft.Report.StiOptions.Engine.DefaultEngineVersion = Stimulsoft.Report.Engine.StiEngineVersion.EngineV2;
Stimulsoft.Report.Print.StiPrintProvider.UseEXDialog = true;
and some user defined funtions.
best regards
SaveToByteArray differs
Posted: Mon Dec 07, 2009 3:11 am
by Edward
Hi
The difference is in ReportFile property.
This property keeps the last path was used for saving or loading report.
When you write or load report from stream, that property is set to null, because the stream can not be connected with a file.
Thank you.
SaveToByteArray differs
Posted: Tue Dec 08, 2009 6:44 am
by xss
Thank you Edward, i just wanted to ensure that there's no report data definition loss.
SaveToByteArray differs
Posted: Wed Dec 09, 2009 4:21 am
by Edward
Hi
No problem, let us know if any help is required.
Thank you.