Whether you're using the Standard or Professional Edition of Quartam Reports, this is the place to ask general questions about using this industry-level reporting tool for LiveCode.
-
blairetabay - Posts:8
- Joined:Thu Mar 27, 2014 3:07 am
[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
License Error
Post
by blairetabay » Thu Mar 27, 2014 3:28 am
here is my code
Code: Select all
local sCurrentRecord
local sDetail, sDocument, sLastRecord,hem
local tLayoutFile, tDataBroker, tShowPreview
on mouseUp
put 1 into sCurrentRecord
if "qrtReportsLib" is not among the lines of the stacksInUse then
start using stack "qrtReportsLib"
end if
# here is my license goes here
put AbsolutePath ("hematology.qrl") into tLayoutFile
put the long ID of me into tDataBroker
put true into tShowPreview
qrtReports_PrintReport tLayoutFile, tDataBroker, tShowPreview
end mouseUp
#single record printing goes here
on MyPrintReport
put 1 into sCurrentRecord
put fld "txt_hemoglobin" into hem["hemoglobin"]
put fld "txt_hematocrit" into hem["hematocrit"]
put fld "txt_leutocrit" into hem["leukocyte"]
put fld "txt_difCount" into hem["diffCount"]
put fld "txt_stab" into hem["stab"]
put fld "txt_segmenter" into hem["segmeter"]
put fld "txt_lymphocytes" into hem["lymphocyetes"]
put fld "txt_eosinophil" into hem["eosinophil"]
put fld "txt_monocytes" into hem["monocytes"]
put fld "txt_thromCount" into hem["thrombocyte"]
put fld "txt_bloodType" into hem["bloodType"]
put fld "txt_RH" into hem["rh"]
put fld "txt_bsmp" into hem["bsmp"]
put fld "txt_bledTime" into hem["bleedingTime"]
put fld "txt_clotTime" into hem["clottingTime"]
put fld "txt_erythrocyte" into hem["esr"]
-- put fld "" into hem[""]
-- put fld "" into hem[""]
-- put fld "" into hem[""]
end MyPrintReport
#looping printing goes here
on MyPrepNextDetail
end MyPrepNextDetail
function qrtReports_endOfReport
-- we only have to print a single record
if sCurrentRecord > 1
then return true
else return false
end qrtReports_endOfReport
on qrtReports_moveNextRecord
-- merely update our sCurrentRecord local variable
#MyPrepNextDetail
MyPrintReport
add 1 to sCurrentRecord
end qrtReports_moveNextRecord
function qrtReports_valueOfExpression pExpression
-- this function will evaluate an expression and return the result
put pExpression into tExpression
replace "<QUOTE_REPLACEMENT>" with quote in tExpression
return value(tExpression)
end qrtReports_valueOfExpression
function AbsolutePath pRelativePath
## this helper function looks for files from the directory where the stack is saved
put the effective filename of this stack into tAbsolutePath
set the itemDelimiter to "/"
put pRelativePath into item -1 of tAbsolutePath
return tAbsolutePath
end AbsolutePath
-
JanSchenkel - Site Admin
- Posts:110
- Joined:Sun Jul 18, 2010 5:21 pm
- Location:Aalst, Belgium
-
Contact:
Post
by JanSchenkel » Thu Mar 27, 2014 6:18 am
Can you post a screenshot of the actual error you're seeing? And describe at which point it appears?
Which LiveCode version did you use to build the standalone?
I'm sure we can get it sorted..
(As an aside, there's no need to post mutiple times; due to excessive spamming in the past, posts from new members require my approval)
Jan Schenkel.
-
blairetabay - Posts:8
- Joined:Thu Mar 27, 2014 3:07 am
[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
Post
by blairetabay » Sat Mar 29, 2014 4:27 pm
Hi Jan,
here is the Error Screen Shoot that you ask.
Thanks,
blairetabay
- Attachments
-
- IMG_03292014_232109.jpg
- error
- (13.63KiB)Not downloaded yet
-
blairetabay - Posts:8
- Joined:Thu Mar 27, 2014 3:07 am
[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
Post
by blairetabay » Sun Mar 30, 2014 1:11 pm
i'm using the version 1.1.6
the error occur when i press the button print.
-
snop21 - Posts:1
- Joined:Mon Mar 31, 2014 9:13 am
[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
Post
by snop21 » Mon Mar 31, 2014 9:28 am
Good Day,
We have the same problem.. I am using Livecode 6.5
I attached the screenshot of the error.
-Regards
snop21
- Attachments
-
- IMG_2968.JPG
- Error
- (223.96KiB)Not downloaded yet
-
JanSchenkel - Site Admin
- Posts:110
- Joined:Sun Jul 18, 2010 5:21 pm
- Location:Aalst, Belgium
-
Contact:
Post
by JanSchenkel » Mon Mar 31, 2014 9:33 pm
The best way to load the report library and initialise it with your license key, is to add a handler such as the following to your project mainstack script:
Code: Select all
command LoadReportLibrary
if "qrtreportslib" is not among the lines of the stacksInUse then
start using stack "qrtreportslib"
qrtReports_InitLicense "<YourLicenseKeyHere>"
end if
end LoadReportLibrary
From then on, whenever you're about to print a report, simply call the LoadReportLibrary before you call the qrtReports_XYZ commands and functions.
If that still doesn't do the trick, there may be a rogue script which unloads and reloads the library. But that's difficult to track down from a distance without access to your project.
HTH,
Jan Schenkel.
-
blairetabay - Posts:8
- Joined:Thu Mar 27, 2014 3:07 am
[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
Post
by blairetabay » Tue Apr 01, 2014 3:01 am
hi sir Jan,
here is the full stack that i have. Still it will not print on the standalone. But on the IDE it will print. i'm working on version 1.1.6 of quartam.
best regards,
blairetabay
(---Attachment removed by forum admin as it contained an unencrypted license key---)
Last edited by
JanSchenkel on Tue Apr 01, 2014 5:54 am, edited 1 time in total.
Reason: Removed .zip file as it contained an unencrypted license key.
-
blairetabay - Posts:8
- Joined:Thu Mar 27, 2014 3:07 am
[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
Post
by blairetabay » Thu Apr 03, 2014 4:32 am
hi Jan,
it's been a long day for me to finish my Printing code that will work on the standalone.
i did all the necessary handlers that i search and they recommend to do but still
printing is fell down on the Standalone. IDE LC is working. On the standalone it always prompt not i'm not a license.
How it could be that i bought a license for our Quartam.
I'm happy to hear from you Jan.
best regards,
blairetabay
-
blairetabay - Posts:8
- Joined:Thu Mar 27, 2014 3:07 am
[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
Post
by blairetabay » Thu Apr 03, 2014 4:50 am
H Jan,
this is the full stack that I have.
i will just PM you for the license.
best,
blairetabay
- Attachments
-
- print.zip
- (4.71KiB)Downloaded 1794 times
-
JanSchenkel - Site Admin
- Posts:110
- Joined:Sun Jul 18, 2010 5:21 pm
- Location:Aalst, Belgium
-
Contact:
Post
by JanSchenkel » Mon Apr 14, 2014 7:21 am
You could be running into an elusive problem where LiveCode decides to unload/reload a library behind your back.
That can be prevented by tweaking the LoadReportsLibrary handler a bit:
Code: Select all
command LoadReportLibrary
if "qrtreportslib" is not among the lines of the stacksInUse then
push card
go invisible stack "qrtreportslib"
start using stack "qrtreportslib"
qrtReports_InitLicense "<YourLicenseKeyHere>"
pop card
end if
end LoadReportLibrary
That said, you are using a Quartam Reports Standard Edition - which means you can't use your own custom data brokers.
The data will have to be stored in a single stack or in a single database cursor.
Jan Schenkel.
Post Reply [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