E10.2.200.6 -- AutoPrint Material Tags for Non Conformance are printing blank

Case: End users want to have auto generated print tags to there defaulted workstation printer in nonconformance at the time they select “Save” with the “Request Move” field checked for the inventory move.

Outcome: When end user navigates to noncoformance and starts a new inventory move for a part. They reference the part, provide a quantity for the from bin/to bin. “Request Move” is defaulted checked and when the user hits save, a material tag prints out but its blank. There is no static text or data presented from the SSRS report.

(But a Manual print of the custom style works perfect)

Steps:

  1. Duplicated Report Data Definition “Mtl Tags” (Left tables and relationships as defaulted from the base"
  2. Copied report style of base “Mtl Tags”
  3. Modified custom report style of “Mtl Tags” to be presented in a different format of field…etc…
  4. Manually test printed the “Mtl Tag” from nonconformance regarding an inventory move and its prints correctly as expected for PDF and client/server printers
  5. Created a standard data directive on the “NonConf” table
  6. Data directive has one condition that is "The ttNonConf.RequestMove field of the changed row is equal to the True expression
  7. Auto Print is then setup to reference the SSRS report created in the previous steps
  8. Auto Print’s “selected” menu has the following set:

Run Schedule = Immediate
Output Format = EMF
Print Action = Auto Print
Constant = 1

Report Parameter.AssemblySeq = ttNonConf.AssemlySeq
Report Parameter.BinNum = ttNonConf.BinNum
Report Parameter.JobNum = ttNonConf.JobNum
Report Parameter.NonConfTranID = ttNonConf.TranID
Report Parameter.OprSeq = ttNonConf.OprSeq
Report Parameter.PartNum = ttNonConf.PartNum
Report Parameter.POLine = ttNonConf.POLine
Report Parameter.PONum = ttNonConf.PONum
Report Parameter.PORel = ttPORelNum
Report Parameter.Qtyper = ttNonConf.PassedQty
Report Parameter.RefAssemlySeq = ttNonConfAssemlySeq
Report Parameter.RefMtlSeq = ttNonConf.MtlSeq
Report Parameter.SSRSEnableRouting = False
With the rule “For earch matching ttNonConf”

Upon the steps above completed. The end user can trigger the printout successfully from NonConformance but each label auto printed is blank with nothing on it. With updating the data directive to use the base report data definition and style for “mtl tags” the label still gets generated with nothing on it. But if the user manually prints the standard and custom styles available, the data is presented correctly.

AutoPrint_LBL_Customer Solution_3.2.200.0.cab (18.7 KB)

Okay back in the saddle.

I am not familiar with the screen or report - so bear with me. Not to mention this is long winded.

I open the NonConf form, open a NonConf ID, then click Print Mtl Tags. (Is this what you mean by manually printing the report?) If not, everything else I write from this point on may be irrelevant :confused:

MtlTags form is opened. But - I notice there is a ton a data passed in. I see that most of it, you have accounted for in your report params.

First - the form calls GetParamTaskDef(lfo.company, lfo.processSystemCode,lfo.processID,lfo.tasknum). This sets the following:

        this.ReportParmsView.dataView[0]["ProcessID"] = processID;
        this.ReportParmsView.dataView[0]["ProcessCompany"] = processCompany;
        this.ReportParmsView.dataView[0]["ProcessSystemCode"] = processSystemCode;
        this.ReportParmsView.dataView[0]["ProcessTaskNum"] = processTask;

It’s possible these are required.

Next on MtlTagForm load, the big long string that is the params is parsed. As with many forms lfo,WhoAmI (calling form) determines how the params are parsed. In the case of non-conf it is:


        base.ReportParmsView.dataView[base.ReportParmsView.Row]["PartNum"] = parameters[0];
  
        base.ReportParmsView.dataView[base.ReportParmsView.Row]["PartDesc"] = parameters[1];
  
        base.ReportParmsView.dataView[base.ReportParmsView.Row]["TotalQty"] = Convert.ToDecimal(parameters[2]);   
   
        base.ReportParmsView.dataView[base.ReportParmsView.Row]["UnitOfMeasure"] = parameters[5];
 
        base.ReportParmsView.dataView[base.ReportParmsView.Row]["QtyPer"] = Convert.ToDecimal(parameters[2]);
   
        base.ReportParmsView.dataView[base.ReportParmsView.Row]["TagFormat"] = parameters[3];
   
        base.ReportParmsView.dataView[base.ReportParmsView.Row]["Revision"] = parameters[4];
  
        base.ReportParmsView.dataView[base.ReportParmsView.Row]["JobNum"] = parameters[6];
  
        base.ReportParmsView.dataView[base.ReportParmsView.Row]["RefJob"] = parameters[6];
   
        base.ReportParmsView.dataView[base.ReportParmsView.Row]["AssemblySeq"] = Convert.ToInt32(parameters[7]);
   
        base.ReportParmsView.dataView[base.ReportParmsView.Row]["RefAssemblySeq"] = Convert.ToInt32(parameters[7]);
 
        base.ReportParmsView.dataView[base.ReportParmsView.Row]["OprSeq"] = Convert.ToInt32(parameters[8]);
   
        base.ReportParmsView.dataView[base.ReportParmsView.Row]["PONum"] = Convert.ToInt32(parameters[9]);
   
        base.ReportParmsView.dataView[base.ReportParmsView.Row]["POLine"] = Convert.ToInt32(parameters[10]);
    
        base.ReportParmsView.dataView[base.ReportParmsView.Row]["PORel"] = Convert.ToInt32(parameters[11]);
  
        base.ReportParmsView.dataView[base.ReportParmsView.Row]["VendorNum"] = Convert.ToInt32(parameters[12]);
  
        base.ReportParmsView.dataView[base.ReportParmsView.Row]["PurPoint"] = parameters[13];
  
        base.ReportParmsView.dataView[base.ReportParmsView.Row]["RefMtlSeq"] = Convert.ToInt32(parameters[14]);
   
        base.ReportParmsView.dataView[base.ReportParmsView.Row]["ReasonCode"] = parameters[15];
 
        base.ReportParmsView.dataView[base.ReportParmsView.Row]["ReasonType"] = parameters[0x10];
 
        base.ReportParmsView.dataView[base.ReportParmsView.Row]["Comment"] = parameters[0x11];
 
        base.ReportParmsView.dataView[base.ReportParmsView.Row]["NonConfTranID"] = Convert.ToInt32(parameters[0x12]);
   
        base.ReportParmsView.dataView[base.ReportParmsView.Row]["WarehouseCode"] = parameters[0x13];

        base.ReportParmsView.dataView[base.ReportParmsView.Row]["BinNum"] = parameters[20];
 
        base.ReportParmsView.dataView[base.ReportParmsView.Row]["LotNum"] = parameters[0x15];

I’d go thru those to ensure you are giving it all the data it wants. “TagFormat” seems like it would be an important one. Also I dont see “TotalQty” being set (in code its same as QtyPer). Also missing “TranType”, “TranID”

Maybe with some luck, it’s just some missing params

I referenced each parameter you listed and gave them the respected field I thought would represent them. Closed out of epicor and reset my cache and I still get a blank output. :confused:

Also I thought if a parameter was required it would show “The 0 constant” value and if it was not required it would be blank for the action. Which is confusing as your parameter list is quite extensive compared to the ones i thought would be required.

image

Out of curiosity…what happens if you call the original report from the directive?

Same occurrence unfortunately.

I wonder if my problem is because the “MtlTags” is a temporary table. Also there is the “MtlTagsParam” to print generic tags?

image

I traced both outcomes in which the left trace is the autoprint vs on the right is the manual print of my custom label. And its odd that the “MtlTags” parameters are empty?

Its using the wrong dataset NonConf vs MtlTags which I suppose makes sense - thats what we want. But doesnt that mean that the ds setup for the report is wrong?

ds?

Sorry, DataSet - dont you setup a temp dataset (datasource) for those reports?

The original style for “MtlTags” use the RDD “MtlTags” which has a temp table as its datasource. (No idea what tables feed it).

image

A random thing to try - what if you were to create a variable of the proper type

On type - select Choose Type (use filter - be patient…form is SLOOOW) Select MtlTagTableset
image

Add custom code block (for temp testing, we’ll manaully set some values)

var ParamRow = MtlTagDS.MtlTagsParam.NewRow();
ParamRow.RowMod = "A";
ParamRow["TotalQty"] = 1;
//add the rest
//basically you are entering this from your working trace to test
MtlTagDS.MtlTagsParam.Add(ParamRow);

var rs = MtlTagDS.ReportStyle.NewRow();
//same here, emulate what you see in working trace
MtlTagDS.ReportStyle.Add(rs);

Cross fingers - something prints?

Never done this before - but I always enjoy a challenge

Under the “var rs = MtlTagDS.ReportStyle.NewRow();” What values should the tags start with? (Attached what I have so far). Also do I need a condition with the variable to trigger the print output?

MtlTag_Code.txt (3.7 KB)

for report style it would be like:
rs[“Company”] = “Comp”;
You shouldnt have to change any conditions yet. What I am unsure is if the autoprint widget is smart enough to pass that variable into the report.

Update: Ah - heres the culprit - now how to change?

Well I got nothing for forcing that DS to change. However… if you modified the data def and report to work off the NonConf table, what you had to begin should work I would think.

The confusing part to me is how the printout is totally blank. Like its not calling the style somehow. As I should still see static text if the parameters or temp table data was not found.

The problem is that the report has internal methods that query the data - in your case, it looks to query that data from a MtlTagDataset but it doesnt have one to get data from, it instead has a NonConfDataSet. I assume that the AutoPrint widget grabs the primary table from the directive and sets the param - which we cant change.

Another option is that we could certainly write c# to call that report which would bypass the limitation of the AutoPrint widget in this case.

I hate asking this as you probably have a million things going on, but would you have an example or another forum post that may help with the coding aspect?

@Chris_Conn Development has provided a resolution to now autoprint material tags from the nonconf table.

image

Nice - i hear a rumor that reporting is moving away from RDD and into BAQs, which sounds pretty awesome.