You need to sign in to do that
Don't have an account?

How to get the report in Matrix Format
Hi All,
I have a requirement where in I have to get the report in matrix format for which I have written a controller and a Visual force page. I am able to retrieve all the values, but there is alignment problem and column names are appearing repeatedly. All the values are printed under a single column. I tried using Group by function, but it is not working. I have tried to use Distrinct function, but it is not supported in SOQL. So could any one suggest a solution for this problem.
The code for the Controller and Visual force page are written below:
Controller Class:
Visual Force Page:
<apex:page controller="Appointment">
<html>
<head>
</head>
<body>
<table cellpadding="0" cellspacing="0" width="100%" border="1 #000000 solid">
<th/>
<apex:repeat value="{!app}" var="a">
<th align="left" valign="top" style="border:1px #000000 solid;height:20px; width : 180px;">
<font style="font-size: 13px;" color="#000000 " face="Calibri"><b><center><h3> {!a.Doctor__r.Name} </h3></center></b></font><br/></th>
</apex:repeat>
<apex:repeat value="{!app}" var="a" rendered="true">
<tr>
<td style="border: 1px #000000 solid ;">{!a.Appt_Time__c}</td>
<td style="border: 1px #000000 solid ;">
{!a.Account__r.Name}
<br/>
{!IF (a.New_Request__c == true, "New Request",
(IF(a.Chiropractic__c==true, "Chiropractic",
(IF(a.Shockwave__c==true, "Shockwave",
(IF(a.DTS__c==true, "DTS",
(IF(a.Knee_Brace_Fitting__c==true, "Knee Brace Fitting",
(IF(a.Spine_Cor_Bracing__c==true, "Spine Cor Bracing",
(IF(a.Spine_Cor_Review__c==true, "Spine Cor Review",
(IF(a.Physiotherapy__c==true, "Physiotherapy",
(IF(a.Orthopedic_Consultation__c==true, "Orthopedic Consultation",
(IF(a.Others__c==true, "Others",null
)))))))))))))))))))}
<br/>
{!a.Account__r.Phone}
<br/>
{!IF( a.Check_In__c == true, "Check In",
(IF(a.Check_Out__c==true, "Check Out",
(IF(a.Cancelled__c==true, "Cancelled",null )))))}
</td>
</tr>
</apex:repeat>
</table>
</body>
</html>
</apex:page>
Thanks and Regards
Arun