Page 3 of 4
Re: Ordering in CrossDataBand?
Posted: Thu Jan 17, 2013 10:55 am
by amitkaushik
Yes its working fine.
Thank you Aleksey

Re: Ordering in CrossDataBand?
Posted: Thu Jan 17, 2013 12:34 pm
by HighAley
Hello.
We are always glad to help you.
Let us know if you need any additional help.
Thank you.
Re: Ordering in CrossDataBand?
Posted: Wed Apr 24, 2013 11:01 am
by amitkaushik
Thanks,
But I have a problem with this report. I increase the size of that report and showing more sections by adding more cross header, cross data and databand and now the size of report is 2 page.
it work fine when i supply data limited to 2 page but when I am adding more records in datasource the report pages are unordered like;
Page 1, Page 1, Page 2, Page2
But what i am looking for is
Page 1, Page 2, Page 1,Page2
.....
thankyou
Re: Ordering in CrossDataBand?
Posted: Thu Apr 25, 2013 12:43 pm
by HighAley
Hello.
Please, try to set the Collate property of the report to 2.
Thank you.
Re: Ordering in CrossDataBand?
Posted: Mon Apr 29, 2013 6:09 am
by amitkaushik
I try with lines
StiReport report1 = new StiReport();
report1.Load(templatePath);
report1.Collate = 2;
DataSet ds = new DataSet("Test");
ds = DataSET(IDs);
report1.Dictionary.DataSources.Clear();
report1.RegData(ds);
report1.Dictionary.Synchronize();
report1.Compile();
report1.Render();
return report1;
but it does't work.
Please provide me an sample mrt.
Re: Ordering in CrossDataBand?
Posted: Mon Apr 29, 2013 7:11 am
by Alex K.
Hello,
Please send us your report with test data which reproduces the issue for analysis.
Thank you.
Re: Ordering in CrossDataBand?
Posted: Mon Apr 29, 2013 7:43 am
by amitkaushik
it may help u to reproduce the issue.
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')
insert into [dbo].[Product] values('Prod6','Comp6')
insert into [dbo].[Product] values('Prod7','Comp7')
insert into [dbo].[Product] values('Prod8','Comp8')
insert into [dbo].[Product] values('Prod9','Comp9')
insert into [dbo].[Product] values('Prod10','Comp10')
insert into [dbo].[Product] values('Prod11','Comp11')
--------------------------------------------------------------------------
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
---------------------------------------------------------------------------
Create 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
Re: Ordering in CrossDataBand?
Posted: Tue Apr 30, 2013 6:48 am
by Alex K.
Hello,
Please send us a screenshot or image how is shows now and how it should look like.
Thank you.
Re: Ordering in CrossDataBand?
Posted: Wed May 01, 2013 10:21 am
by amitkaushik
Please find the image and mrt.
and one more thing I want to add, C# Code is used to supply datasource in this scenario.
Re: Ordering in CrossDataBand?
Posted: Thu May 02, 2013 2:56 pm
by HighAley
Hello.
Please, try to set the Collate property of the report to 2.
Thank you.