PDA

View Full Version : Report Executes Function Help



Peter Donovan
19-Mar-2005, 08:57 AM
Hi,
I am a little over my head with a webapp where I am shipping inventory
and
am trying to make a shopping cart to ship the inventory.

The inventory record is selected, and I need to update it as "Selected"
so a
shipping address can be matched to it.

Here is my attempted code for the body of the report which should be
entertaining since I have no idea how to do this...<g>

Could someone help me please: I want to execute a function (see code)
and
then refresh the report.



Send WriteHtmlRowBegin
Get AddRecordLink sAdsinvTitle To sText
Send WriteHtmlCell sText 'Class="Data" Align="Left"'
Send WriteHtmlCell sAdsinvFormat 'Class="Data" Align="Left"'
Send WriteHtmlCell (FormatNumber (sAdsinvControl_Num,0))
'Class="Data" Align="Right"'
Send WriteHtmlCell sAdsinvId_No 'Class="Data" Align="Left"'
Send WriteHtmlCell sRequestsDate 'Class="Data" Align="Left"'
Send WriteHtmlCell sRequestsStatus_Desc 'Class="Data"
Align="Left"'
If (sRequestsStatus = "1") Begin
Move '<A Href= (Err =
oSelectInventoryForShipping.call("Get_DoSelectInventory", iRecordNum))'
To
sText
Append sText "Select For Shipping" '</A>'
Send WriteHtmlCell sText 'Class="Data" Align="center"'
End
Else If (sRequestsStatus = "2") Begin
Move '<A Href= (Err =
oSelectInventoryForShipping.call("Get_DoSelectInventory", iRecordNum))'
To
sText
Append sText "UN-Select For Shipping" '</A>'
Send WriteHtmlCell sText 'Class="Data" Align="center"'
End
Else Send WriteHtmlCell "" 'Class="Text" Align="Left"'

Send WriteHtmlRowEnd
End_Procedure // OnBody

With the following picture of the result:

Any help would be appreciated,
Regards,
Peter Donovan
Sonata Software
Boston

wila
19-Mar-2005, 09:43 AM
Peter,

Not exactly sure what you want to achieve, but when i look at your code,
then there's a few things i see:

Peter Donovan wrote:
> Send WriteHtmlRowBegin
> Get AddRecordLink sAdsinvTitle To sText
> Send WriteHtmlCell sText 'Class="Data" Align="Left"'
[WvA] html attributes should _not_ have a first capital letter. It is
strongly recommended to use lowercase for these (xhtml compatibility)
So change that in:
Send WriteHtmlCell sText 'class="Data" align="Left"'

Same story for the HTML tags, those should _not_ be capitalized (and yes
i know what the wizards create)

> Send WriteHtmlCell sAdsinvFormat 'Class="Data" Align="Left"'
> Send WriteHtmlCell (FormatNumber (sAdsinvControl_Num,0))
> 'Class="Data" Align="Right"'
> Send WriteHtmlCell sAdsinvId_No 'Class="Data" Align="Left"'
> Send WriteHtmlCell sRequestsDate 'Class="Data" Align="Left"'
> Send WriteHtmlCell sRequestsStatus_Desc 'Class="Data" Align="Left"'
> If (sRequestsStatus = "1") Begin
> Move '<A Href= (Err =
> oSelectInventoryForShipping.call("Get_DoSelectInventory", iRecordNum))' To
> sText

[WvA] I'm guessing that this is what your problem is about. You are
programming in VDF so why not use the VDF part instead of trying to
fumble the asp method counterpart in here?

Change into something along the lines of:
Get DoSelectInventory Of oSelectInventoryForShipping iRecordnum To sHtml
move ('a href="'+sHtml+...) To ...

Now if you're only trying to show a link to your select inventory page
then your code would look along the lines of:
Move ("selectinventory.asp?RecId="+htmlencode(iRecordnum)) To sHtml
move ('a href="'+sHtml+...) To ...


--
Wil

> Append sText "Select For Shipping" '</A>'
> Send WriteHtmlCell sText 'Class="Data" Align="center"'
> End
> Else If (sRequestsStatus = "2") Begin
> Move '<A Href= (Err =
> oSelectInventoryForShipping.call("Get_DoSelectInventory", iRecordNum))' To
> sText
> Append sText "UN-Select For Shipping" '</A>'
> Send WriteHtmlCell sText 'Class="Data" Align="center"'
> End
> Else Send WriteHtmlCell "" 'Class="Text" Align="Left"'
>
> Send WriteHtmlRowEnd
> End_Procedure // OnBody
>
> With the following picture of the result:
>
> Any help would be appreciated,
> Regards,
> Peter Donovan
> Sonata Software
> Boston
>
>
>

Peter Donovan
19-Mar-2005, 10:10 AM
Thanks Wil,
What I have is a list of inventory that needs to be shipped.

The next step is to match the inventory with a shipping address, but first I
want to multi-select inventory from this "needs to be shipped" list so that
when the shipping address is chosen, they all go to that address.

Regards,
Peter

Peter Donovan
19-Mar-2005, 10:14 AM
PS:
If there is anyone with the skills to help me codevelop this project I have
a small budget and would be pleased and willing to pay for a few hours of
time.
Regards,
Peter
SonataSoftwareUS@Yahoo.com

Peter Donovan
19-Mar-2005, 01:00 PM
Update:

I have this mostly functioning from start to finish but lack the page where
the user selects which inventory (from a list) that they want shipped to a
shipto.

Got it this far:
Regards,
Peter

Curtis Krauskopf
19-Mar-2005, 03:44 PM
Peter,

I'm wrapping up a rather large web application right now -- so I can help
you with this. Here is my contact information:

Curtis Krauskopf
The Database Managers, Inc.
407-737-8464 (office)
407-415-9075 (cell)

Best regards,

Curtis

Peter A Donovan
20-Mar-2005, 11:06 PM
Thanks Curtis,
I think we can arrange something and I'll be in touch. You're just the type
of developer (and time zone) I'm looking for.
Thanks for the personal email too.
Peter

Peter Donovan
22-Mar-2005, 01:07 PM
Update Status: Shopping Cart Complete
Many Thanks to Wil and Curtis.
Peter
www.SonataSoftware.US