Up the creek without a paddle

delk info at castus.com
Mon Jan 7 08:44:11 CST 2008


Well the task of modify lingo has been given to me. Don't know what I'm 
doing really. I have some asp knowledge which I don't think helps much. I'm 
learning on the job. God help me.

This is a presention I am working on. This part of script Prints what is 
being displayed on screen. it calls on Valentina database and displays event 
with previous and next buttons so some events have more than one page, I 
need to print all the pages or stages that are apart of each event

I don't think using printFrom would be much help as this calls on recordsets 
rather Movie. However this script does seem to build movies from database, 
Need all the help I can get.

I suppose this would be the data i need



-- Iterate through the recordset to build the list of events

intCount = objTable.GetRecordCount()

repeat with intNum = 1 to intCount

objEvent = new(script "event")

objEvent.e_id = objTable.GetField("EventID")

objEvent.m_ID = mID

objEvent.e_order = objTable.GetField("EventNum")

objEvent.e_name = objTable.GetField("Name")

objEvent.e_comment = objTable.GetField("Comments")

me.eventsList.add(objEvent)


objTable.NextRecord()

end repeat


objTable = void

return TRUE

end



on pubDisplayFirstEvent me

me.currentDisplayWindow = void



-- Here is Print function----

on pubPrintPage me

-- Get a reference to the current MIAW and create a bitmap of it

objWin = me.currentDisplayWindow

objWin.type = #document

objWin.moveToFront()


imgWin = objWin.image

bmp = new(#bitmap)

bmp.image = imgWin


-- Export the bitmap

-- objExport = new(xtra "SharpExport")

-- objExport.exportJPG(bmp, the moviePath & "print.jpg", 100)


-- Kill the Xtra and erase the member

-- objExport = void


-- Print the file

-- baPrintFile(the moviePath & "print.jpg")

doc = new(xtra "PrintOMatic")

setLandscapeMode(doc, true)

append(doc, bmp)

if doJobSetup(doc) then

print(doc)

end if


bmp.erase()



-- Redisplay the page

me.pubDisplayPage()

--me.currentDisplayWindow = #tool

me.currentDisplayWindow.type = #document

end



on pubPrevPage me

if me.intPage - 1 < 1 then

return 0

end if


me.intPage = me.intPage - 1

me.pubDisplayPage()

return 1

end



on pubNextPage me

if me.intPage + 1 > me.eventsList.count then

return 0

end if


me.intPage = me.intPage + 1

me.pubDisplayPage()

return 1

end



on fillEvent me, eID

me.intSelectedEvent = eID



More information about the Valentina mailing list