Page 1 of 1

empty report

Posted: Wed Aug 20, 2008 4:31 am
by grazi
Hi there,

i was trying to implement the report into my application but somehow i always get an empty report, even if there should be some static fields.

my code looks like this:

private void KurepForm_Load(object sender, EventArgs e)
{
StiReport report = new StiReport();
report.LoadDocument(Path.Combine(Path.Combine(SettingsController.Instance.ServerFolder, "Reports"), "CpnKuRepSrv.mrt"));
report.Design();
//report.Show(this.ParentForm);
}

as you can see i'm also trying to open the report in the designer within my application, but also there i get an empty report (no headers defined etc.)
but when i try to open the file in the normal designer everything works perfectly.

did i miss something important?


Thanks for your help

empty report

Posted: Wed Aug 20, 2008 6:18 am
by Brendan
I think you may be using the wrong method to load your report

you should be using

Code: Select all

report.Load(Path.Combine(Path.Combine(SettingsController.Instance.ServerFolder, "Reports"), "CpnKuRepSrv.mrt"));
I believe the LoadDocument function is for loading a rendered report that would have been outputted to an *.MDC file.

empty report

Posted: Wed Aug 20, 2008 6:31 am
by grazi
Hi,

thanks for your reply.
i just tried it but it gives me an exception that the TypeConverter can't convert from type string. Quite a strange exception since intellisense tells me that it accepts strings...

Edit: i get the same exception when i try to use a filestream

empty report

Posted: Fri Aug 22, 2008 12:37 am
by Vital
Hello,

Sorry we can't fix this error. Problem not in loading report. Problem in a way which .net environment use to find asseblies.

Thank you.

empty report

Posted: Fri Aug 22, 2008 4:38 am
by Brendan
grazi wrote:Hi,

thanks for your reply.
i just tried it but it gives me an exception that the TypeConverter can't convert from type string. Quite a strange exception since intellisense tells me that it accepts strings...

Edit: i get the same exception when i try to use a filestream
Is it one particular report causing the problem with the Load method or it occurs for all .mrt files you try to load?

empty report

Posted: Mon Aug 25, 2008 3:38 am
by grazi
Hi there,
i could solve the problem by updating to the newest prerelease version, so that's no issue anymore.
Thanks for your time