Reports Question - Not Show null tables

I am in the process of building a well documented discount and void setup. I am pretty much done I was just wondering if there is a simple way to not show null tables of Managers that did not have any void activity?

I know one way for sure would be to check which admin has void activity in sql and only have my script return those users… I dont know SQL well and was wondering if there is a simpler way that I can think of?

I would imagine you would do by using an @ declare and listing .sum for relative data and add a report constraint against that column. Sure there was ability to express column as I {2}=x or similar.
However see your using a script to get the list which makes more interesting.
I guess you could call a report from the script so as it’s looping users for admins (which I guess is what it’s doing) it calls report of relative data and checks for value, if no value it’s skipped.

The script is firing some sql query to get back admins separated by commas.

So if I’m understanding you correctly I can put a constraint on the report tags? Also I think I don’t have to call a script I could just use the sql report tag.

You can do sql directly with the report sql expression.
By constraint I mean after the colon like most report expressions but was thinkig something like what pauln was trying here;

By in the script/@ part so 0/null sale users are left out of the list and so tables not created.

The trick is okay maybe I can make the data disappear but It would still show the table title and total Voids at bottom. I think the only way out of this is filtering what users I feed to it.

Now feeding the correct users:
In the script I either need sql which is my last option considering it is my weakest skill lol or calling a report from the script as you mentioned above… Is that possible? I tried and got nothing but the report string itself.

That’s what I’m saying… Not the data in the table but the users themselves…

I manned up and learned sql. Solved it with changing my sql code :slight_smile:

Thanks JTR

The API can verify admin. It’s used for the time clock config task.

The GQL api or something inside scripts?

Regardless I need to spend 2 days looking at emre’s reservation and time clock configs. I know ill learn a lot of shortcuts lol.

This is different though use case though, I need to tell this report every admin that did a void. I did voids a little different since I wanted a void reason, void user, and void admin that approved it.

1 Like

No GQL is not the API it’s separate. There is an API we can access.

1 Like

On a side note… any idea why this might not be showing it with commas in between but instead new lines?

I was reading on some examples from Q and he said this format would add a comma in between each cell.

>>{REPORT SQL DETAILS:@@QMCLearningScript:’{Start}’,’{End}’:F.OState_State:,}



You calling that in report SQL? You add the {0},{1},{2} etc on the end for formatting

Correct im using the above tag in a report.
Okay how do those {0},{1},{2} work… what do they represent, different values? If so, what if I have 30 values?

hmm… so like this? {REPORT SQL DETAILS:@@QMCLearningScript:’{Start}’,’{End}’:F.OState_State:{0},{1},{2}}

not showing anything different then previous

Reports expressions are a bit of a mindfield for most of us
I have seen before methods for setting the column seperator buy doing :{0}:,} for a single value list ie an @ declaration for menu items organised by total sales but inky reporoting menu item seperated by column
{Report order details:menu item name,order total.sum.desc:{0}:,}
And when using report SQL setting the returned field values like;
Will pull examples when back at computer is needed but sure you will find on forum with search.

I have been digging through the forum like a mine full of gold haha. I found a great post by QMC but lost it arggggghhhhh im so upset with myself lol now I cant find it anymore after searching again for the last hour.

This is the last piece of the puzzle for me to finally get my desired void system lol

man this is so weird… I found some examples and nothing changes the output

aha I found that post from Q

im under the impression that it might be the fact that I only have one column

Wouldn’t you want two though, the name and the sales value for it so you can disregard 0 sales users?

No im actually just trying to pull all order states where order state name = void, and trying to have them separated with commas. So I already did that with sql. It just searches the orders table and finds any orders with order state tagged…

Ok yer but same priciple, user first column, value of total voids then constraint/ignore users with 0 void value.

I just used this command and it just gives me a list of states that were tagged

and I get the data I need just fine. Im just struggling to put a comma in between it so it can feed my report with the admins to look for.


Im trying to do this…

I’d need to refer to my reports to see the formatting part.
Yours dates are hard coded? Guessing that for testing?