At 3rd level, My Battlemaster Fighter chose Commander's Strike for one of his maneuvers. He is a Dex-based fighter and uses shortsword and dagger in melee. This previous question was whether he could forgo his two-weapon fighting bonus action dagger attack to activate his Commander's Strike. Answers to the question included the rule that the forgone attack had to be granted as part of the Attack action, and the ruling that 'You cannot 'forgo' an attack you cannot make'. Both of these answers were reasonable and well-argued.
In our next session, my Battlemaster will level to 5th and gain Extra Attack. For his missile weapon he uses a Heavy Crossbow. Since my DM has not offered feats, this is sub-optimal, but was chosen for background and flavor reasons.
The loading property means that even with Extra Attack, I can fire the crossbow only once per action. I plan to have him fire once, let go of the crossbow with one hand, and throw a dagger as his second Extra Attack1.
When I would like to have him use Commander's Strike, I plan to have him take the crossbow shot and then spend a bonus action to forgo his thrown dagger attack and call out the Strike. This should work well so long as I have enough daggers and I have targets remaining within 60 feet.
However, suppose I am out of daggers and/or all enemy targets are beyond 60 feet.
I couldn't make a crossbow attack on a distant target (because of the loading property). I couldn't make a dagger attack on a distant target (either because I am out of daggers, or because the weapon properties say "You can't attack a target beyond the weapon's long range").
Under the principle of 'You cannot forgo an attack you cannot make', can I not make Commander's Strike in this situation, because I don't have a legal attack to make?
Commander's Strike says:
When you take the Attack action on your turn, you can forgo one of your attacks and use a bonus action to direct one of your companions to strike.
It does not say that my forgone attack has to be on an opponent, nor that my companion's attack has to target someone that I could have attacked. If I am out of daggers and all enemy targets are at greater than 60 feet, but I have allies within 60 feet, can I forgo throwing my crossbow at one of my allies (not take my second Extra Attack as an improvised attack with something I already have in hand) in order to give Commander's Strike?
1My understanding is that I can pull forth the crossbow bolt as part of the crossbow attack (ammunition property), draw the dagger as his one free object interaction, and throw the dagger as his second attack in the same attack action. Switching from having the crossbow held in one or two hands is free and does not require actions.