Please copy-paste a minimal example. i.e. something that we can build and run.
The Forum tutorials show you how to post code properly.
The drawStr() method should work fine with variables.
However you need to be careful how you write for() loops inside a firstPage(), nextPage() procedure.
The firstpage/nextpage loop is writing to the display in pages. The display is divided up into subsections by the controller, each subsection being a "page". Each time through the firstpage/nextpage loop, the library processes all the display commands, filling a page buffer with ONLY the display data that goes onto that particular page of the display, and ignoring anything outside of that page. To properly display all the pages, each iteration of the firstpage/nextpage loop needs to produce identical output, otherwise you end up with inconsistencies between pages (such as a variable that displays across two pages having a different value on the two pages).