samedi 9 mai 2015

tableView printout to printer missing column headers

In my app I am using a button to print a tableview of information to a printer. I am using the simple code below to print. I get output fine and even in duplex mode. I use the exact output table for a variety of reports. My problem - How do I include a title and the column headers?

  • (IBAction)btnPrintTable:(id)sender {

    NSPrintOperation *op;

    op = [NSPrintOperation printOperationWithView:rptTable];

    if (op)

    [op runOperation];
    
    

    else{

    NSAlert *alert = [[NSAlert alloc] init];

    [alert addButtonWithTitle:@"Cancel"]; [alert setMessageText:@"No Table Data available for printing"]; [alert setInformativeText:@"Cancel and create table data"]; [alert setAlertStyle:NSWarningAlertStyle];

    if ([alert runModal] == NSAlertFirstButtonReturn){

    } } }

There are 6 column headers: Number: Extension: Year: Type: Price: Description:

I have read 'About MAC Printing' and 'Printing Programming Topics for Cocoa'. I can not reference a table header/column design detail. I can not find anything in pagination topics referencing this issue. Can anyone help?

Aucun commentaire:

Enregistrer un commentaire