Normally when I want a PDF generated from a report I do so by using the iDestination function, similar to this: The generated PDF will have the name specified by the variable PDFFileName. But recently a Client had a report that we were using the Print Preview for, however when the user saved the report as … Continue reading Setting PDF Filename when using Print Preview
Category: Quick Tips
.NET Permission Issues
I spent part of my morning in .NET hell, a situation that I try to avoid as much as possible. That is the reason I use WX in the first place! I use a .NET library to convert JSON data to XML data, which will be the topic of a future webinar. But today's topic … Continue reading .NET Permission Issues
Variables declared in a Loop
Ran into a very subtle issue today with variables declared in a loop. For pcreminder.com, I have an outer loop that gets all the reminders that need to be sent for all users. Within that loop, there is a second loop that loops through all the receipts for the reminder and sends the actual reminder. … Continue reading Variables declared in a Loop
Flexible Comparison Statements
A few weeks ago I gave someone an answer that included code similar to this: IF Nospace(MyString) = "TestString" And Wolfgang Kirsch pointed out the flexible comparison operators in the online help. So the statement can be written as IF Mystring ~= "TestString" I have been trying to use this more as I feel it … Continue reading Flexible Comparison Statements
Combobox issue with & Character
We ran into an odd one this morning. Location names were not showing up correctly in a combo box control. Freezer R&D was showing up as Freezer RD It appears that the combo box control has some logic to create hot keys for the choices using the & character, just like there is for captions. … Continue reading Combobox issue with & Character
Simplified SWITCH Statement
Just a quick one today that might help you clean up some code somewhere. I have a process where we are importing some glossary terms for 5 different languages. All of the logic is identical except for the LanguageID. So I have a simple FOR loop that runs 5 times, the problem is that the … Continue reading Simplified SWITCH Statement
Multiple Return Values from a Function
One of the new features of v19 is the ability to return multiple values from a procedure. That came in real handy for me this week! While working on the JQuery Slider date selection control that some of you have seen, I needed to be able to find the begin and end dates for a … Continue reading Multiple Return Values from a Function
Structured Array Short Hand
I used structured arrays a lot! No I mean A LOT! In fact, I generally have a class called FixedLookups that contains several Hardcoded Structured Arrays for things that are necessarily user configurable, but still easier for me to code a combo box using a structured array instead of hardcoding into control properties via the … Continue reading Structured Array Short Hand
Validate Credit Card Number
Uncle Pete's Freebie of the day..... I need to validate the credit card number a user enters, so after some Googleing I came up with this function. It accepts the credit card number as a string then strips any spaces or dashes off. It then performs a few test to determine the card type, and … Continue reading Validate Credit Card Number
HF SQL Doesn’t support complex Update Statements
As many of you know I have been slowly become more of a convert to HyperFileSQL and WX Queries. And generally use HF for my projects while they are in the R&D stage, only moving them to PostgreSQL if they are going to involve very large/complex data sets. Or if the client requires some other … Continue reading HF SQL Doesn’t support complex Update Statements

You must be logged in to post a comment.