1. shoaib siddiqui
  2. PowerBuilder
  3. Wednesday, 31 July 2024 18:04 PM UTC

hi,

In grahp datawindow there is AutoScale property in Axis tab that can be set in design time, once it is off
then further properties like MaximumValue  and MinimumValue can be set. But I want to set it at runtime
in scrip in and unable to find correct dot notation.

I am able to this:
dw_graph.Object.gr_MA.values.Autoscale=FALSE 

but not this:

dw_graph.Object.gr_MA.Values.MaximumValue = 80 
dw_graph.Object.gr_MA.Values.MinimumValue = 10 

I get error:  "Type mismatch accessing external object property".

 

Please see attached jpg.

Thanks.

 

 

Attachments (1)
John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 31 July 2024 18:53 PM UTC
  2. PowerBuilder
  3. # 1

Greeting, Shoaib -

If you edit the source of a graph-style DataWindow, you'll see that the properties such as MinimumValue and MaximumValue specify values that are strings, even if the actual property value is a number.

The "type mismatch" error you are receiving suggest the property value(s) may need to be encapsulated in single or double-quote marks to make the value a string. No guarantees, but please give this a try.

Best regards, John

Comment
There are no comments made yet.
shoaib siddiqui Accepted Answer Pending Moderation
  1. Wednesday, 31 July 2024 19:19 PM UTC
  2. PowerBuilder
  3. # 2

The issue is/was setting the Y Axis values at run time (Dynamically in script).
The solution was the right data type, I fed Casted the datatype to Int and it worked.

example:
Int li_Max= 10
dw_graph.Object.gr_MA.Values.MaximumValue =li_Max

Comment
  1. John Fauss
  2. Wednesday, 31 July 2024 19:39 PM UTC
I'm glad to hear you found the answer! Thanks for letting us know.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.