PDA

View Full Version : Potential Bug using "xxxxxx"$Status & Order & Conditional Statements


ABC123

Rudy16
04-30-2008, 08:39 AM
I beleive I encountered a bug when using the the "xxxxxx"$Status, Order, & Conditional Combo within an Action Script using a Button's "OnPush". I'm not sure how to get this to Alpha's tech support's "Bug" department and thought I'd post it here and someomr could eithrt forward it to teck support or guide me on how to submit it.

While "xxxxxx"$Status works, it will not sequence the Report output. I tried deleting the Action Script, Tr-building the Indexes of the table and re-building the Action Script. The same thing happens ecevy time. I get the right selection, but no sort.

On Push Statements follow:
1) "ON Push" - Preview a Layout is selected.
2) Report is Selected
- RenterResLastName is the Report selected
- Display "Print/Preview" prompt at Runtime is selected.
3) Select Records to Print
- Record selection by a Filter Expresssion is selected
4) Filter Expression
- "Renter"$Status
5) Order Expression
- Lastname

Note: I have Label's and Report Buttons with the exact same syntax as described above and they work just fine. I spent a many hours trying to figure out what I did wrong, if anything, however I do not see any error on my part.

Richard or Selwyn, I know you browse the board so perhaps you can respond to this potential bug. I'd gladly send you my app for your review.

Thanks,
Rudy Pataky

Bill Griffin
04-30-2008, 09:00 AM
Help menu - Send a bug report - follow the directions

You could also post your app here to see if anyone can repeat your problem

Rudy16
04-30-2008, 12:59 PM
Thanks Bill.

Tom Cone Jr
04-30-2008, 01:10 PM
Rudy, if you attach a sample database with instructions for us to follow to see the issue you're having perhaps we can suggest a work around or fix it for you.

-- tom

Rudy16
04-30-2008, 02:01 PM
Tom,

Your very gracious however I sent sent Selwyn my daya base and he is going to take a look at it. I'll keep you posted on this. Being that I'm not an expert, not even close, it's probably something I did that I cannot see.

Thanks again for the support,

Rudy

Rudy16
05-02-2008, 12:17 PM
Hi Tom,
Can you run an application on a couple of computers that are not networked? Application on one and the others attachs to them somehow with a cable?

Thanks

Rudy16
05-02-2008, 04:56 PM
What I meant to say was without a File Server. I did some research and I can Direct Connect 2 computers with Crossover Cables. Forget the previous message.

Selwyn Rabins
05-02-2008, 04:59 PM
I beleive I encountered a bug when using the the "xxxxxx"$Status, Order, & Conditional Combo within an Action Script using a Button's "OnPush". I'm not sure how to get this to Alpha's tech support's "Bug" department and thought I'd post it here and someomr could eithrt forward it to teck support or guide me on how to submit it.

While "xxxxxx"$Status works, it will not sequence the Report output. I tried deleting the Action Script, Tr-building the Indexes of the table and re-building the Action Script. The same thing happens ecevy time. I get the right selection, but no sort.

On Push Statements follow:
1) "ON Push" - Preview a Layout is selected.
2) Report is Selected
- RenterResLastName is the Report selected
- Display "Print/Preview" prompt at Runtime is selected.
3) Select Records to Print
- Record selection by a Filter Expresssion is selected
4) Filter Expression
- "Renter"$Status
5) Order Expression
- Lastname

Note: I have Label's and Report Buttons with the exact same syntax as described above and they work just fine. I spent a many hours trying to figure out what I did wrong, if anything, however I do not see any error on my part.

Richard or Selwyn, I know you browse the board so perhaps you can respond to this potential bug. I'd gladly send you my app for your review.

Thanks,
Rudy Pataky

i sent you a reply by email a few days ago. perhaps you should check your spam folder.

there is no bug.

you have defined a report and in the report definition, you have specified 'street address' (i forget the exact field name you used, but its not important) as the report order.

then, in your xbasic you have something like this

query.order = "lasname"
query.filter = "some filter expression - not important what"

report.print("reportname",query.filter,query.lastname)

and then you are expecting to see the report ordered by lastname.

that's not is what's going to happen.

the order that you specify at runtime ("lastname") is an INCREMENTAL order.

so the report will be sorted by 'street address' and then any records that have the same street address will be sorted by 'lastname'

if you want to specify the complete order expression at runtime, just remove the order you have defined as part of the report definition.

Rudy16
05-02-2008, 05:00 PM
Hey Tom,

The only bug that surfaced was me. Sllwyn pointed that out to me. There was an order statement in the report and then another in the "On Push" of a Button. All I had to do was remove the Order Statement from the report and all was fine. I looked for a long time and did not catch the error.

CALocklin
05-02-2008, 05:28 PM
This is why it's often best to post examples here first. If Selwyn checked every script that somebody thought might be a bug he wouldn't have time to do them all and future A5 development might come to a halt. If people on this message board can't fix the problem, then it's probably worth submitting a bug report.

Those of us who've been doing this for years would probably have caught this one right away if we had a sample. I've learned through the school of hard knocks - if the sort order or filter for a report doesn't seem to work, check the settings in the detail section and review the Group settings. The issue with your description, and it's a common issue, is that it really didn't include the full story because you probably weren't even sure what the full story was. And don't take that wrong, we all do it. We get ourselves in a rut and forget a key factor somewhere else even when we should know better. I often talk with another developer when I run into problems and most of the time it turns out I forgot something critical in the first explanation - often that "something forgotten" is the key to the whole problem.

Rudy16
05-02-2008, 06:14 PM
You are right on Cal. Lesson learned.