I have grouped data:
Product ID P0001
Trans Date Qty
-----------------------------
1/13/2008 10
1/20/2008 5
2/3/2008 7
2/5/2008 1
--------------------------
Total Qty 23
But I want to show the records with Trans Date after 1/2/2008 only and show all the previous record in summary. So, this is the report I want to create:
Product ID P0001
Previous Qty: 15
Trans Date Qty
-----------------------------
2/3/2008 7
2/5/2008 1
--------------------------
Total Qty 23
I can calculate the previous Qty using SumIf, but I can not hide the January record. Do you know how to achieve that? Thanks.
Hide some record without filter
-
- Posts: 1
- Joined: Tue Dec 05, 2006 1:59 am
- Location: Indonesia
Hide some record without filter
Please do as follows:
1. Set the DataBand.CanShrink property in true.
2. In the BeforePrintEvent of the DataBand please write the following code:
if (MyDataSource.TransDate < DateTime.Parse("1/2/2008"))
{
MyTextComponent.Height = 0;
...
MyTextComponentN.Height = 0;
}
else
{
MyTextComponent1.Height = 0.3;
...
MyTextComponentN.Height = 0.3;
}
You may open the attached report in the Demo.exe application from the standard delivery and see all of that in action.
Thank you.
1. Set the DataBand.CanShrink property in true.
2. In the BeforePrintEvent of the DataBand please write the following code:
if (MyDataSource.TransDate < DateTime.Parse("1/2/2008"))
{
MyTextComponent.Height = 0;
...
MyTextComponentN.Height = 0;
}
else
{
MyTextComponent1.Height = 0.3;
...
MyTextComponentN.Height = 0.3;
}
You may open the attached report in the Demo.exe application from the standard delivery and see all of that in action.
Thank you.
- Attachments
-
- 42.HideSomeRowsWithoutFilter.mrt
- (18.88 KiB) Downloaded 328 times