Welcome, Guest. Please Login.
05/02/24 at 07:47:42
News:
Home Help Search Login


Pages: 1
Send Topic Print
Parameter for user-defined item parameters (Read 2163 times)
David Waldmann
Active Member
*****


Live to work, or
work to live?

Posts: 1924
Gender: male
Parameter for user-defined item parameters
01/20/10 at 11:44:18
 
I am trying to modify a report that I use to replenish stock. There are two levels to my selection criteria, but they could be defined as one.
 
Here is a sample of my item numbers:
100AR
100CR
104AR
104CR
120AR
120CR
122AR
122CR
 
First, we make WOs by the group 100, 104, 120 and 122 (one prefix for each group)
However, we also group by 100 & 120 (bold), and 104 & 122 (italic).
 
The way I currently have it set up I can enter a selection criteria based on the first grouping, i.e. One Of: 100, 120. This works, but I want to set it up so that whoever is doing this doesn't need to know which sub-groups go together, and they can just pick "Bold" versus "Italic" and get all the applicable ones.
 
And I'd like to set it up as a Parameter, to make it more user-friendly, but I can't see how to make a Parameter refer to a group of things (either by referring to an existing formula, or creating one as part of the Parameter). Is this possible?
 
If I HAVE to I can use some non-used field in the Item info, but I'd really like to use what I already have.
Back to top
 
 

David N Waldmann
President
Vermont Hardwoods
Chester, VT

Evo-ERP, 5 user
IST Build: 3/4/19, patched 04/30/19
Pervasive v11.31
Server 2012 / Win10 x64
Crystal Reports v11
Email WWW   IP Logged
dameng
Senior Member
****


DBA / EVO Software
Consultant

Posts: 275
Gender: male
Re: Parameter for user-defined item parameters
Reply #1 - 01/21/10 at 16:28:36
 
one of two ways:
1) use the "LIKE" record selection, so the user puts in only the 120, which will be select records like "120*" or use the ONE OF and the user puts in 100* and 120*
or
if you want a drop down list of selectible values,
2) create a view that returns the left 3 char of the Item code, and include this view in your report linked appropriately.
 
couple thoughts at least.
Back to top
 
 

Dave Mengelkamp
Digital Consulting
760.832.2536
davemeng@earthlink.net
Email WWW   IP Logged
David Waldmann
Active Member
*****


Live to work, or
work to live?

Posts: 1924
Gender: male
Re: Parameter for user-defined item parameters
Reply #2 - 01/22/10 at 05:20:55
 
Dave - thanks for your thoughts.
 
However, I believe that only gives me the functionality I already have. I want them to be able to choose (based on my example) "Bold" which would select 100* and 120*, or "Italic" which would return 104* and 122*. I don't want them to have to know that they need to select 100* & 120* - they don't know which ones go together - only that we need to run Bold or Italic...
Back to top
 
 

David N Waldmann
President
Vermont Hardwoods
Chester, VT

Evo-ERP, 5 user
IST Build: 3/4/19, patched 04/30/19
Pervasive v11.31
Server 2012 / Win10 x64
Crystal Reports v11
Email WWW   IP Logged
GasGiant
Administrator
*****


How can I help?

Posts: 1523
Gender: male
Re: Parameter for user-defined item parameters
Reply #3 - 01/22/10 at 06:26:57
 
the SQL "IN" keyword let's you enter a list, so the Bold query would be something like "SELECT * FROM INVTXN WHERE  mtit_code IN('100AR','100CR','120AR','120CR')" and the Italics query would grab the others. the "LIKE" matches would not work for the italics list, but "LIKE '__0_R'" would work for the bold group. So would "LIKE '%0%'", but it would likely pick up a lot of other items that have zeroes anywhere between the first and last character.
Back to top
 
 


Email WWW GasGiant GasGiant 31012781 swordworlder swordworlder   IP Logged
David Waldmann
Active Member
*****


Live to work, or
work to live?

Posts: 1924
Gender: male
Re: Parameter for user-defined item parameters
Reply #4 - 01/22/10 at 09:18:59
 
Colin, I think I know what you're driving at, but I'm not sure how I can make the selection criteria user-selectable unless I make a separate report for every group (which I had never thought of doing until right now - that would work, but be kind of clunky). I want to be able to define several selection criteria (as you suggested, SELECT IN works and is what I've been using so far for testing), and then enable the user to pick which criteria to use. Ideally, they would be able to select one or more of the criteria.
 
I was envisioning a Parameter, but I can't see how to make the selection criteria use that. Yes, you can use Parameters in the selection criteria, but the Parameter doesn't seem to be able to translate as a "selection smart" entry. For instance, if I could make a Parameter and prefill it with values of SELECT FROM....IN(100AR,100CR,etc), SELECT FROM....IN(104AR,104CR,etc), labeled with the proper descriptions, I would get what I'm looking for.
 
BTW, the example I gave is not complete, so the LIKE match wouldn't work, as there are too many variables in the item number format. I need to be able to enter a list.
 
Maybe I'm asking for too much...?
Back to top
 
 

David N Waldmann
President
Vermont Hardwoods
Chester, VT

Evo-ERP, 5 user
IST Build: 3/4/19, patched 04/30/19
Pervasive v11.31
Server 2012 / Win10 x64
Crystal Reports v11
Email WWW   IP Logged
dameng
Senior Member
****


DBA / EVO Software
Consultant

Posts: 275
Gender: male
Re: Parameter for user-defined item parameters
Reply #5 - 01/23/10 at 10:15:12
 
dave,
your Parameter could be a text field with two choices, "BOLD" , "ITALICS".
Then you create a record selection formula, whereas, IF ?choose = "BOLD" then Item code IN (,,,,,,) or like, ELSE IF ?choose = "ITALICS" Then Item code IN or like....
 
if that doesn't work for you, there is a 3rd party plug in for Crystal Reports, that adds to the Function Library, it's called CUT LIGHT. it allows you to have your Report run an SQL command back to the database. it's pretty slick.
Back to top
 
 

Dave Mengelkamp
Digital Consulting
760.832.2536
davemeng@earthlink.net
Email WWW   IP Logged
David Waldmann
Active Member
*****


Live to work, or
work to live?

Posts: 1924
Gender: male
Re: Parameter for user-defined item parameters
Reply #6 - 01/24/10 at 12:50:22
 
Dave,
It sounds like that should work. Will give it a try.
Thanks!
Back to top
 
 

David N Waldmann
President
Vermont Hardwoods
Chester, VT

Evo-ERP, 5 user
IST Build: 3/4/19, patched 04/30/19
Pervasive v11.31
Server 2012 / Win10 x64
Crystal Reports v11
Email WWW   IP Logged
Pages: 1
Send Topic Print