Customization Button need to have report attached pull in Sales Orde

what does your code look like to be able to run a crystal report? I
have never been able to do that yet via a customization. i have
always just had to set up a BAM and use the auto print feature. Is
there a way that i can run the report from .net code?


--- In vantage@yahoogroups.com, "Linda Lowney" <llowney@...> wrote:
>
> Hi Paul,
>
>
>
> This is a function we use to get the quote number for Crystal Viewer:
>
>
>
> private function GetQuoteNum() as string
>
> ' dimension object variables
>
> ' dimension variables
>
> Dim sQuoteNum as string = ""
>
> ' get the quote number from the screen
>
> Try
>
> If edvQuoteHed.dataView(edvQuoteHed.Row)("QuoteNum") <> 0 Then
>
> tmpQuoteNum =
> edvQuoteHed.dataView(edvQuoteHed.Row)("QuoteNum")
>
> sQuoteNum = ctype(tmpQuoteNum,String)
>
> Else
>
> ' if no quote is on the screen then display a message and return
> false
>
> MessageBox.Show("Please select a quote before trying to
> print.")
>
> end if
>
>
>
> Catch ex as Exception
>
> End Try
>
>
>
> return sQuoteNum
>
> end function
>
>
>
>
>
> This is how we setup the record selection formula (just replace the
> 'xxxx' with your company code):
>
>
>
> sRecSel = "{QuoteHed.Company} = 'xxxx' and {QuoteHed.QuoteNum} = " +
> sQuoteNum
>
>
>
> Load the report
>
>
>
> Set the database logon
>
>
>
> Then set the record selection formula (Just replace oRpt. with your
> report object variable):
>
>
>
> oRpt.RecordSelectionFormula = sRecSel
>
>
>
>
>
> hth
>
>
>
> Linda Lowney
>
> Pride Signs Ltd
>
> 280 Holiday Inn Drive
>
> Cambridge, ON N3C 1Z4
>
> Ph: 519-220-0505 x258
>
> Fx: 519-220-0606
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
Hi Paul,



This is a function we use to get the quote number for Crystal Viewer:



private function GetQuoteNum() as string

' dimension object variables

' dimension variables

Dim sQuoteNum as string = ""

' get the quote number from the screen

Try

If edvQuoteHed.dataView(edvQuoteHed.Row)("QuoteNum") <> 0 Then

tmpQuoteNum =
edvQuoteHed.dataView(edvQuoteHed.Row)("QuoteNum")

sQuoteNum = ctype(tmpQuoteNum,String)

Else

' if no quote is on the screen then display a message and return
false

MessageBox.Show("Please select a quote before trying to
print.")

end if



Catch ex as Exception

End Try



return sQuoteNum

end function





This is how we setup the record selection formula (just replace the
'xxxx' with your company code):



sRecSel = "{QuoteHed.Company} = 'xxxx' and {QuoteHed.QuoteNum} = " +
sQuoteNum



Load the report



Set the database logon



Then set the record selection formula (Just replace oRpt. with your
report object variable):



oRpt.RecordSelectionFormula = sRecSel





hth



Linda Lowney

Pride Signs Ltd

280 Holiday Inn Drive

Cambridge, ON N3C 1Z4

Ph: 519-220-0505 x258

Fx: 519-220-0606







[Non-text portions of this message have been removed]