osmansirmali Posted June 18, 2008 Share Posted June 18, 2008 Hi I have important problem for printing with longterm table list. I knew normally functions capture of screen or only printscreen... I want to print whole data from longterm table list. (for Suddenly more page...) Colud you please send me urgently your answer for this my problem. Thank's attentions. Best regards Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted June 18, 2008 Share Posted June 18, 2008 OK, the easiest way to do this is to simply create a file with your report and then trigger printing it. For example, if you had three channels named test, test2 and test3 you would do something like this: // open file for writing: private handle = file.Open("c:\printme.txt",0,1,0,1) // write header: file.Write(handle, "This is a report!") //write data for (private x = 0, x < numrows(test), x++) file.Write(handle,format("%s\t%.3f\t%.3f\t%.3f",formatdatetime("%c",test.Time[x]),test[x],test2[x],test3[x])) endfor // close file.Close(handle) // print file system.ShellExecute("c:\printme.txt","print") This assumes that you have the .txt extension associated with notepad (the default). It may work if you have it associated with something else too. Most of the report formatting is done in that single format() function. The %s means put a string here (in this case the date formatted using the normal date/time format), the %.3f means put a number here with 3 decimals. The \t are tab characters and will put the numbers in nice columns. Note that if you have more than 18 channels, you are going to have to use multiple format() functions as DAQFactory functions accept a max of 20 parameters. You can just concat them using + (i.e. format(...) + format(...)) in groups of 10 or so. I've attached a sample as well. Let it run for a 30 seconds or so to accumulate a little data, then run the printtable sequence. reportsimple.ctl Quote Link to comment Share on other sites More sharing options...
Emad Posted December 10, 2021 Share Posted December 10, 2021 i want print multypage table mith 8 channels by using page.printpdf Quote Link to comment Share on other sites More sharing options...
Emad Posted December 10, 2021 Share Posted December 10, 2021 hi i want to convert a tabel with 8 v channel and alot of rows to pdf file Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted December 13, 2021 Share Posted December 13, 2021 So by a lot of rows, do you mean more than will fit on one page? If so your best bet is probably to export / log the data to a csv file and then open it in Excel or another spreadsheet. Then you can manually format it however you want. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.