IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#25029 - 01/22/10 04:24 PM Losing Leading Zeros When "Loading Databases"
P. Brittle Offline
Member

Registered: 04/02/04
Posts: 37
When uploading a "Database file" leading zeros don't show. They show correctly in PrintShop Mail but when we load the same list into PrintShop Web they are gone. What can we do to fix this?
_________________________
P. Brittle

Top
#25030 - 01/22/10 04:42 PM Re: Losing Leading Zeros When "Loading Databases"
Anonymous
Unregistered


P.,

you can use the following expression in your PrintShop Mail Design to counter this:

RIGHT("0000000000" & [Databasefield], 6)

Change "6" to the number of digits you want to zerofill to.

The other option, if I'm not mistaken, would be to convert your database to CSV, which is plain text and should have added the zeroes.

The reason this happens is that leading zeroes are part of the excel "formatting", thus don't actually appear in the database itself.

Hope this helps,
Eric.

Top
#25031 - 01/22/10 06:12 PM Re: Losing Leading Zeros When "Loading Databases"
P. Brittle Offline
Member

Registered: 04/02/04
Posts: 37
Thanks for the quick response, Eric.

Unfortunately, it looks like the issue is with how PrintShop Web reads that field while it's uploading the list. Which can't be controlled by the PSM file since the field have not been mapped yet.

We have tried the CSV method as well as tab-delimited and we still lose the leading zeros. And the field that had the leading zero had an apostrophe in front of it so that it would be read as text.

Another thing that came to my attention after my first post is that any field with text in that column drops out completely. With that in mind I put apostrophes in front of all the fields that contained numbers only and everything came in as it should. When I removed the apostrophe from a few of them and tried the upload, those fields with out the apostrophe did not load.

It appears that PSW is setting that field as either a text field or a number field and then leaving out the data that is not what it chose.
_________________________
P. Brittle

Top
#25032 - 01/23/10 03:08 AM Re: Losing Leading Zeros When "Loading Databases"
Sander vd Berg Offline
OL Expert

Registered: 06/10/08
Posts: 207
Loc: Objectif Lune NL
You might want to take a look at the default Jet engine settings on the machine that is hosting PSW.

For Excel, look at TypeGuessRows and ImportMixedTypes which you can find under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Excel.

For CSV and tab-delimited, look at MaxScanRows and ImportMixedTypes which you can find under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Text.

1. Change TypeGuessRows to 0, and MaxScanRows to 0x7fffffff (maximum signed hexadecimal value). This specifies how many rows are processed in order to determine the type of a column. You want all rows to be processed; you really won't notice the small drop in performance. [Edit: Zero is a special value, but it only works for TypeGuessRows]

2. Change ImportMixedTypes to "Text". This will force the type of a column to be set to Text if it contains mixed types. You don't want it to be set to Majority Type.

Does that help?

Top
#25033 - 02/08/10 03:00 AM Re: Losing Leading Zeros When "Loading Databases"
Sander vd Berg Offline
OL Expert

Registered: 06/10/08
Posts: 207
Loc: Objectif Lune NL
Changing those registry keys is a workaround for PSW 2 and PSM Suite 7.0. The problem has been fixed for CSV in PSM Suite 7.0.1, and we plan to fix it for Excel in PSM Suite 7.1.

Top