Preview Error

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.
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
JosepM
Posts:28
Joined:Fri Aug 13, 2010 12:26 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
Preview Error

Post by JosepM » Tue Jul 26, 2011 8:51 am

Hi Jan,

I have a problem that I don't know how solve. If you can help me...

I try to preview many reports from a repeat loop but ever after the first all the other previews show like the attached snapshot.

Any idea, sometimes I can see how the scrollbars first appear with the correct size but then reduce to appear as I show.

Salut,
Josep M
Attachments
Captura de pantalla 2011-07-25 a las 22.00.54.png
Preview Error
(74.97KiB)Not downloaded yet

JanSchenkel
Site Admin
Posts:110
Joined:Sun Jul 18, 2010 5:21 pm
Location:Aalst, Belgium
Contact:

Re: Preview Error

Post by JanSchenkel » Wed Jul 27, 2011 7:25 pm

Hi Josep,

This is a very strange issue - one that I can't seem to simulate on my iMac running MacOSX 10.4 Tiger.
I can try it again on my MacBook Pro running MacOSX 10.6 SNow Leopard later this evening.

Here's what I did:
- I opened LiveCode 4.6.3, then the qrtReportsLib.rev stack, and then the Report samples.rev stack.
- I went to the page for the Simpe Reports - Printing Stacks example, and modified the card script.
- The change was simple, as I simply put a 'repeat 30 times' loop around the call to qrtReports_PrintReportForStack.
- It took some time, but it opened up all the preview windows correctly with everything properly expanded.

If you do the same thing, does it also go haywire in your development environment?

Jan Schenkel.
Quartam Developer Tools for LiveCode
http://www.quartam.com

JosepM
Posts:28
Joined:Fri Aug 13, 2010 12:26 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

Re: Preview Error

Post by JosepM » Wed Jul 27, 2011 8:28 pm

Hi Jan,

Let me try later and post the results.

My loop code is:

Code: Select all

 ## Load Datagrid data
   ##
   put the long ID of this stack into tStackName
   put the dgData of group "dg_lineas" into sDgData
   put the dgData of group "dg_lineas" into sDgDataCopia
   
   set itemdel to comma
   put item 2 of the extents of sDgData into sRowCount
   
   
   ## Loop to print each record with her image if is available
   ##
   ## First check the number of rows, then for each one call the report.
   ## Also check that the image for the row code exist, if not warn the user asking if want print without image.
   
   
   repeat with x=1 to sRowCount
      put 0 into sRowIndex
      
      MyPrintReport tPlantillaSeleccionada,True
      
   end repeat


   ## End Loop
Salut,
Josep M

JanSchenkel
Site Admin
Posts:110
Joined:Sun Jul 18, 2010 5:21 pm
Location:Aalst, Belgium
Contact:

Re: Preview Error

Post by JanSchenkel » Wed Jul 27, 2011 8:42 pm

No glaring mistakes there, so we'll have to see what happens in a ontrolled enviuronment, and then widen the net until we capture the cause.
In the meantime, I did the same test on my MacBook Pro, and all looked as it should.

Thanks in advance for the feedback,

Jan Schenkel.
Quartam Developer Tools for LiveCode
http://www.quartam.com

JosepM
Posts:28
Joined:Fri Aug 13, 2010 12:26 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

Re: Preview Error

Post by JosepM » Wed Jul 27, 2011 10:07 pm

One tip, if I resize the erroneous preview, the scrollers are resized to the correct size like the first report, all is moved to their positions, the top buttons... all...

Salut,
Josep M

JanSchenkel
Site Admin
Posts:110
Joined:Sun Jul 18, 2010 5:21 pm
Location:Aalst, Belgium
Contact:

Re: Preview Error

Post by JanSchenkel » Thu Jul 28, 2011 5:36 am

Is it possible that somewhere along the way the 'lockMessages' is set to 'true'? That would prevent the engine from sending a 'resizeStack' event message to the preview stack as it is moved and resized for optimal view by the user. You could try changing your loop to:

Code: Select all

   repeat with x=1 to sRowCount
      put 0 into sRowIndex
      MyPrintReport tPlantillaSeleccionada,True
      if the lockMessages is true then
         put the milliseconds && "messages were locked after run" && x && "- unlocking" & return after msg
         set the lockMessages to false
      end if
   end repeat
And see if that helps and if anything shows up in the message box.

Other question: did you recently add a plug-in to your LiveCode environment? Perhaps a frontscript is grabbing the 'resizeStack' message and not passing it?

Jan Schenkel.
Quartam Developer Tools for LiveCode
http://www.quartam.com

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
[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