Andrew,
I'll give you some more information to clarify the problem. The object "gstr_diag" is
a global structure where I temporarily hold what the user selects in a dialog box that
opens before the report window opens. For example, if the user selects the "MTD Rank
Report" from the menu, then the following menu script runs:
// open dialog box
gstr_diag.datawindow = "dw_rank_mtd"
open( w_months_dialog ) // this dialog box lets them select a date etc.
if message.doubleparm = 1 then
// user pressed ok
// open window
Message.StringParm = "w_rank"
of_SendMessage("pfc_Open")
else
// user pressed cancel
// close dialog box
close( w_months_dialog )
end if
The "dw_1.DataObject = gstr_diag.datawindow" line in the open script of the generic
report window works whether the sort code is there or not. However when the line is
there, the sort dialog box will not open from the menu, if I remark that line out,
then the sort dialog box will open from the menu.
Any ideas as to why?
Jill
>>> "Andrew Subhagia T." <[EMAIL PROTECTED]> 02/02/00 09:26PM >>>
What is look like gstr_diag.datawindow ? Is it a list of your report contain
description with an object id. If that so then you have to describe like
this
assume that gstr_diag is your datawindow, inside datawindow there's a
column, is it right ? that column for example like id, description. You show
it to user just description only.
// get id object from a list
dw_1.DataObject = gstr_diag.getitemstring(gstr_diag.GetRow(),'id')
AST
----- Original Message -----
From: Andrew Subhagia T. <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, February 03, 2000 7:23 AM
Subject: Re: PFCSIG Sort Problem
> Have you already check your gstr_diag.datawindow at row menu section sort.
> You have to put some column there to make setsort() work.
>
> AST
>
> ----- Original Message -----
> From: Jill M. Claus <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, February 02, 2000 9:19 PM
> Subject: PFCSIG Sort Problem
>
>
> > To all,
> >
> > I have the following script in the open event of a window and when I
> select sort off the menu, nothing happens. However, it did work before I
> added the line "dw_1.DataObject = gstr_diag.datawindow" into the script.
> (that line puts different dw's into the window based on which rank report
> the user selected off the menu) I've been trying to put either the above
> line, or the sort lines into different script sections and haven't gotten
it
> to work yet. I though that maybe someone out there may have had this
> problem before, or may have a suggestion?
> >
> > Any help would be greatly appreciated,
> > Jill
> >
> > ////////////////////////////////////////////////
> > //
> > // Object: w_rank
> > // Event: open
> > // Desc: sets up services and retrives data
> > //
> > ////////////////////////////////////////////////
> >
> > Setpointer(Hourglass!)
> >
> > // set datawindow according to what user selected in the menu
> > dw_1.DataObject = gstr_diag.datawindow
> >
> > // enable report & print preview services
> > gi_return = dw_1.of_SetReport(TRUE)
> > gi_return = dw_1.of_SetPrintPreview(TRUE)
> > gi_return = dw_1.of_SetUpdateable(False)
> >
> > // enable sort feature
> > gi_return = dw_1.of_SetSort(TRUE)
> > gi_return = dw_1.inv_sort.of_SetColumnNameSource(2)
> > gi_return = dw_1.inv_sort.of_SetColumnHeader(TRUE)
> > gi_return = dw_1.inv_sort.of_SetUseDisplay(TRUE)
> > gi_return = dw_1.inv_sort.of_SetStyle(0)
> > gi_return = m_sheet.m_view.m_sort.Enable()
> >
> > // retrieve datawindow
> > gi_return = dw_1.of_SetTransObject(SQLCA)
> > gl_rows = dw_1.retrieve(gstr_diag.sdate)
> >
> >
> > > [EMAIL PROTECTED] HOSTED BY IIGG, INC. FOR HELP WITH LIST SERVE
COMMANDS,
> ADDRESS
> > > A MESSAGE TO [EMAIL PROTECTED] WITH THE FOLLOWING MESSAGE: help
> pfcsig
> > > SEND ALL OTHER INQUIRES TO [EMAIL PROTECTED]
> >
>
> [EMAIL PROTECTED] HOSTED BY IIGG, INC. FOR HELP WITH LIST SERVE COMMANDS, ADDRESS
> A MESSAGE TO [EMAIL PROTECTED] WITH THE FOLLOWING MESSAGE: help pfcsig
> SEND ALL OTHER INQUIRES TO [EMAIL PROTECTED]
> [EMAIL PROTECTED] HOSTED BY IIGG, INC. FOR HELP WITH LIST SERVE COMMANDS, ADDRESS
> A MESSAGE TO [EMAIL PROTECTED] WITH THE FOLLOWING MESSAGE: help pfcsig
> SEND ALL OTHER INQUIRES TO [EMAIL PROTECTED]