Page 1 of 1

Problem with User Datasource and Master Detail Report

Posted: Thu Aug 26, 2010 3:26 am
by TGoertler
Hello Stimulsoft Team,

I recently bought your Reports.NET component as it contains everything I need to create reports.

Currently I try to get a master/detail report with UserData done. The videos about creating
master/detail record gave me the first clue about how it works. But now I've a problem with
the user data source. I cannot get it to work, setting the right detail data.

I attached my demo project to this post, so maybe you may help me with this one as I need to
create quite some master/detail reports as soon as I know how to create the user data section right.

I use VB.NET 2008 on a Windows XP pc. The version of Reports.NET is: Stimulsoft Reports.Net 2010.1 R2005

Thank you in advance.

Best Regards,
Thomas

Problem with User Datasource and Master Detail Report

Posted: Fri Aug 27, 2010 2:56 am
by Alex K.
Hello,

Thank you for the post. We will check your project and let you know about the result.

Thank you.

Problem with User Datasource and Master Detail Report

Posted: Fri Aug 27, 2010 5:31 am
by Alex K.
Hello,

You only need in StiReport1 set Data Relation properties to "Beziehung" and MasterComponent properties to "DataUserData" on DataUserDataDetails component.

Thank you.

Problem with User Datasource and Master Detail Report

Posted: Fri Aug 27, 2010 10:41 am
by TGoertler
Hello Aleksey,

thank you very much for this. It seems to work, I don't get an error any more but
now I see one "category" (master) and one "detaildata" (detail). The question is
now, how dow I get all 10 detaildata there?

I hope you can help me with this one too.

Thank you in advance.

Best Regards,
Thomas

Problem with User Datasource and Master Detail Report

Posted: Sat Aug 28, 2010 3:33 am
by Alex K.
Hello,

You're doing the right thing.
Do you in completing the data obtained that a single master record has only one detail record.
You can add to the table UserDataDetails column kat_id and remake relation Beziehung (UserData.kat_id, UserDataDetails.kat_id)

Thank you.

Problem with User Datasource and Master Detail Report

Posted: Sat Aug 28, 2010 5:08 am
by TGoertler
Hello Aleksey,

thank you for your answer.

I changed the relation "Beziehung" accordingly to your information.
But that didn't change the output at all.

What I get in the report is:
master - Kategorie (number)
detail - (number) System.Int32
master - Kategorie (number)
detail - (number) System.Int32


But what I try to get is:
master - Kategorie (number)
detail - (number) data
detail - (number) data
detail - (number) data
detail - (number) data
detail - (number) data
detail - (number) data
detail - (number) data
detail - (number) data
detail - (number) data
master - Kategorie (number)
detail - (number) data
detail - (number) data
detail - (number) data
detail - (number) data
detail - (number) data
detail - (number) data
detail - (number) data
detail - (number) data
detail - (number) data

So I think I have a problem understanding how to get the right data to the "_GetData" Sub.
The data for the master part is no problem at all as the StiUserData1.Count is the dimension
of the master array. But when it comes to the detail data then the control doesn't know how
many lines should be fetched, so it fetches only one line at all.

My Data Structure looks like that:

Structure Demo
Dim demo_Name As String <- Name of master category
Dim demo_Daten() As String <- Detail Data
End Structure

So I think I don't understand how to give the report the detail data array.

Do you have any advice for me here?

Thank you in advance.

Best Regards,
Thomas

Problem with User Datasource and Master Detail Report

Posted: Mon Aug 30, 2010 5:51 am
by TGoertler
Hello Aleksey,

thank you for your answer.

I changed the relation "Beziehung" accordingly to your information.
But that didn't change the output at all.

What I get in the report is:
master - Kategorie (number)
detail - (number) System.Int32
master - Kategorie (number)
detail - (number) System.Int32


But what I try to get is:
master - Kategorie (number)
detail - (number) data
detail - (number) data
detail - (number) data
detail - (number) data
detail - (number) data
detail - (number) data
detail - (number) data
detail - (number) data
detail - (number) data
master - Kategorie (number)
detail - (number) data
detail - (number) data
detail - (number) data
detail - (number) data
detail - (number) data
detail - (number) data
detail - (number) data
detail - (number) data
detail - (number) data

So I think I have a problem understanding how to get the right data to the "_GetData" Sub.
The data for the master part is no problem at all as the StiUserData1.Count is the dimension
of the master array. But when it comes to the detail data then the control doesn't know how
many lines should be fetched, so it fetches only one line at all.

My Data Structure looks like that:

Structure Demo
Dim demo_Name As String <- Name of master category
Dim demo_Daten() As String <- Detail Data
End Structure

So I think I don't understand how to give the report the detail data array.

Do you have any advice for me here?

Thank you in advance.

Best Regards,
Thomas

Problem with User Datasource and Master Detail Report

Posted: Mon Aug 30, 2010 7:26 am
by Alex K.
Hello,

In your current structure, you will not be able to use the master-detail report.
For master-detail report, you must use two datasourse.

You can split Demo_Daten:
Master:
kat_id, data
Detail:
kat_id, det_id, data

Thank you.

Problem with User Datasource and Master Detail Report

Posted: Wed Sep 01, 2010 3:31 pm
by TGoertler
Dear Aleksey,

I tried now several solutions to get more then one detail info to the report.

Now I changed the demo to make it even more easy to understand but I don't understand how the report gets the user data.
I cannot get all data in the right order. Would it be possible to get a demo that works?

In the new demo I added two UserData controls to split the data but it's not possible to set how many details belong to one master record.

Currently I'm quite clueless as I don't know what I should do to get it to work. This form of data is essential in my current project so
it would be really nice to see how it's done right.

Thank you in advance,
Thomas

Problem with User Datasource and Master Detail Report

Posted: Thu Sep 02, 2010 1:40 pm
by Alex K.
Hello,

Please see a modified your project in attachment.
I hope this is what you wanted.

Thank you.