knash
(Ken Nash)
June 25, 2019, 2:24pm
1
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
knash
(Ken Nash)
June 25, 2019, 2:26pm
3
I am listening. That is new to me.
bderuvo
(Bryan DeRuvo)
June 25, 2019, 2:33pm
5
@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
knash
(Ken Nash)
June 25, 2019, 2:46pm
6
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.
ckrusen
(Calvin Krusen)
June 25, 2019, 2:46pm
7
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.
knash
(Ken Nash)
June 25, 2019, 4:12pm
9
Do the Report Styles have to share the same RDD?
bderuvo
(Bryan DeRuvo)
June 25, 2019, 4:34pm
10
I have not tried with mismatching RDD’s. The routing rule is tied to an RRD and cant be changed.
knash
(Ken Nash)
June 25, 2019, 7:05pm
11
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?
bderuvo
(Bryan DeRuvo)
June 25, 2019, 7:11pm
12
generate is not good for you, that just creates the dataset. try preview.
knash
(Ken Nash)
June 25, 2019, 7:12pm
13
will this respect the action by the user then? if they click preview vs print?
1 Like
knash
(Ken Nash)
June 25, 2019, 7:13pm
14
found the user action widget. sorry I missed it right in front of my nose
ckrusen
(Calvin Krusen)
June 26, 2019, 12:53am
15
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?