HELP! How do I add new report?

Discussions about development of VICIDIAL and astGUIclient

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

HELP! How do I add new report?

Postby donX » Tue May 17, 2016 8:45 am

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,
donX
 
Posts: 50
Joined: Tue May 17, 2016 8:38 am

Re: HELP! How do I add new report?

Postby williamconley » Tue Jun 21, 2016 2:14 pm

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 ...)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20018
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to Development

Who is online

Users browsing this forum: Bing [Bot] and 31 guests