hexagon logo

Making custom File Header labels load only in specific programs.

Ok... I'm missing something... Finally got around to editing the file header label and making it custom to a specific part. Editing the file header label was easy (followed the tutorials). Populating the fields with tracefield variables was easy. Works real nice. But I only want to use this custom file header on a few select programs. The default header is fine for the rest of our parts. When I use:

REPORT/LABEL, FILENAME=FILE_HEADER - CUSTOM.LBL

it will load that label into the report AFTER the default file header label.

I only want this custom file header label to load on THIS PROGRAM and no others. I can  create a custom report template with this file header in it but... I have to load it before I run the program. I don't want any operator intervention to load this header or report template. Can't recall seeing anything in the tutorials that allows me to make this specific to just ONE part program. What did I miss?

Parents
  • I am not entirely sure how to tell it not to use the header label if you put a report label command in your program, but you can always right click on the duplicate header and click "hide selected label" and save that as a custom report. I'm sure there is a different way to do this, I'll play with it more.

  • OK. I did successfully hide the default header. Still trying to figure out how to save it as a custom report after doing that. And do I still need to load that custom report every time I load the program. I don't want an operator to have to do ANYTHING other than load the program and run it. How I miss the days of MLB, MMAX and VB6....

  • PRINT/REPORT,EXEC MODE=END,$
    TO_FILE=OFF,AUTO=1,AUTO OPEN=OFF,$
    TO_PRINTER=OFF,COPIES=1,$
    TO_DMIS_REPORT=OFF,FILE_OPTION=INDEX,FILENAME=,$
    REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMENSIONS=NO,$
    TO_EXCEL=OFF,$
    PREVIOUS_RUNS=DELETE_INSTANCES
    
    CS2 =REPORT/CUSTOM, FILENAME=Custom Report, Section=-1
    PARAM/=
    ENDCUSTOM/
    
    PRINT/REPORT,EXEC MODE=END,$
    TO_FILE=ON,AUTO=1,AUTO OPEN=OFF,$
    TO_PRINTER=OFF,COPIES=1,$
    TO_DMIS_REPORT=OFF,FILE_OPTION=INDEX,FILENAME=,$
    REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMENSIONS=NO,$
    TO_EXCEL=OFF,$
    PREVIOUS_RUNS=DELETE_INSTANCES

    First print command is to clear the default print method that causes double headers so be sure printer/report and all are OFF. Insert Custom Report command. Second command prints/saves the custom report template, and would only be for that current program. This worked for me, but I lost page numbers for some reason at the bottom. Probably due to the space taken by the double headers. So manually duplicating a report template to use your custom header will be optimal.

    1. Make a copy of the default TEXTONLY.RTP and then name it to whatever you'd like.

    2. File > Reporting > Edit > Report Template and select your newly created report

    3. Edit the File Header "RULE" as shown in the image above and scroll down to the bottom and select "File Header", then click on the Use Template "FILE_HEADER.LBL" and click Edit. And select label template for your report "CUSTOM.LBL"

  • I remember hiding the report label just like that in another program I did more than a decade ago to create a custom text based header. It is specific to only that program and executes nicely at run time. The caveat... If you refresh (redraw) the report, the default header reappears and will print.

    You did however, provide me another solution. I hid the default header just like you suggested by doing a right click - Hide Selected Label. That did this:

     So far so good. I then redrew the report. (The circled arrow) and the page moved up.

     Just what I want...

    For some sneaky reason, I decided to save the program as another revision (let's say XXXX R2). It went through the process of saving the program and this window popped up.

     I clicked on Yes and it finished saving the program.

    I then closed the program and loaded a program I had ran earlier just to see what the header would look like. The default header, just the way I want it. I closed that program and reloaded XXXX R2. A redraw of the report showed the custom header successfully saved with the program. No extra coding needed. Sometimes you need a second pair of eyes looking at it... Thanks.

Reply
  • I remember hiding the report label just like that in another program I did more than a decade ago to create a custom text based header. It is specific to only that program and executes nicely at run time. The caveat... If you refresh (redraw) the report, the default header reappears and will print.

    You did however, provide me another solution. I hid the default header just like you suggested by doing a right click - Hide Selected Label. That did this:

     So far so good. I then redrew the report. (The circled arrow) and the page moved up.

     Just what I want...

    For some sneaky reason, I decided to save the program as another revision (let's say XXXX R2). It went through the process of saving the program and this window popped up.

     I clicked on Yes and it finished saving the program.

    I then closed the program and loaded a program I had ran earlier just to see what the header would look like. The default header, just the way I want it. I closed that program and reloaded XXXX R2. A redraw of the report showed the custom header successfully saved with the program. No extra coding needed. Sometimes you need a second pair of eyes looking at it... Thanks.

Children