don.vijay05
(don.vijay05@gmail.com)
August 2, 2014, 4:37am
1
Hello Friends.
I need to Export the reports from the grid view. Am using Some extension and its works. Now the problem is the foreign key values are exported as values. like 4 and 12 likewise. I need to export the name of the values.
Otherwise Export what exactly in the gridview i need to download from the grid help me out…
khushal
(Khushal Fadiya)
August 6, 2014, 11:57am
3
Hello Friends.
I need to Export the reports from the grid view. Am using Some extension and its works. Now the problem is the foreign key values are exported as values. like 4 and 12 likewise. I need to export the name of the values.
Otherwise Export what exactly in the gridview i need to download from the grid help me out…
Use the relationship that you have given in model.
For e.g. $model->relation_name->field_name_of_other_table
If in result table student rollno is foreign key and you want to display student name instead of roll no in result report :
:: Model file of Result ::
public function relations()
{
return array(
'student' => array(self::BELONGS_TO, 'Student_model_name', 'roll_no'),
);
}
:: View or Controller File ::
$student_name = $model->student->first_name;
don.vijay05
(don.vijay05@gmail.com)
August 7, 2014, 4:06am
4
Use the relationship that you have given in model.
For e.g. $model->relation_name->field_name_of_other_table
If in result table student rollno is foreign key and you want to display student name instead of roll no in result report :
:: Model file of Result ::
public function relations()
{
return array(
'student' => array(self::BELONGS_TO, 'Student_model_name', 'roll_no'),
);
}
:: View or Controller File ::
$student_name = $model->student->first_name;
Ya! I tried and I Got result @khush @l thank u