Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting a format using criteria 1

Status
Not open for further replies.

idehen

Technical User
Oct 26, 2004
92
GB
Hi,

I am using crystal report 8.5 and was wondering if there's anyway i could use a formula to get certain formats for my report:

Situation:
I have a report that produces a statement for all participants and these participants are from different countries. Due to the fact some countries uses certain address formats, i want to have report that checks a country if in Europe to arrange the addresses in European format which i may have pre-designed and if in America use another pre-designed american format else use a general pre-designed of other parts of the world.

This may need a bit of programming, i was just wondering if there were any ways of doing this? Your help will be most appreciated.

Thanks

Solomon
 
In short, yes you can but a little more technical detail would be helpful, especially the sample data for the different country addresses and their expected output format.

Cheers,
-LW

Cheers,
 
Not sure you are referring to the order of fields or the formatting of individual fields, but if it is the ordering of fields, you could add fields to different detail sections with the layout you wish, and then conditionally suppress the unwanted detail section using the section expert->detail_a->suppress->x+2:

{table.country} in <name your countries>

Repeat for detail_b.

-LB
 
Thanks for your help everyone.

Here is a more detail example of what i am trying to do.

I have created a statement report starting with an address format pulled from a database using crystal 8.5. By default the address displays as below, which is ok for people in the uk:

John Adams
12 james street
South east london
SE9 7PJ
United Kindom

But people from Sweden for example, uses address format:

M.Emile Dude
Vasavagen 3 4tr
582 20 LINKOPING
SWEDEN

If you notice they have their post code before the town as oppose to the uk with post code after the town. My problem is that, people from sweden or Wester Europe are very particular about their address formats and i won't mind this manually but i have about 1,500 participants to do this for, and so thought there might be a formula that allows you to set criteria for what format comes to force when it's either a uk or sweden (country).

Sorry for this long mail. I am trying to explain my problem in the shortest detail possible.

Again thanks for you reponses.
 
As LBass suggested, create a detail section for each country with its address format.

For example

Group Header
Country
Detail Section A
Name
Detail Section B
//Place address format for UK here
//Format this section by conditionally suppress the unwanted detail section using the section expert->detail_a->suppress->x+2:
Code:
{table.country} <> "UK"
Detail Section C
//Place address format for Sweden here
//Format this section by conditionally suppress the unwanted detail section using the section expert->detail_a->suppress->x+2:
Code:
{table.country} <> "Sweden"

Insert additional detail sections, one for each country

Cheers,
-LW
 
Thanks wichitakid and everyone who helped. Appreciate the time. wichitakid, the explanation you gave above worked excellent.

Appreciate it.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top