empty report

Stimulsoft Reports.NET discussion
Post Reply
grazi
Posts: 39
Joined: Fri May 23, 2008 1:55 am

empty report

Post 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
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

empty report

Post 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.
grazi
Posts: 39
Joined: Fri May 23, 2008 1:55 am

empty report

Post 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
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

empty report

Post 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.
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

empty report

Post 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?
grazi
Posts: 39
Joined: Fri May 23, 2008 1:55 am

empty report

Post 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
Post Reply