Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Printing If Dropdown=Yes


This topic is 6501 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi,

I have searched but can’t find an answer to this exact question:

I have a yes/no dropdown on my layout, is it possible to have a report printed if the user selects “yes”.

I am attempting to do it via a “Case” calculation, but I am not getting too far…I think Im going about it wrong.

Could someone please point me in the right direction once more J

Thanks for your time.

James

Posted

James,

It may make more sense if you have an interface in which you could allow the user to select which reports that they want to run rather than the way you suggested.

Maybe I am misreading your post. Are you looking to flag a particular Record to print as part of your report or are you talking about the ability to choose multiple types of report?

Posted

Well, you could place a field, MyPrintField on your layout and make it a button that scripts both the setting of the field AND the call to the report:

If[MyPrintField = "Print"]

New Window["Boogaloo"]

Go To Layout["MyPrintLayout"]

Print["No Dialog"]

Close Window["Boogaloo"]

Set Field["MyPrintField"; "Printed"]

End If

Posted

This will go to another layout and either preview if option is anything other than yes, or preview and print if the option is yes.

Allow User Abort[Off]

#Removes cancel option from preview window.

SetVariable[ $userChoice = YourDropDownField ]

#Capture user choice before going to a potentially unrelated table

Go To Layout[ LayoutYouWantToPrint ]

Enter Preview Mode[Pause]

If[ $userChoice = "Yes" ]

Print[]

End If

Go To Layout[ original layout ]

Or to just answer your question simply:

If[ YourField = "Yes" ]

Print[]

End If

Posted (edited)

T-Square; I put your example to work and I think it will do what I need.

Hopefully one day, I will have all this down!!!

Thanks Everyone...Im still poking away attempting to learn as I go.

I guess I should have explained what I am attempting to do a little better:

I have a layout for work, and there is a question "Do you want a copy of a-canned-report", the dropdown is a yes/no option.

I was hoping that the user could just select yes from the drop down and the canned report would print out...giving the user the report and marking the field as "yes" showing they printed the report out. And they could continue entering data on the main page without interuption.

Thanks again.

James

Edited by Guest

This topic is 6501 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.