Page 1 of 1
subreport
Posted: Thu Aug 31, 2006 4:52 am
by kubru
Hello
I'm trying to make a multicolumn list, comparable to your 'labels' example.
How would I implement a subreport with eg. the top 5 products ordered per ID on the same label?
As for now I can't find a way to link a subreport to the ID-field on the label.
All hints are greatly appreciated!
subreport
Posted: Thu Aug 31, 2006 6:15 am
by Vital
So you need create master-detail report with columns. Please see sample report
Master-DetailWithColumns
You can open this report from Demo and run it.
Thanks.
subreport
Posted: Thu Aug 31, 2006 7:10 am
by kubru
Thanks for your answer, but I'm afraid that's not exactly what I need.
If I compare it to your example I'd like a report where the beverages are also in columns and not spread as a header.
So something like:
[left]lemonades beers wines
lemonade1 beer1 wine1
lemonade2 beer2 wine2
lemonade3
yoghurts sandwiches pastas
yoghurt1 sandwich1 pasta1
yoghurt2 sandwich2 pasta2
yoghurt3
yoghurt4[/left]
I hope you can tell me how to do this?
subreport
Posted: Thu Aug 31, 2006 9:15 am
by Edward
kubru wrote:Thanks for your answer, but I'm afraid that's not exactly what I need.
If I compare it to your example I'd like a report where the beverages are also in columns and not spread as a header.
So something like:
[left]lemonades beers wines
lemonade1 beer1 wine1
lemonade2 beer2 wine2
lemonade3
yoghurts sandwiches pastas
yoghurt1 sandwich1 pasta1
yoghurt2 sandwich2 pasta2
yoghurt3
yoghurt4[/left]
I hope you can tell me how to do this?
Please see report example in attachment.
Thanks.
subreport
Posted: Mon Sep 04, 2006 4:28 am
by kubru
Thanks for your example. It does exactly what I need.
But I'm still having problems to get it working in my case.
I'm trying to create a catalog of all our existing models and the fabrics in which they will be available. I us a SQL database and I created two datasources: tblModels and tblFabrics.
SQL for DataSource 1:
SELECT * from tblModels
SQL for DataSource 2:
SELECT tblFabrics.quality, tblFabrics.descr FROM tblFabrics WHERE tblFabrics.FabricId IN (SELECT FabricId FROM tblModels WHERE modelnr = @modelnr)
I also made a relation which links tblModels with tblFabrics on FabricId.
I suspect the problem lies in the SQL, but I can't compare it as in your example the SQL is not visible.
I'm also having trouble with the parameter in my second SQL. When I click on 'retrieve columns' I keep getting a warning 'Scalar variable @modelnr not defined'. However I did create the parameter as described?
Your help is very much appreciated!
subreport
Posted: Mon Sep 04, 2006 6:53 am
by Edward
kubru wrote:Thanks for your example. It does exactly what I need.
But I'm still having problems to get it working in my case.
I'm trying to create a catalog of all our existing models and the fabrics in which they will be available. I us a SQL database and I created two datasources: tblModels and tblFabrics.
SQL for DataSource 1:
SELECT * from tblModels
SQL for DataSource 2:
SELECT tblFabrics.quality, tblFabrics.descr FROM tblFabrics WHERE tblFabrics.FabricId IN (SELECT FabricId FROM tblModels WHERE modelnr = @modelnr)
I also made a relation which links tblModels with tblFabrics on FabricId.
It is not necessary to build Relation for the Master-Detail reports with SQL queries wich contains parameters. Please set ResetDataSource property of detail DataBand to True.
kubru wrote:I suspect the problem lies in the SQL, but I can't compare it as in your example the SQL is not visible.
I'm also having trouble with the parameter in my second SQL. When I click on 'retrieve columns' I keep getting a warning 'Scalar variable @modelnr not defined'. However I did create the parameter as described?
Your help is very much appreciated!
Please delete lines
from your SQL query. Then click on 'retrieve columns' button and after retreiving columns add
to your SQL text.
Also please see Demo application: SQL Master-Detail with Parameters example.
Thank you.
subreport
Posted: Mon Sep 04, 2006 7:52 am
by kubru
That works fine.
Many thanks!!!
subreport
Posted: Mon Sep 04, 2006 7:57 am
by Edward
kubru wrote:That works fine.
Many thanks!!!
Please contact us any time you need help.
Thanks.