⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

select field before printing



newbie2005

newbie2005
  • profile picture
  • Member

Posted 19 June 2014 - 23:30 PM

Any one have idea how to program :

customer would like select field by own before printing ?

 

My idea is 

  $crud->columns() function to entry field to fulfill the inquiry, but customer would like
select field by own time by time, no pre-program.
 
Anyone help ?

Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 21 June 2014 - 07:52 AM

well you have to create a custom call where u allow the user to select fields he want in the print and submit it to the actual function call where gc is applied and set the columns that were selected. But this time .. u give the action directly 2 print it.

 

eg:- class/action/print?selectedField=.........

 

That should help u / solve the problem

 

Happy GCing:)


newbie2005

newbie2005
  • profile picture
  • Member

Posted 24 June 2014 - 10:02 AM

My idea is pass fieldlist and object $crud to view for select outfield, after then

pass back fieldlist and object $crud to controller to output excel.  But how

to pass back object $crud from view to controller ?


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 25 June 2014 - 03:02 AM

welll its a form with checkbox you can allow the users to select.. the values - keep it the name of the field.. and the checkbox to either be an array (better) or individual field name (tough managing it @backend) - either way around, collect the selection, create an array and set it as crud->columns($selectionArray) - that should do the trick.


newbie2005

newbie2005
  • profile picture
  • Member

Posted 02 July 2014 - 17:35 PM

Thanks, I done.