Page 1 of 1

Printing values

Posted: Sat Mar 01, 2014 10:16 am
by blairetabay
Hi to all,

i have a serious problem regarding with printing,

it almost working now the only problem is the datagrid printing to loop its value. I try a button on the other card its working.

code for printing

Code: Select all

local sCurrentRecord
local sDetail, sDocument,  sLastRecord,sample
 local tLayoutFile, tDataBroker, tShowPreview

on mouseUp
   
   put 1 into sCurrentRecord
     
   
   if "qrtReportsLib" is not among the lines of the stacksInUse then
      start using stack "qrtReportsLib"
   end if
   
   
   put AbsolutePath ("tabaySample.qrl") into tLayoutFile
   put the long ID of me into tDataBroker
   put true into tShowPreview
   
   qrtReports_PrintReport tLayoutFile, tDataBroker, tShowPreview
   
   
   
end mouseUp


on MyPrintReport 
   
   put 1 into sCurrentRecord
   
   #put fld "CustomerName" into sDocument["CustomerName"]
   
   #set the itemDelimiter to tab
   
   --       put fld "txt_PatientID" into sample["sample2"]
   --         put fld "txt_f" into sample["sample3"]
   --         put fld "txt_f" into sample["sample4"]
   #answer sample["sample2"] 
   put fld "txt_id" into sample["sample2"]
   
   #put fld "txt_f" into sample["sample3"]
   #put fld "txtM" into sample["sample4"]
    
    
      #put tRecords into sample["sample4"]
   
   
end MyPrintReport

on MyPrepNextDetail
   put the dgData of group "dgGrid" into theDataA
   put the dgIndexes of group "dgGrid" into theIndexes
   
   repeat for each item theIndex in theIndexes
      set the itemDelimiter to tab 
      put theDataA[theIndex]["Col 3"] & cr after tRecords1
      put theDataA[theIndex]["Col 1"] & cr after tRecords2
      
   end repeat
   put tRecords1 into sample["sample3"]
      put tRecords2 into sample["sample4"]
      

   #answer values
   
   
end MyPrepNextDetail



function qrtReports_endOfReport
  -- we only have to print a single record

  if sCurrentRecord > 1
  then return true
  else return false
end qrtReports_endOfReport
    
on qrtReports_moveNextRecord
  -- merely update our sCurrentRecord local variable
   MyPrepNextDetail
   MyPrintReport      
   add 1 to sCurrentRecord
   
end qrtReports_moveNextRecord

function qrtReports_valueOfExpression pExpression
  -- this function will evaluate an expression and return the result
  put pExpression into tExpression
  replace "<QUOTE_REPLACEMENT>" with quote in tExpression
  return value(tExpression)
end qrtReports_valueOfExpression

function AbsolutePath pRelativePath
  ## this helper function looks for files from the directory where the stack is saved
  put the effective filename of this stack into tAbsolutePath
  set the itemDelimiter to "/"
  put pRelativePath into item -1 of tAbsolutePath
  return tAbsolutePath
end AbsolutePath


this is the datagrid to show that is working us of now in getting all the value in a row.

Code: Select all


on mouseUp
   put the dgData of group "dgGrid" into theDataA
   put the dgIndexes of group "dgGrid" into theIndexes
   
   repeat for each item theIndex in theIndexes
      put theDataA[theIndex]["Col 3"] & cr after  tRecords
   end repeat
    answer  tRecords
   #breakpoint
  
   
end mouseUp

i try to compare it is the same way it should print all the row

Re: Printing values NEED HELP

Posted: Sat Mar 01, 2014 5:42 pm
by Mark
Hi,

Could you write exactly what your code currently does and what you want it to do instead?

Kind regards,

Mark

Re: Printing values NEED HELP

Posted: Sun Mar 02, 2014 3:01 pm
by blairetabay
Hi Mark,


all I want is to print the value in quartam coming from my datagrid. The problem is only the first column of the row is being printed not all the data inside my datagrid.


thanks in advance

Mark

blaireTabay

Re: Printing values NEED HELP

Posted: Sun Mar 02, 2014 4:10 pm
by Klaus

Re: Printing values

Posted: Sun Mar 02, 2014 4:19 pm
by Mark
Merge again, Klaus?

Mark

Re: Printing values

Posted: Sun Mar 02, 2014 4:31 pm
by Klaus
Mark wrote:Merge again, Klaus?

Mark
Do you think that will help? :D

Re: Printing values

Posted: Sun Mar 02, 2014 4:33 pm
by Mark
Or just delete this thread.

Mark

Re: Printing values

Posted: Sun Mar 02, 2014 4:45 pm
by Klaus
Hi Blaire,

as I wrote in the other thred, this is obvioulsy a very special QuartamReports related problem,
and chances a not very high to find someone in this forum, who also works with that Livecode Add-on.

The Quartam FORUM is in fact accessible and asking there is at least worth a try!

And please stop opening new threads for already posted problems, only because you might not have received a satisfying answer so far.
This is not the first time, mon ami 8)


Best

Klaus

Re: Printing values

Posted: Sun Mar 02, 2014 5:09 pm
by blairetabay
hi Klaus,


Sorry for this thread that i made. its already running now. i just figure it out where i went wrong i just review my codes.


best


blaireTabay

Re: Printing values

Posted: Sun Mar 02, 2014 5:22 pm
by Klaus
Hi Blaire,

no problem, glad you got it working now!
Maybe you can tell us what went wrong?


Best

Klaus