hexagon logo

Comment's text in custom report

Hi,


I'm basically new to the report editing, and I'm trying to make custom report, with a checklist. Question is, 'is there a way to insert a comment's text into the custom report?' The comment is Yes/No type
Right now I'm using a GridControlObject, and assigned variables for every comment (like V1=C1.INPUTVALUE), so I can make the OK/NOK columns with an 'IF' function, but i have to type the text twice. And have to use different functoins for every line. This makes it a bit difficult.
The best would be if I could make a template, but if i simply try to use for e.g. C1.INPUTVALUE in the custom report, it won't work.
I want to do something like in the attachment

Any ideas for this?
Thank you

Attached Files
  • Open/select the PPAP report and see if that have the OK/NOK columns in it, if so, you could "steal" the code from that to work in your custom report.
  • Thank you, but OK/NOK column is not the problem, I already have a solution for that, and PPAP's solution works only for dimensions. My problem was inserting the comment's text to the grid control object with a code if it's possible.

    I'm here right now:

    In the programming field:
    C6 =COMMENT/YESNO,NO,FULLSCREEN=NO,AUTO CONTINUE=NO,
    No scratches on the surface
    ASSIGN/V6=C6.INPUTVALUE

    In the report:
    First column is the text [No scratches on the surface ] (no code for that so far, but it seems I can drag it to the report when i change the programming field to the other view ), second is the OK [ =IF(variable("V6")==1,"a","") ] and the 3rd NOK column [ =IF(variable("V6")==2,"x","") ]


    I wonder, if it's possible to create a template without using variables, so I won't have to modify every line of the grid control object.
  • figure this out yet? how are you trying to report it as text or into a grid control object? I have no issues when I report variables into grid control objects but did have trouble into a text field... if I recall it is why I created small labels to handle it on the custom report
  • There are some limitations with displaying variables in the GridControlObject of a header of a report, discussed here.

    I don't know if that's where you're trying to put the "No scratches on the surface" text, but if so, one workaround might be to create a variable for the "No scratches on the surface" text:
    ASSIGN/Q1="No scratches on the surface?"


    Then create a Text object and drag it on top of the grid cell in the GridControlObject. Then call the variable value as usual inside the Text object:
    =variable("Q1")
  • Was this ever figured out I'm doing basically the same thing but not getting anywhere? 

  • Can you explain in more detail what you would like to do? I get the general idea from the original post, but I'll need more direction if you could. I've messed with reporting templates a lot, and have customized them a bit for practice.

  • Yeah, here is the code I'm using

    C6 =COMMENT/YESNO,NO,FULL SCREEN=YES,AUTO-CONTINUE=NO,OVC=NO,
    Are there any Blisters on the part?
    ASSIGN/B1=C6.INPUT
    IF_GOTO/C6.INPUT=="NO",GOTO = L1
    C7 =COMMENT/INPUT,NO,FULL SCREEN=YES,
    Where on the part are these located?
    ASSIGN/B2=C7.INPUT
    L1 =LABEL/
    C8 =COMMENT/YESNO,NO,FULL SCREEN=YES,AUTO-CONTINUE=NO,OVC=NO,
    Did the part Pass?
    ASSIGN/B3=C8.INPUT

    Then Stealing Code from the PPAP Lable and Editing it to

    =IF(double(DIM_OUTTOL:N) == 0,"a"," ")
    =IF(double(Variable("B3") == "yes","a"," ")

    The goal is to have the operator view the part on the CMM and have it report out the results as a pass or fail on the report and repeat this about 8 times to fully report the inspection.

    The reason for this to reduce the amount of paperwork we are doing post CMM.

  • I think I see the current issue, remove the double() part from your code. This will convert the variable value to "double" before it gets parsed, and it will never equal "yes". 

    Try =IF(Variable("B3") == "yes","a"," ")

    But I am not sure how this works just yet.

  • Sadly, still blank on my report.