Hi,
After Reder report, StiReport support some method: SaveDocument(SaveDocumentString), SavePackedDocument(SavePackedDocumentString). SaveDocument return file or String with XML format. SavePackedDocumentString return smaller string and SavePackedDocument (to file) return file with smaller size (seem to be binary format because I don't see any character).
I wonder what format SavePackedDocumentString use and can StiViewer for Silverlight can use this string to show report?
Thanks
What format of StiReport.SavePackedDocumentString?
-
- Posts: 11
- Joined: Wed Jun 15, 2011 10:19 pm
- Location: VN
What format of StiReport.SavePackedDocumentString?
Hello,
The SaveDocumentToString method save document to xml and then convert to the Base64 string.
The SavePackedDocumentToString method save document to xml, pack it to gzip format and then convert to the Base64 string.
Unfortunately, Silverlight do not support the gzip compression, so LoadPackedDocumentFromString method is not supported in the StiViewerSL.
Thank you.
The SaveDocumentToString method save document to xml and then convert to the Base64 string.
The SavePackedDocumentToString method save document to xml, pack it to gzip format and then convert to the Base64 string.
Unfortunately, Silverlight do not support the gzip compression, so LoadPackedDocumentFromString method is not supported in the StiViewerSL.
Thank you.
-
- Posts: 11
- Joined: Wed Jun 15, 2011 10:19 pm
- Location: VN
What format of StiReport.SavePackedDocumentString?
Hi Ivan,
Silverlight support Gzip input/output stream to compress/decompress. Could you provide this feature in next release?
Silverlight support Gzip input/output stream to compress/decompress. Could you provide this feature in next release?
What format of StiReport.SavePackedDocumentString?
Hello,
Silverlight do not contain the System.IO.Compression namespace.
If you know how to realize the gzip compression by means of Silverlight, please send us a sample.
Thank you.
Silverlight do not contain the System.IO.Compression namespace.
If you know how to realize the gzip compression by means of Silverlight, please send us a sample.
Thank you.
-
- Posts: 11
- Joined: Wed Jun 15, 2011 10:19 pm
- Location: VN
What format of StiReport.SavePackedDocumentString?
Hi Andrew,
I found in your assembly Stimulsoft.Compression.SL.dll contain System.IO.Compression namespace. This is my sample to Decompress String in SL by your GZipInputStream:
private string DecompressString(string strXMl)
{
Byte[] oData = Convert.FromBase64String(strXMl);
MemoryStream mem = new MemoryStream(oData);
GZipInputStream streamGzip = new GZipInputStream(mem);
MemoryStream memOut = new MemoryStream();
streamGzip.Flush();
streamGzip.CopyTo(memOut);
memOut.Flush();
string strResult = string.Empty;
oData = memOut.ToArray();
//strResult = System.Text.UTF8Encoding.UTF8.GetString(oData, 0, oData.Length); //Convert.ToBase64String(oData);
strResult = Convert.ToBase64String(oData);
memOut.Close();
mem.Close();
streamGzip.Close();
return strResult;
}
I can decompress string return by SavePackedDocumentToString method but I don't know format in order to load report from decompressed string in SL. Could you provide sample and feature LoadPackedDocumentFromString in SL version in next release?
Thanks
I found in your assembly Stimulsoft.Compression.SL.dll contain System.IO.Compression namespace. This is my sample to Decompress String in SL by your GZipInputStream:
private string DecompressString(string strXMl)
{
Byte[] oData = Convert.FromBase64String(strXMl);
MemoryStream mem = new MemoryStream(oData);
GZipInputStream streamGzip = new GZipInputStream(mem);
MemoryStream memOut = new MemoryStream();
streamGzip.Flush();
streamGzip.CopyTo(memOut);
memOut.Flush();
string strResult = string.Empty;
oData = memOut.ToArray();
//strResult = System.Text.UTF8Encoding.UTF8.GetString(oData, 0, oData.Length); //Convert.ToBase64String(oData);
strResult = Convert.ToBase64String(oData);
memOut.Close();
mem.Close();
streamGzip.Close();
return strResult;
}
I can decompress string return by SavePackedDocumentToString method but I don't know format in order to load report from decompressed string in SL. Could you provide sample and feature LoadPackedDocumentFromString in SL version in next release?
Thanks
What format of StiReport.SavePackedDocumentString?
Hello,
Stimulsoft.Compression.SL.dll is a third-party library, which was adapted to suit our needs. Its compression algorithm is working correctly (used in exports). But the decompression algorithm sometimes does not work correctly for files compressed with built-in methods of .Net Framework. Therefore, we cannot use this library for decompressing of compressed report files, since we cannot guarantee its correct work for all files.
Thank you.
Stimulsoft.Compression.SL.dll is a third-party library, which was adapted to suit our needs. Its compression algorithm is working correctly (used in exports). But the decompression algorithm sometimes does not work correctly for files compressed with built-in methods of .Net Framework. Therefore, we cannot use this library for decompressing of compressed report files, since we cannot guarantee its correct work for all files.
Thank you.