ExecutePrintDef with Parameter - No prompt if already filled
Good afternoon,
i have a problem with a customize rule.
We try to open a print definition via customize rule (new menu) to save a layout as pdf on a file path. The code works, but we have to set all parameters on mode "No prompt if already filled".
Thats a problem for "Checkbox"-parameter, because this layout/report should be open in two ways:
1. Open directly via Menu.
Therefore the report needs the checkbox-parameter as mode "Standard", because if you set this to "No prompt" the user can't change the value
2. Open via customize rule
Therefore the report needs the checkbox-parameter as mode "No prompt", because else you have to set the value each time you open the layout. We already set the parameter in our customize rule (param4):
LayoutOpener.ExecutePrintDef(layout, true, LayoutOpener.OpenLayoutModes.PDF, param1, results[i].ToString(), param2, dateFrom.Value, param3, dateTo.Value, param4, "1", param5, month.ToString(), param6, year.ToString());
}
Is it possible to hand over the checkbox-parameter to the layout and start this layout without input mask?
I'm not sure if the problem is clear enough.
-
Hi Benny,
I'm not sure but perhabs you can use the sequence column. There you can use a query like:
Pseudo-Code:
SELECT CASE WHEN XXX=XXX THEN 10 Else '' END AS [Seq]
SELECT CASE WHEN XXX=XXX THEN 20 Else '' END AS [Seq]and so on.
Normally the prompt shouldn't pop up if it is not filled
XXX cold be a freetext from the PrintDef or the PrintDef-IDregards Lothar
0 -
Hi Lothar,
thanks for the fast reply. That's a good idea, but i tried with the following query:
SELECT CASE WHEN [%FreeText] <> '1' THEN '04' ELSE '' END
I set the FreeText field in the Printdefinition for the customize rule to '1' and it didn't work. Inputfield is still appearing when opening this printdef via customize rule.
But i found my big mistake:
I used the default parameter "FreeText" also for my checkbox parameter. This is why I wasn't able to set the parameter mode to "No prompt if already filled". I created a new parameter "Ausgabeform" with the same values and set this to "No prompt if already filled" and it worked for my customize rule and also for the standard layout. So don't use the FreeText parameter for this type of parameter.
Thanks again Lothar!
0 -
Hallo Benny,
manchmal hilft es ja auch darüber zu reden ;-)
Gruß Lothar0 -
Hi Lothar,
da hast du Recht. Danke dir ;-)
Gruß Benny
0
Please sign in to leave a comment.
Comments
4 comments