Help Desk Software & Beyond
May 23, 2012, 06:21:36 AM *
Welcome, Guest. Please login or register.
To post messages you need to register. We apologize for inconvenience, but this is to prevent spam.
Registration is instant (no email verification) and we do not ask for any personal information.

Login with username, password and session length
News: Welcome to Help Desk Software forum!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: [REQ] Date Range option in reports  (Read 2475 times)
arvin
Sr. Member
****

Karma: 10
Posts: 400


Yeah thats right !


View Profile
« on: December 08, 2008, 09:47:19 AM »

I see that the (%TICKETFILTER%) has the date range code within it and the that (%TICKETFILTER%) is in the reports.html page .... shouldn't I be able to select a date range when building my reports?
Logged
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #1 on: December 08, 2008, 10:02:15 AM »

Apparently not, according to the Demo site.
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #2 on: December 08, 2008, 10:03:00 AM »

Is it really the same macro coming from the same subroutine?
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
arvin
Sr. Member
****

Karma: 10
Posts: 400


Yeah thats right !


View Profile
« Reply #3 on: December 08, 2008, 10:44:30 AM »

Quote
Is it really the same macro coming from the same subroutine?

from what I can see ....yes
Logged
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #4 on: December 08, 2008, 11:10:29 AM »

TTXReports fltrcode subroutine calls this...

Quote
TTXDesk::buildfilter($cfg,$query,$data)

... which we already know.

But the fltrcode subroutine, if you notice, is what builds the filter ($data) before calling the buildfilter subroutine.  Also notice that there is a variable called $nodr... (no date range?) before calling the buildfilter subroutine.

Quote
if ($nodr || $nostatus) {
    my @newflds;
    foreach my $fld (split(/\|/, $saveflds)) {
      next if $fld eq 'drange' && $nodr;
      next if $fld eq 'status' && $nostatus;
      push @newflds, $fld;
    }
    $cfg->set('fltrcols', join('|', @newflds));
  }
  if ($nodr) {
    $query->param(-name => 'drange', -value => '');
  }

Track down & figure out this $nodr variable and you may have solved it.  Perhaps a new option you can put in the Config file.
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
arvin
Sr. Member
****

Karma: 10
Posts: 400


Yeah thats right !


View Profile
« Reply #5 on: December 08, 2008, 11:53:05 AM »

BINGO !

That did it ....I commented out the following code ... and tested it ... the date range now shows up on the Report template.....I don't know if it will actually do anything yet ...... but it shows up 

Code:
   

##my @newflds;
    ##foreach my $fld (split(/\|/, $saveflds)) {
      ##next if $fld eq 'drange' && $nodr;
      ##next if $fld eq 'status' && $nostatus;
      ##push @newflds, $fld;
    ##}
    ##$cfg->set('fltrcols', join('|', @newflds));
  ##}
  ##if ($nodr) {
    ##$query->param(-name => 'drange', -value => '');
  ##}
  ##if ($nostatus) {
    ##$query->param(-name => 'status', -value => '');

Logged
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #6 on: December 08, 2008, 12:00:02 PM »

It's a start but I recommend a simpler solution.

Perhaps you can just set $nodr to a different value and get the same result?
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #7 on: December 08, 2008, 12:03:26 PM »

Find our where $nodr comes from and figure out how to set it to zero....  you'll probably get the same result with a cleaner/simpler mod.
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
arvin
Sr. Member
****

Karma: 10
Posts: 400


Yeah thats right !


View Profile
« Reply #8 on: December 08, 2008, 12:25:42 PM »

I hear ya ......

So far I find $nodr in the fltrcode sub routine only .... i've checked all other modules ...and found nothing .... Given that .....Couldn 't I just removed  "$nodr, $nostatus" and all references to them with in TTXReports? .....

 

sub fltrcode {
  my ($cfg, $query, $data, $nodr, $nostatus) = @_;

Logged
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #9 on: December 08, 2008, 12:29:55 PM »

try  $nodr = 0;

Quote
sub fltrcode {
  my ($cfg, $query, $data, $nodr, $nostatus) = @_;
  $nodr = 0;
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
arvin
Sr. Member
****

Karma: 10
Posts: 400


Yeah thats right !


View Profile
« Reply #10 on: December 08, 2008, 12:39:46 PM »

 Cheesy

I added that ..... and reversed the my changes and tested it ...and it works as well.

Logged
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #11 on: December 08, 2008, 12:44:42 PM »

I'm not sure of his intentions.  Since $nodr and $nostatus aren't set to anything anyplace, not sure what they're doing.  Probably part of something not yet implemented.

You could probably also get it from the config file

Quote
$nodr = $cfg->get('noreportsdaterange');

in ttxcfg.cgi:

Quote
noreportsdaterange = 0
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
webcarvallo
Newbie
*

Karma: 1
Posts: 15


View Profile
« Reply #12 on: February 01, 2012, 07:55:59 AM »

Cheesy

I added that ..... and reversed the my changes and tested it ...and it works as well.



Hi Arvin,  At last... ¿Can you figure out the way to get the date filter work?.
  I can get the date range filter showing at the reports page, but nothing (new) happens if I select a date range to get report.  ¿Had you got it?
Thanks in advance.
Andrés.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1 RC3 | SMF © 2001-2006, Lewis Media Valid XHTML 1.0! Valid CSS!
Page created in 0.029 seconds with 18 queries.