Hi All,
I am using VS 2008/2010 and SQL server 2008. I have 3tables :
1) Fund
2) ShareClass
3) ShareClassCountry
The script of table are :
CREATE TABLE [dbo].[Fund](
[ID] [int] NOT NULL,
[BaseCurrency] [nvarchar](50) NOT NULL,
[Benchmark] [text] NULL,
[DomicileCountry] [nvarchar](255) NOT NULL,
[Fundcode] [nvarchar](50) NOT NULL,
[FundType] [nvarchar](50) NOT NULL,
[LaunchDate] [datetime] NOT NULL,
[Name] [nvarchar](255) NOT NULL,
[TargetAlpha] [nvarchar](255) NULL,
[UmbrellaFund] [nvarchar](255) NOT NULL,
[FundID] [int] IDENTITY(1,1) NOT NULL,
[InvestmentStrategyID] [int] NOT NULL,
[Created] [datetime] NOT NULL,
[Modified] [datetime] NOT NULL,
[Deleted] [datetime] NULL,
[Liquidity] [nvarchar](255) NULL,
[ShortName] [nvarchar](200) NULL,
[URLName] [nvarchar](200) NULL
)
GO
CREATE TABLE [dbo].[ShareClass](
[ID] [int] NOT NULL,
[Bloomberg] [nvarchar](50) NULL,
[ShareClassID] [int] IDENTITY(1,1) NOT NULL,
[ISIN] [nvarchar](50) NULL,
[LocalCurrency] [nvarchar](50) NOT NULL,
[Name] [nvarchar](255) NOT NULL,
[Status] [bit] NULL,
[FundID] [int] NOT NULL,
[Created] [datetime] NOT NULL,
[Modified] [datetime] NOT NULL,
[Deleted] [datetime] NULL,
[PricingFrequency] [varchar](50) NULL
)
GO
CREATE TABLE [dbo].[ShareClassCountries](
[ShareClassID] [int] NOT NULL,
[CountryCode] [nvarchar](10) NOT NULL,
[Language] [nvarchar](10) NOT NULL,
[CountryName] [nvarchar](50) NOT NULL,
[FileReceived] [bit] NOT NULL,
[FileActive] [bit] NOT NULL,
[NewFileActiveDate] [datetime] NULL,
[DateLastRequested] [datetime] NULL,
[DateDeleted] [datetime] NULL,
[FileSize] [varchar](10) NULL,
[DateReceived] [datetime] NULL
)
I need to display the data using these 3 tables in matrix form as:
Fund Name(Row header) --> It would just be a single row listing all the fund names from fund table
ShareclassName(Column 1), --> It would be shareclass name which would come from 'Shareclass' table. These names will be repeated as a single shareclass is used in multiple countries.
CountryCode (Column 2) --> It would come from ShareClassCountries table. Country code directly corresponds to the shareclassId so a shareclass 'A' can have 3 country code CHF,EUR,GBP and shareclass 'B' can have same country code plus more country code or less
FileActive Row value ✓ if the value is 1 and X if value is 0
Fund 1 Fund 2 Fund 3 Fund 4
F1 F2 F3 F4
Shareclass1 country1 ✓ ✓ ✓ ✓ ✓
country2 ✓ ✓ ✓ ✓
country3 ✓ ✓ ✓ ✓
country4 ✓ ✓ ✓ ✓
Shareclass2 country1 ✓ ✓ ✓ ✓
country2 ✓ ✓ ✓ ✓
Shareclass3 country1 ✓ ✓ ✓ ✓
country1 ✓ ✓ ✓ ✓
All the three tables have relation and I want to show the data using these 3 tables in the matrix format on aspx page. I have used repeater, gridivew etc but i have not showed the data in matix using any of these control.
I have searched on google and some suggests to use pivot table but as of now i have no idea how can that be used...
Please let me know how this can be achieved..
Help appreciated..