Filter on variable value in a temp table

jknauft
jknauft Posts: 89
Is it possible to set a filter based on the value of a variable in a temp table. I have a variable TotalBudget and I want to filter the contents of the temp table as it's being written to exclude values less than zero. Thanks.

Jon

Answers

  • jknauft
    jknauft Posts: 89
    Using Currreport.Showoutput(false) supresses the lines correctly but it screws up the group totals that are being calculated.

    Jon
  • jversusj
    jversusj Posts: 489
    Maybe I misunderstand what you are asking, but couldn't you calculate this value before writing the record to the temp table? Then, if it doesn't meet your criteria, you don't insert into the temp table. Your report then runs straight against that temp table and doesn't have to consider values less than 0 because none exist.

    something like:
    IF TotalBudget >0 THEN
       TempTable.INSERT
    ELSE
      //do something else as needed or call it quits earlier...;
    
    kind of fell into this...
  • jknauft
    jknauft Posts: 89
    Great minds think alike. I just came up with the same solution. I guess I've been staring at this report for too long. Thanks.

    Jon
  • jversusj
    jversusj Posts: 489
    jknauft wrote:
    Great minds think alike. I just came up with the same solution. I guess I've been staring at this report for too long. Thanks.

    Jon
    Happy to hear...
    I can identify. I have been piecing together a custom VAT report for almost 2 months. Everytime i get back to working on it, i have to reevaluate what i did last time to figure out where i need to go next. yuck.

    I wish there was a canned VAT report that presented data in the way i've been told i need it.
    kind of fell into this...
  • jknauft
    jknauft Posts: 89
    It's been interesting learning the Navision Report writer. I've worked with Crystal Reports for 10 years and I could have created this report in 2 hours. Going on my second day... 8-[

    Jon
  • Savatage
    Savatage Posts: 7,142
    jknauft wrote:
    It's been interesting learning the Navision Report writer. I've worked with Crystal Reports for 10 years and I could have created this report in 2 hours. Going on my second day... 8-[
    Jon

    I hear ya!
    Note: you can use Crystal w/Navision