1

I'm new at Yii, and I'm trying to generate some reports with some user input (fill the form and then click 'generate'). I want to query my database to look for some transactions on a date range, but I really don't know how to do it.

Does anyone have any examples I might look at?

Thanks in advance. I would really appreciate the help. Regards.

Wes
  • 4,781
  • 7
  • 44
  • 53
jdiegod
  • 31
  • 2
  • 5

2 Answers2

0

In Yii, you can create a table and using the Gii crud generator to create a form and view. This view could be considered a report.

what kind of report do you want exactly?

jarchuleta
  • 1,231
  • 8
  • 10
  • Thanks for your answer lets suppose I create a form where I have to put a date range for some report, lets say the amount of transactions i've done on this date range. something like that i dont know if i was clear enough? – jdiegod May 04 '12 at 00:56
  • in the view you would add 2 controls to choose the date. Then in the controller, you would use the date's to filter your data. – jarchuleta May 04 '12 at 15:41
  • Mmmm ok is something like the default search that the CRUD generator gives you, but I want to get the results after I click the button, before this i dont want that anything is displayed – jdiegod May 04 '12 at 22:46
0

Commonly reports are taken by existing created transaction only.there is no need to create any input fields to reports.As by the answer of 'jarchuleta' you can create forms using crud and For date range report you can check this, question may be irrelevant but the code i posted is for date range report

Community
  • 1
  • 1
jayanthan
  • 371
  • 2
  • 10
  • 20
  • Thanks but, how do I generate after I put the date range? how do I handle the "generate button"? – jdiegod May 04 '12 at 22:44
  • for my projects to generate the reports by existing gridview using checkbox to with select all rows and give the all selected PK of data to controllers by using a button.and using sql method you can fill the report table.sorry for my late reply and bad English..if you have any doubt you can ask. – jayanthan May 08 '12 at 06:28