View Full Version : Modal Preview not working


Tom Patten
01-02-2015, 02:07 PM

I recently upgraded to v12. I can preview a report in modal preview once. When I try again, it locks up and I need to ctrl-alt-del.

:Report.preview("Report_Name","Clientid=var->v_pteid","", .t.)

Can someone confirm that modal printing does work in v12 using code similar to above.


~ Tom

Ronald Anusiewicz
01-02-2015, 03:39 PM
This works for me with no problems. According to the help, by default session_modal is .T. .

query.filter = "Gradyear = Var->vYear"
query.order = "Name"
'replace variables in the filter with their actual values
query.filter = convert_expression(query.filter,"V")


query.filter = "between(Date_joined,Var->vStart,Var->vEnd)"
query.filter = convert_expression(query.filter,"V")
query.order = "cdate(date_joined)+fam_id+name"


I have many other reports which I run with slightly different codes but I have not had any problems with lockups.


Tom Patten
01-02-2015, 03:48 PM

Please try adding the last parameter, .T. to your code and let me know if it works. I may be confusing modal and modeless, but I want the preview to appear in its own window.


Try it twice - I got it to work once, but after that it locks Alpha up.

Did it work?

~ Tom

Ronald Anusiewicz
01-02-2015, 05:11 PM
Sorry, I stepped away for a while.
I ran this half a dozen times with no issues.



In all the years I have been running reports, I never ventured beyond report name, filter and order.
The modal option is interesting.


Tom Patten
01-02-2015, 05:46 PM

Hhmmmmmm... I can only preview if I leave the last parameter off, then its not modal, so it looks odd if the script continues.

Are you using the latest build? I'll check mine. As I said, I just subscribed and downloaded the full program. Maybe I'm missing an update.

Anyone else having a problem when adding the last parameter - .T. to preview?



Tom Patten
01-02-2015, 05:53 PM
Build 2614_4409 here.

~ Tom

Tom Patten
01-02-2015, 09:19 PM
More info: I'm running Windows 7 Professional

If I change the last parameter from .T. to .F. it runs fine.

Am I the only one in Alpha Land with this problem?

~ Tom

Tom Patten
01-02-2015, 10:30 PM
I've reinstalled A5v12 and still doesn't work. Driving me nuts!!

Someone kindly try this.

Open AlphaSports

Exit to Control Panel

View -> Settings -> Preferences -> Reports -> Printing from Preview Window -> set to YES

Open Main Menu in design mode

Change code on Report -> Product List to: report.preview("Product List","","",.T.)

Save and Open Main Menu.

Click on Product List. Is there an "Exit Preview" button on the tool bar?

Now close it and reopen the same report.

Did it CRASH?

Thanks for taking a look.

~ Tom

Ronald Anusiewicz
01-02-2015, 11:21 PM
Hi Tom,

Sorry, I was not on since my last response. I'm using build 2446-4365. I haven't installed the new patch yet. I always wait a while just in case there are issues. It appears that this may be patch related. You may want to submit a bug report.

You can open Alpha Anywhere, click on help, download patches, at the bottom is previous updates. 2446 is the first one at the top of the list. You may want to download that one and try it. That's the one I'm using and my app is not crashing.

Ray in Capetown
01-03-2015, 04:13 AM
Tom I followed exactly the process you described, honestly I thought these fairly unique settings would give me the same experience you describe. Thinking this would set up some improper closing of a dialog. No crash or misbehaviour.
WIN 8.1
AA v3 developer edition build 2446
at least seven open close sequentially

Tom Patten
01-03-2015, 05:44 PM
I submitted a bug report and Selwyn got back to me to confirm it is a bug and they are working on it.

FYI - I submitted my bug report last night about 10:30 pm and had a reply from Selwyn when I got up this morning. Pretty darn good response. He also pointed out that you can test for this bug by just putting the report code in the Interactive Window.

~ Tom

Tom Patten
01-03-2015, 06:54 PM
In conclusion, Selwyn just wrote to say the fix will be in tomorrow's pre-release build.

Done within 24 hours on a weekend, and for the desktop.

I'm not feeling neglected :grin:

~ Tom