Sign in to follow this  
Followers 0
autoitxp

_WordDocPrint

4 posts in this topic

#1 ·  Posted (edited)

Hi how i can print all results once this code is randomly open up print pages and this not real good help!!

func _getdataprint()
If Not  _SQlite_Query (-1, "SELECT * FROM " & " " & $mytable & " " & " Where print = 'CHECKED' ;", $hQueryss)  = $SQLITE_OK Then _
_GUICtrlStatusBarSetText($StatusBar ,_SQLite_ErrMsg (), 2)

While _SQLite_FetchData ($hQueryss, $aRow) = $SQLITE_OK 
 
$oWordApp = _WordCreate (@ScriptDir & "\Test.doc")
$oDoc = _WordDocGetCollection ($oWordApp, 0)
$oDoc.Range.Text = StringFormat(" %-10s  %-10s  %-10s  %-10s ", $aRow[0], $aRow[1], $aRow[2], $aRow[3],$aRow[4],$aRow[5],$aRow[6], $aRow[7] , $aRow[8]) & @CR
_WordDocPrint ($oDoc)
_WordQuit ($oWordApp, 0)

WEnd

If Not  _SQLite_QueryFinalize ($hQuerys)  = $SQLITE_OK Then _
_GUICtrlStatusBarSetText($StatusBar ,_SQLite_ErrMsg (), 2)    
EndFunc

Regards
Sim
Edited by autoitxp

Share this post


Link to post
Share on other sites



I don't understand your question. Please try to explain is more detail what it is you're trying to accomplish.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

ok i want to printout _SQLite_GetTable2d results but its not actually working

how i can get _SQLite_Display2DResult($aResult) for $oDoc.Range.Text

func _getdataprint()

$iRval = _SQLite_GetTable2d (-1, "SELECT id, date, amount, voucher, description, posted_by, autherized_by, company  FROM " & " " & $mytable & " " & " Where print = 'CHECKED';" , $aResult, $iRows, $iColumns)

If $iRval = $SQLITE_OK Then
  _SQLite_Display2DResult($aResult)
$oWordApp = _WordCreate (@ScriptDir & "\Test.doc")
$oDoc = _WordDocGetCollection ($oWordApp, 0)
$oDoc.Range.Text =  _SQLite_Display2DResult($aResult)
_WordDocPrint ($oDoc)
_WordQuit ($oWordApp, 0)

EndIf
EndFunc
Edited by autoitxp

Share this post


Link to post
Share on other sites

Try changing this...

$oDoc.Range.Text =  _SQLite_Display2DResult($aResult)oÝ÷ Ù:-+ºÚ"µÍÌÍÛÑØË[ÙK^HÔÔS]WÑÜ^LÝ[
    ÌÍØTÝ[YJ

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0