Make a Databand into 2 (Split Databand)

Stimulsoft Reports.NET discussion
Post Reply
WilliamCcy
Posts: 10
Joined: Sat Jul 21, 2007 6:18 am
Location: Malaysia,KL

Make a Databand into 2 (Split Databand)

Post by WilliamCcy »

Dear all,

First i hv to say sorry coz this topic title can't clearly explain my scenario. But i'll try to explain clearly abt the scenario below.

Currently, im designing a year end report , but i found out there is no enough space to put all my info into a databand.
for example: The databand is include the Qty and Amount of each month

Below is the layout that i expect
GroupHeader1(Shop A)

DataBand1 - DataTableA (January to June)
Item Name Jan Feb Mar Apr May Jun
DataBand2 - DataTableA (July To December)
Item Name July Aug ... ... ...Dec

GroupFooter1(Shop A)

i try to split the databand info into 2 groups (as show on above), but the layout is not what im expect.
It will show Shop A and Shop B , from January to June at Report Page1, and ShopA and ShopB July to December at Page 2
Any solution on split the databand based on the group ?

Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Make a Databand into 2 (Split Databand)

Post by Edward »

Please use the following steps:

1. Define two DataSources: DataSource1 and DataSource2. Both DataSources should refer to the same table.
2. On the DataBand you should place two containers one under another. Let Container1 contains data from DataSource1 and Container2 data from DataSource2.
3. In the Rendering event of the DataBand please place the following code:

Code: Select all

DataSource2.Next();
if (DataSource2.IsEof)
{
Container2.Enabled = false;
}
else
{
Container2.Enabled = true;
}
Thank you.
Post Reply