Label printing problem
Posted by Pete Whittet on April 5, 2010 at 8:50pm
First attempt at printing labels, using a .qll file. I get the following error message:
An error occurred while printing the report:
qrtReportsErr: qrperr: couldn’t find file pReportName
I've tried it with a report (.qrl) and the same data - it works fine. I also tried supplying the full path and filename of the .qll file - same problem. Any pointers please ?
(Windows XP Home SP3)
Here's the code:
global gCurrentQuery
on mouseUp
-- PRINT 3x7 LABELS
put gCurrentQuery into theSQL
put offset("FROM", theSQL) into tFrom
replace char 1 to (tFrom - 1) of theSQL with "SELECT *, Address AS AddrTemp " in theSQL
revSetSQLOfQuery "dummy", theSQL -- dummy is a query set up via the Database Query Builder for this stack
put "Labels 3x7.qll" into tLayoutFile
put "dummy" into tQueryName
put true into tShowPreview
qrtReports_SetPreviewWindowStyle "modal"
-- print the report
qrtReports_PrintLabelSetForQuery tLayoutFile, tQueryName, tShowPreview
end mouseUp
=====
Reply by Jan Schenkel on April 6, 2010 at 8:11pm
Hi Pete,
It looks like you spotted a bug that's been there since version 1.0 - and nobody noticed it...
I'll fix this in the next release; in the meantime, here's a workaround for you:
##
-- print the report
put revCursorOfQuery("dummy") into tCursor
qrtReports_PrintLabelSetForCursor tLayoutFile, tCursor, tShowPreview
##
This uses the (undocumented) 'revCursorOfQuery' function to fetch the underlying revdb cursor of the automated query. It should do the trick until I get the fix out.
HTH,
Jan Schenkel
--
Quartam Reports & PDF Library for Revolution
www.quartam.com
=====
Reply by Pete Whittet on April 6, 2010 at 8:18pm
Fantastic - thanks Jan.
Label printing problem
-
- Posts:87
- Joined:Sun Jul 18, 2010 5:23 pm [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
===== The above post was imported from the old forum hosted at quartam.ning.com =====