Skip to Content
0
Former Member
Nov 02, 2006 at 09:52 PM

How does the SetDefaultReport Method really work?

20 Views

I've looked in the forum and can't find the answer in enough detail for me to understand it.

I need to create a new print button on a system form (delivery notes) and when the user presses it, I need to change the default report for the user/bp combination on the screen, invoke the print button, then return the user's records in the RDFL table back to what they were before I made a change.

I have it working so that everything up to the changing things back is fine. (Although if the user doesn't have any defaults already, then I have to set the same default twice, because the first set assigns the system values, even though I assign a reportcode, layout code, card code and user id).

But the main problem is if the user/bp combination did not have a default specified in RTYP before I made my change, then I can't get rid of my default record in that table, so the next time the user goes to print via the system print button, hoping to get the system default, my default report is going to print instead and that's not what they want. Whew!

Is there some place on the website that might explain this process in some detail? For instance, why are their records in this table with a negative userid number & what does that mean? Why does the user need to be a super user for me to do this via the DI but they can do it through the application without being a SU?

I'd really appreciate any insights, and thank you.