how to set crossheader and crossdataband in page center?
-
- Posts: 74
- Joined: Fri Dec 07, 2012 11:35 am
how to set crossheader and crossdataband in page center?
I am looking to put the crossheader and crossdataband in page center dynamicly when report created.
Re: how to set crossheader and crossdataband in page center?
Hello.
There is no simple way to center CrossHeaderBand and CrossDataBand.
Thank you.
There is no simple way to center CrossHeaderBand and CrossDataBand.
Thank you.
-
- Posts: 74
- Joined: Fri Dec 07, 2012 11:35 am
Re: how to set crossheader and crossdataband in page center?
will you have any suggession for it.
I am looking to center line all the controls and bands on report specialy I have multiple crossdataband with crossheader.
As per the functionality crossdataband work from left to right, but in the case of one record i want to align it in center of page not in left. I need your suggession on it.
Thank you.
I am looking to center line all the controls and bands on report specialy I have multiple crossdataband with crossheader.
As per the functionality crossdataband work from left to right, but in the case of one record i want to align it in center of page not in left. I need your suggession on it.
Thank you.
Re: how to set crossheader and crossdataband in page center?
Hello,
Please send us your report with test data which reproduces the issue for analysis.
Thank you.
Please send us your report with test data which reproduces the issue for analysis.
Thank you.
-
- Posts: 74
- Joined: Fri Dec 07, 2012 11:35 am
Re: how to set crossheader and crossdataband in page center?
Please find the report and images.
DataBase Script is here:
create TABLE [dbo].[Product](
[ProductID] [int] IDENTITY(1,1) NOT NULL,
[ProductName] [varchar](50) NOT NULL,
[CompantName] [varchar](50) NOT NULL
)
insert into [dbo].[Product] values('Prod1','Comp1')
insert into [dbo].[Product] values('Prod2','Comp2')
insert into [dbo].[Product] values('Prod3','Comp3')
insert into [dbo].[Product] values('Prod4','Comp4')
insert into [dbo].[Product] values('Prod5','Comp5')
--------------------------------------------------------------------------
Create FUNCTION [dbo].[Split]
(
@RowData varchar(8000),
@SplitOn nvarchar(5)
)
RETURNS @RtnValue table
(
Id int identity(1,1),
Data varchar(8000)
)
AS
BEGIN
Declare @Cnt int
Set @Cnt = 1
While (Charindex(@SplitOn,@RowData)>0)
Begin
Insert Into @RtnValue (data)
Select Data = ltrim(rtrim(Substring(@RowData,1,Charindex(@SplitOn,@RowData)-1)))
Set @RowData = Substring(@RowData,Charindex(@SplitOn,@RowData)+1,len(@RowData))
Set @Cnt = @Cnt + 1
End
Insert Into @RtnValue (data)
Select Data = ltrim(rtrim(@RowData))
Return
END
---------------------------------------------------------------------------
alter PROCEDURE [dbo].[sp_Product_Info]
@ProductID varchar(MAX)
AS
DECLARE @ProductIDcount int
SELECT @ProductIDcount = COUNT(*) FROM dbo.Split(@ProductID ,',')
DECLARE @Table TABLE( ProductID int, ProductName Varchar(max),[CompantName] Varchar(max));
DECLARE @intFlag INT, @ProdID int, @RowCount int
SET @intFlag = 1
WHILE (@intFlag < = @ProductIDcount)
BEGIN
SELECT @ProdID = data FROM dbo.Split(@ProductID , ',') where Id = @intFlag
select @RowCount = Count(*) FROM [dbo].[Product]
WHERE ProductID = @ProdID
if(@RowCount > 0)
begin
INSERT @Table
SELECT DISTINCT ProductID, [CompantName], ProductName
FROM [dbo].[Product]
WHERE ProductID = @ProdID
End
else
begin
INSERT @Table VALUES (@ProdID, '','')
end
SET @intFlag = @intFlag + 1
END
SELECT * FROM @Table
GO
Thank you.
DataBase Script is here:
create TABLE [dbo].[Product](
[ProductID] [int] IDENTITY(1,1) NOT NULL,
[ProductName] [varchar](50) NOT NULL,
[CompantName] [varchar](50) NOT NULL
)
insert into [dbo].[Product] values('Prod1','Comp1')
insert into [dbo].[Product] values('Prod2','Comp2')
insert into [dbo].[Product] values('Prod3','Comp3')
insert into [dbo].[Product] values('Prod4','Comp4')
insert into [dbo].[Product] values('Prod5','Comp5')
--------------------------------------------------------------------------
Create FUNCTION [dbo].[Split]
(
@RowData varchar(8000),
@SplitOn nvarchar(5)
)
RETURNS @RtnValue table
(
Id int identity(1,1),
Data varchar(8000)
)
AS
BEGIN
Declare @Cnt int
Set @Cnt = 1
While (Charindex(@SplitOn,@RowData)>0)
Begin
Insert Into @RtnValue (data)
Select Data = ltrim(rtrim(Substring(@RowData,1,Charindex(@SplitOn,@RowData)-1)))
Set @RowData = Substring(@RowData,Charindex(@SplitOn,@RowData)+1,len(@RowData))
Set @Cnt = @Cnt + 1
End
Insert Into @RtnValue (data)
Select Data = ltrim(rtrim(@RowData))
Return
END
---------------------------------------------------------------------------
alter PROCEDURE [dbo].[sp_Product_Info]
@ProductID varchar(MAX)
AS
DECLARE @ProductIDcount int
SELECT @ProductIDcount = COUNT(*) FROM dbo.Split(@ProductID ,',')
DECLARE @Table TABLE( ProductID int, ProductName Varchar(max),[CompantName] Varchar(max));
DECLARE @intFlag INT, @ProdID int, @RowCount int
SET @intFlag = 1
WHILE (@intFlag < = @ProductIDcount)
BEGIN
SELECT @ProdID = data FROM dbo.Split(@ProductID , ',') where Id = @intFlag
select @RowCount = Count(*) FROM [dbo].[Product]
WHERE ProductID = @ProdID
if(@RowCount > 0)
begin
INSERT @Table
SELECT DISTINCT ProductID, [CompantName], ProductName
FROM [dbo].[Product]
WHERE ProductID = @ProdID
End
else
begin
INSERT @Table VALUES (@ProdID, '','')
end
SET @intFlag = @intFlag + 1
END
SELECT * FROM @Table
GO
Thank you.
- Attachments
-
- Report.mrt
- (19.49 KiB) Downloaded 439 times
-
- Report I am looking For...
- RequiredOutput.PNG (40.88 KiB) Viewed 7646 times
-
- Current Output Report...
- CurrentOutput.PNG (37.13 KiB) Viewed 7646 times
Re: how to set crossheader and crossdataband in page center?
Hello.
You could use next code in the Before Print event of Cross Group Headers:
Thank you.
You could use next code in the Before Print event of Cross Group Headers:
Code: Select all
if (DS.Rows.Count < 10)
CrossGroupHeaderBand2.Width += (Page1.Width - Page1.Margins.Left - Page1.Margins.Right - CrossGroupHeaderBand2.Width - CrossDataBand4.Width * DS.Rows.Count)/2;
-
- Posts: 74
- Joined: Fri Dec 07, 2012 11:35 am
Re: how to set crossheader and crossdataband in page center?
Thanks for reply.
With that crossdataband move in center but CrossGroupHeader are still on left side.
thank you.
With that crossdataband move in center but CrossGroupHeader are still on left side.
thank you.
- Attachments
-
- img.PNG (41.25 KiB) Viewed 7635 times
Re: how to set crossheader and crossdataband in page center?
Hello,
Please try to set the DockStyle property for the Text components on CrossGroupHeader to Right.
Thank you.
Please try to set the DockStyle property for the Text components on CrossGroupHeader to Right.
Thank you.
-
- Posts: 74
- Joined: Fri Dec 07, 2012 11:35 am
Re: how to set crossheader and crossdataband in page center?
Thank you, its work.