Data from different tables on one band

Stimulsoft Reports.NET discussion
Post Reply
Anastasia
Posts: 3
Joined: Thu Jun 30, 2011 8:20 am

Data from different tables on one band

Post by Anastasia »

Hi

I have such question. There are for example two tables in report datasource list. And it's necessary to show data from different tables in one line in report. I can do it only if i will not set datasource in databand.But designer will show warning 'Databand doesn't have datasource etc', but the report will be generated correctly. I would like to know is it safely to design reports in such way (without declaration of datasource in databand) ot it can bring any errors?

I will be glad for any information
xss
Posts: 64
Joined: Wed Jun 10, 2009 3:03 am
Location: Austria

Data from different tables on one band

Post by xss »

hi anastasia,

why using a databand if you dont assign a datasource?

if you just want to display the first row of your data source, you can use almost every other band. are you sure that there's only one row in your data sources every time? in case of this use a text component and assign your desired field - for example {MyDatatable.MyField}.

cheers
xss

Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Data from different tables on one band

Post by Andrew »

Hello,
I have such question. There are for example two tables in report datasource list. And it's necessary to show data from different tables in one line in report. I can do it only if i will not set datasource in databand.
Explain, please in detail what problems arise if you set datasource in data band.
But designer will show warning 'Databand doesn't have datasource etc', but the report will be generated correctly. I would like to know is it safely to design reports in such way (without declaration of datasource in databand) ot it can bring any errors?
If the data source is not set for the data band, then for calculating expressions the current entries from tables will be used. In some cases this may be correct, for example if the datasource contains only one row of data.

Thank you.
Anastasia
Posts: 3
Joined: Thu Jun 30, 2011 8:20 am

Data from different tables on one band

Post by Anastasia »

I'll try to explain better. I have statical report (not master-detail). And datasource for this report contains two tables 'table1' and 'table2' with some columns. I want to place data from any column of 'table1' and data from any column of 'table2' in the same line of report (i have only one row in my result dataset) For example, {table1.column1} {table2.column2}. I can't use in this case two data bands with datasources table1 and table 2 respectively. But if i will not set datasource in data band, my report will be generated correctly only with warning. Can i do so and ignore this warning?

May be it was created specially, but it's not necessary to assign datasource in band in the case of staticel report, data are shown correctly?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Data from different tables on one band

Post by HighAley »

Hello, Anastasia.

Do you have relation between tables?
It will be ok if you have only one row in both tables.

We can give you more information if you send us your report template with sample data on support@stimulsoft.com.

Thank you.
Anastasia
Posts: 3
Joined: Thu Jun 30, 2011 8:20 am

Data from different tables on one band

Post by Anastasia »

Yes, there is a relation between tables by Id and only one row in both tables

Thank you for help!
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Data from different tables on one band

Post by Alex K. »

Hello,

Can you please send us a sample data for analysis.

Thank you.
Post Reply