Print report Style based on EpiDataView

Has anyone customized the print screen to auto select a report style based on information in the EpiDataView used for the print?

PackingSlipPrintForm has the following EpiDataViews
packSlipsView
ReportParam

I was to set the ReportParam.ReportStyleNum to the proper one base on some business logic.

Code is something like

switch [edvVarName].dataView[[edvVarName].Row]["CustNum"]
{
    Case 15
            ReportParam.ReportStyleNum = 1001;
            Break;
    Case 25
            ReportParam.ReportStyleNum = 1002;
            Break;
    Case 50
            ReportParam.ReportStyleNum = 1003;
            Break;
    Case 125
            ReportParam.ReportStyleNum = 1004;
            Break;
}

Is this on the EpiViewNotification of the ReportParam, or the packSlipsView?

Once this is all done, how do I set the customization for the Print Form? Is there a more standard way of doing this? I just don’t like hardcoding.

Thanks,

Ken

What about using Alternate Report Styles instead? They support this natively with APR

I am listening. That is new to me.

@bderuvo tag you are it

@knash since you already have the report styles created, you can create a routing rule that automatically selects the correct report style based on a condition.

add a routing rule, break on the pack number, add a condition to check for the customer number, if true then select the Alternate report style, then action is either print or email or whatever you need (test with preview).

1 Like

OK Here is a fun twist. What if we want an exception to this? The user wants the customers packslip and our packslip, once in awhile.

A helpful hint on Break/Routing …

Once a BreakRouting is created for a style, you can no longer select a different RDD for that style. You can change the RDD itself.

So if you you’re going to use break routing, and the style currently uses the default RDD, copy that RDD, and specify the copied RDD for the style. That way any future changes that would require changes to the RDD, can be done.

Exceptions are handled like any other exception (manually)
When you need the extra slip just print/override the extra copy.

Do the Report Styles have to share the same RDD?

I have not tried with mismatching RDD’s. The routing rule is tied to an RRD and cant be changed.

I updated so they are all using the same RDD. When I run print preview, nothing happens for the user.

task monitor show something is happening.

Anything I am missing that is jumping out at you?

generate is not good for you, that just creates the dataset. try preview.

will this respect the action by the user then? if they click preview vs print?

1 Like

found the user action widget. sorry I missed it right in front of my nose

No. Each style can use a different RDD. But the RDD field becomes locked (on that Style) when you create a Break/Routing.

I tried finding Alternate Report Styles and couldn’t find in 10.1.400, is it part of another menu item?