Link to home
Start Free TrialLog in
Avatar of Cruizectrl
Cruizectrl

asked on

Changing report layout based on criteria

Last one for the week I swear! =)

I have a report that summerizes a job with plugged information from the record.

The bottom portion of the page is mainly for invoiceing but the number of lines will change based on the selected client for the job.

So,
If client 1 is selected I would need to print 4 boxes (or blank fields with borders, whatevers easier)
but if client 2 is selected I would only need 1 displayed.

Each box would need its own label as well which varies between all 6 clients.

Thank go they just write this information out,  But they need the boxes in there to see whats being invoiced.

Make sense?
Avatar of Member_2_908359
Member_2_908359
Flag of France image

kinda sense...
I think I would use a dummy image representing a square box in a repeated container field, and show all 4 repetitions on the layout, then delete the unwanted subfields according to the amount of blank boxes you need. not really smart though.
Avatar of ccazares67
ccazares67

You can create a Script that creates related records for you depending on the client you select.

Define a realtionship and do not allow to create related records through this relationship because the records will be already there.

Create a portal with the maximum number of boxes.

So, if client 1 is selected and you need 4 boxes you create 4 records in the related file or table and then you go to the layout where you have the portal. You will se only the records you need
Avatar of Cruizectrl

ASKER

Am I creating 4 portals?  I'm sorry.. not used to working with them.
I think he meant only 1 portal, then 4 records in the related table
lesouef is right you only need 1 portal an the number of records needed for your current client.
Alright.  I get the part of the portal.. But how do I change the labels per client?  Would I need a seperate form for each?
You only need one layout with a portal and the field with the client name.
You can use the same field where you store the client name and put that field in the layout, in the header or in the body. It will show the Client Name and in the portal will show the related records you need for that particular client.
Let us know if you'd like an example file
Yes.. Example file would be great.. Its Monday.  Any other day I might be able to figure this out.
I have a fix for that too, witten in cshell/cmd/java/script/messed/alltogether
if ( current_day == (day_off + 1)) then
(
don't work
)
else (
ask the question to $EE_expert
endif )
ASKER CERTIFIED SOLUTION
Avatar of Member_2_908359
Member_2_908359
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That example helped a ton!  With the label thing, I created 4 fields and lined them up where the boxes would go and just ran a script to change them.  All is good!
you wanted them horizontal I guess. ok then. too bad we can't rotate portals!