Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need a Professional here

Status
Not open for further replies.

zakkar

Programmer
Dec 3, 2002
72
0
0
GR
Hello to you all
I have this situation and i need some advice here.I'm using Pb8.0.4.I want to create dynamically graphs.
I have found the way but i have a little problem.
I get the Sql Syntax from a datawindow with the following command.
string ls_sql
ls_sql = dw_test.GetSqlSelect()

The datawindow i got the sql is a datawindow which style is grid.I want to convert it to a graph
So i do the following
String ls_new_syntax , ls_create_error
ls_new_syntax = SQLCA.SyntaxFromSQL( ls_sql , "style(type=graph)" , ls_create_error)

The problem is that when i have a single select without where clause everything works fine when i do the create method for datawindows.When i have a complex select with where clause and union clause the syntaxfromsql fails.
What shall i do???? Is there any other way to get the complex sql and change the style of the datawindow to graph???Please note that i'll do all the modifications to category ,series,values afterwards.
I also thought if there is a way to export the grid datawindow (dynamically) as a query in a temp pbl (librarycreate etc...) and somehow create the datawindow as a graph from this temp query.???

Any suggestions???

Thank you in advance
zkar programmer




 
I'm not sure this will work but could you try doing the syntaxfromsql with the 'dumbed down' statement. Then modify the actual SQL sent to the DB in the sqlpreview event on the datawindow.
 
What do you mean with the 'dumbed down' statement???
zkar programmer
 
Dumbed down:

"when i have a single select without where clause everything works fine when i do the create method for datawindows."

Not dumbed down:

"When i have a complex select with where clause and union clause the syntaxfromsql fails.
 
I have some time with no use pb. But I think u have a problem when you are using parameters when u want to create a sql dynamicly. If it is your problem, write me 'cause I can help u, 'cause I made some routines to perform this.

Regards.


The life is too short to cry and long enough to try it... God bless us.
[thumbsup2]
 
to royjimenez
No it is not the issue here .The main event is that pb cannot create with the syntaxfromsql command the syntax string.And this happens because i have a select full with arguments.I'm trying to figure out what other methods can i use.Read my first post .I am also interested in for your functions.Maybe i use them after all.what are they do??
thank you
zkar programmer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top