Page 1 of 1
Problem with relations between 2 databands
Posted: Thu Mar 05, 2009 3:20 am
by Jennypi
Hi everyone,
I try to do a report containing 2 databands:
Databand1 will show "samples" with its information, and databand2 is supposed to show additional information about each sample. I can not manage to have only one query (too complicated for me) so that's why I have to deal with 2 databands.
With databand1 only, the report works very well. But at soon as I add databand2, nothing show up on the report, it's blank (with only the header). I did set a relation ("myrelation") between those 2 databands, I've set Data Relation of databand2 to "myrelation" andset Master Component to "DataBand1". However it is still showing nothing!
Where am I wrong?
Thanks!
Problem with relations between 2 databands
Posted: Thu Mar 05, 2009 4:17 am
by Brendan
How are you registering the Data for your report. Is it coming from within the report itself via an SQL Datasource or are you registering DataTables / Dataset?
There's also some Master-Detail examples in the Demo application which may help.
One thing to try first is to set the property 'Printer if Detail Empty' on the Masterband (databand1) to True. This means it should print all header details if it doesn't have any child details. If the headers are printing and not the children (additional information) then maybe examine the relation you created from the 2nd Datasource used for databand2 to make sure it is defined correctly.
Problem with relations between 2 databands
Posted: Thu Mar 05, 2009 7:48 am
by Jennypi
Data is coming via an SQL datasource.
Actually, the header I'm talking about is the header of the report, not the master databand.
When I put only databand1, its data shows up. When I add databand2, nothing shows up. Meaning that I see nothing on my report, only its title/header.
I've set the Print if detail empty property to True and master data is printed. I examined again my relation but I'm sure that I've set it properly, I really don't see where my mistake is...
Thanks for your help.
Problem with relations between 2 databands
Posted: Fri Mar 06, 2009 1:14 pm
by Jan
Hello Jennypi,
Please send your report to
support@stimulsoft.com. In EMail add reference to this topic. We will examine your report and will give you recommendations how to fix it.
Thank you.
Problem with relations between 2 databands
Posted: Thu Mar 12, 2009 3:51 am
by Edward
Hello Jennifer,
Please right-click the Datasource in the dictionary and select View. Does the request return any data?
Also please check that appropriate columns in the datasources which you need to join with relations have correct values.
I have no idea what could be wrong with your report...
Thank you.
Problem with relations between 2 databands
Posted: Wed Apr 01, 2009 3:36 am
by Jennypi
I'm back on this subject because although Edward tried to help me, I still have my problem.
Now I'm not working on the same report anymore, but the problem is the same: detail databand shows nothing although the query is working perfetly when alone. The relation between the 2 databands is set properly.
Please have a look at the screen captures below:
- the results of both queries and the relation on the "location id" field (you can see that the content of this field is indeed exactly the same)

- the properties of my detail databand (is it normal that relation property is back to 'not assigned' everytime I double click on the databand?)

- and my form with OK button event editor
And finally my report:
http://demo.ovh.com/fr/14175f925aef3349 ... afb436865/
Please help! It's really driving me crazy!
Thanks,
Jennifer.
Problem with relations between 2 databands
Posted: Wed Apr 01, 2009 3:04 pm
by Jan
Hello Jennypi,
I'm not sure on 100%, try following: add to button click event handlers, after data.Connect() method following line of code:
Let me know about results.
Thank you.