Page 1 of 1
Error using LoadPackedReportFromString or LoadFromString
Posted: Fri Jul 11, 2008 10:25 am
by afas
Hi all.
I've created a User Control that will run embedded in IE to design and save reports in a database. If I run the UC in VS, it works fine. But when I run it embedded in IE, it doesn't work....
I'm saving the report as string in a database usign SaveToString or SavePackedReportToString.
When I try to load the saved report using the correspondent Load method I get the following error:
"TypeConverter cannot convert from System.String"
The report I'm saving doesn't containg any elements. I just save an empty report and try to load it back from the database. If I create a DataSource, I get the same convertion error on a StiDataParamenter.
Any help is appreciated.
If I run he code below I get the error. Am I missing anything?
Private _Report As New StiReport
Dim strReport As String = _Report.SavePackedReportToString()
_Report.LoadPackedReportFromString(strReport)
Error using LoadPackedReportFromString or LoadFromString
Posted: Thu Aug 21, 2008 8:40 am
by grazi
got a similar problem... empty report, but when loading it from my application in visualstudio i get the same notsupportedexception.
my code looks like this:
StiReport report = new StiReport();
string path = (Path.Combine(Path.Combine(SettingsController.Instance.ServerFolder, "Reports"), "basereport.mrt"));
report.MasterReport = null;
report.Load(path);
report.Design();
no big deal, but doesnt work... i used the report from a stimulsoft example and also an own empty one... always the same error.
what did i forget?
Error using LoadPackedReportFromString or LoadFromString
Posted: Thu Aug 20, 2009 8:11 am
by TDenis
The same problem. Have you found a solution?
Error using LoadPackedReportFromString or LoadFromString
Posted: Thu Aug 20, 2009 8:44 am
by Ivan
Hello,
afas wrote:I've created a User Control that will run embedded in IE to design and save reports in a database. If I run the UC in VS, it works fine. But when I run it embedded in IE, it doesn't work....
Unfortunately, we were unable to obtain proper work of report generator, when used in the code of UserControl hosted in IE.
grazi wrote:got a similar problem... empty report, but when loading it from my application in visualstudio i get the same notsupportedexception.
You also try to place the report generator in the UserControl?
Thank you.
Error using LoadPackedReportFromString or LoadFromString
Posted: Sun Aug 23, 2009 5:51 am
by TDenis
Ivan wrote:You also try to place the report generator in the UserControl?
I don't use IE.
I am writing an ArcGIS Desktop 9.3 Extension - a COM-visible dll. I can add a form in my application, add a report object and design it (but I can't preview it). Than I can save it. But it looks like there is an error during saving operation. Here is an example - a fragment of .mrt created and saved by the stand-alone designer:
Code: Select all
None;Black;2;Solid;False;4;Black
Transparent
Transparent
3.4,2,7.8,2
Arial,8
0,0,0,0
Текст1
Hello world!
Black
Expression
eb1450a92b79487f9f8377b3d35aae07
1,1,1,1
Страница1
29.7
21
Arial,100
[50:0:0:0]
And here is the same fragment created and saved by embedded (I mean during my app's runtime) report generator:
Code: Select all
None;Black;2;Solid;False;4;Black
Transparent
Transparent
2.8,2,10.2,2.6
Arial,8
Stimulsoft.Report.Components.StiMargins
Текст1
Hello world
Black
Expression
985a54a6bdc447b5a48763116e03b6db
Stimulsoft.Report.Components.StiMargins
Страница1
29.7
21
Arial,100
[50:0:0:0]
Check out margins. Stand-alone designer can't load the second version, until I fix the file manually. After that it can load it without any problems.
Embedded version of the designer can load neither the first file nor the second.
P.S. It is Russian. Version 2009.1. Sorry for my Engllish.
P.S.S. Updated to the latest prerelease - still having the error.
Also if I register my business object in report during runtime and then call the design() metod, then drag and drop my table (business object) onto design surface, check all my data fields and then click 'preview' or 'code' - I get an exception that TypeConverter can't convert 'Stimulsoft.Report.Dictionary.StiBusinessObjectSource' to 'System.ComponentModel.Design.Serialization.InstanceDescriptor'.
I really like stimulsoft reports, and I need it to embed into my dll, please fix it. Please tell if you need any other information about this error.
Thanks
Error using LoadPackedReportFromString or LoadFromString
Posted: Mon Aug 24, 2009 2:54 pm
by Jan
Hello,
Same problem. I don't know why, but some of TypeConverters (in your case StiMarginsConverter) don't work. In result Margins is not serialized fine. This is main problem. Can you send sample project to
support@stimulsoft.com. We will try do something.
Thank you.
Error using LoadPackedReportFromString or LoadFromString
Posted: Mon Aug 24, 2009 4:08 pm
by TDenis
Jan,
I have re-installed stimulsoft reports (2008.2), then re-added the references in my project. It works fine. So I am not sure that the problem is in my project. But if I update the dlls (using installer, of course) to 2009 version - the error occurs again. Re-adding the references in VS won't help.
Maybe it's somehow connected to the GAC?
I'll try to make some more experiments later.
Thank you!