Newbie at DiaLogs - Formatting Parameters

Started by KeithW, December 16, 2024, 08:48:21 PM

Previous topic - Next topic

KeithW

Greetings,

I am working with my first DiaLog, using ReportView and have 98% running, its always the last 2% that makes for most of the frustration.

I have a 5 column array (0 - 4) and the 1st 3 columns are fine as far as the data goes, the 4th column I need Right-Justifies as they are numbers and I need all columns sized to the data width.  I have tried the following two lines but get "Illegal Syntax". Can a wizard spot what is wrong and please help me get this thing running properly?

DialogControlSet(CLC_Handle, "ReportView_1", @dcColWidth, "-1 -1 -1 -1 -2" ) ; ("DataWidth DataWidth DataWidth DataWidth DataWidth-til-EOL")
DialogControlSet(CLC_Handle, "ReportView_1", @dcColFormat, "0 0 0 2 0" )     ; ("lj lj lj rj lj" value of 1 = center)

Some Questions I have are:

1 Does it matter the order that they occur?
2 Do they have to be used in a CallBack Procedure and what event should I be looking for?
3 Do they have to be processed BEFORE or AFTER the ReportView Array is loaded.

Any assistance would be MOST appreciated.

Regards,
Keith

PS. Many thanks to Jim Taylor who has been very helpful getting me to this point.  This is literally the last thing to be able to call this App complete.

kfw


JTaylor

Format occurs After data is loaded.   Otherwise columns don't exist to format.    I sent you an example with data loaded and formatted that works.

Jim

KeithW

Quote from: KeithW on December 16, 2024, 08:48:21 PMGreetings,

I am working with my first DiaLog, using ReportView and have 98% running, its always the last 2% that makes for most of the frustration.

I have a 5 column array (0 - 4) and the 1st 3 columns are fine as far as the data goes, the 4th column I need Right-Justifies as they are numbers and I need all columns sized to the data width.  I have tried the following two lines but get "Illegal Syntax". Can a wizard spot what is wrong and please help me get this thing running properly?

DialogControlSet(CLC_Handle, "ReportView_1", @dcColWidth, "-1 -1 -1 -1 -2" ) ; ("DataWidth DataWidth DataWidth DataWidth DataWidth-til-EOL")
DialogControlSet(CLC_Handle, "ReportView_1", @dcColFormat, "0 0 0 2 0" )     ; ("lj lj lj rj lj" value of 1 = center)

Some Questions I have are:

1 Does it matter the order that they occur?
2 Do they have to be used in a CallBack Procedure and what event should I be looking for?
3 Do they have to be processed BEFORE or AFTER the ReportView Array is loaded.

Any assistance would be MOST appreciated.

Regards,
Keith

PS. Many thanks to Jim Taylor who has been very helpful getting me to this point.  This is literally the last thing to be able to call this App complete.

kfw




ISSUE RESOLVED:

It may not be easy to see, if not impossible, on the screen but I got bit, by most likely, a cut-and-paste of the lines where those are not standard, editor based quotes in the coding world.  Once I erased and re-typed the " character around the parameters everything work as it should !!

Lesson learned the hardest way possible.

Keith