Page 1 of 1

HELP! How do I add new report?

PostPosted: Tue May 17, 2016 8:45 am
by donX
Hi Guys,

I'm a newbie to ViciDial and Asterisk. I'm no hard coder and the way vicidial is adding reports seems to be pretty straight forward especially that everything is coded inside admin.php.

However, I tried creating a new report and this is how I did it.

1. I copied an existing report and renamed it "AST_TOTAL_Attempts.php" and uploaded it under ./vicidial folder.
2. Added a code block inside admin.php
Code: Select all
if ( (preg_match("/Total Number of Attepmts/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) )
         {echo "<LI><a href=\"AST_TOTAL_Attempts.php\"><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK size=2>"._QXZ("Total Number of Attepmts")."</a></FONT>\n";}

and

added the Report name inside the string list of $Vreports and $UGreports.

3. Under the AST_TOTAL_Attempts.php, i have changed the Report name to "Total Number of Attempts"

Uploaded all changes to the existing Vicidial installation inside the server.

4. Logged in to vicidial and checked Reports section, however, the changes i've made isn't working.

I even directly edited the php file in admin and changed any STATIC string to something different and saved it but any changes in the UI isn't reflecting.

Please help!

Thanks,

Re: HELP! How do I add new report?

PostPosted: Tue Jun 21, 2016 2:14 pm
by williamconley
1) "...everything is coded inside admin.php..."
2) Then you misspelled "attempts" in "(preg_match("/Total Number of Attepmts/" in a preg_match. Thus that code will never be executed.
3) Then you said "the changes i've made isn't working" without specifying what you expected to happen and what really happened. (A bit vague, and while I *assume* you expected to see your new report somewhere but did not see it ... you did not *say* this ...)