WPCubed Product Support

NextDataProvider

Hello

The scenerio involves
a) A datamodule with multiple tables each attached to a datasource and a wpmmDataProvider
b) all WPMMDataProviders are attached to a single WPRichText component
c) each WPMMDataProvider is attached to a subsequent WPMMDataProvider via the NextDataProvider property and the last WPMMDataProvider is attached to the first WPMMDataProvider

d) Each table has a common field "socialsecurity" all other field names are different
e) The tables are filtered by "SocialSecurity" and in some cases this results in no records being displayed.

f) WPRichText1.InsertPointAttr.hidden := True;
g) The ShowFieldNames := False for all of the WPMMDataProviders then

If all tables have one or more records then the information in the socialsecurity field displays in the associated merge field. However, if one or more of the tables have no records then the socialsecurity information is not displayed. Why?

I have tried - to no avail
a) having the last WPMMDataProvider not attached back to the first WPMMDataProvider
b) making all tables with a record count of 0 inactive

Any help would be greatly appreciated.

John

#1 ♥ 0
3k Views 2 users read 2 min
support

Hi,

as mentioned in my e-mail to you (did you receive it?) I reccomend to use the OnMailMergeGetText event and NOT the dataprovider.

You only need some
if f=nil then f := DataSet.FindField // for each table

and a

if f<>nil then
Contents.StringValue := f.AsString;

to merge in the data.

Julian

#2 ♥ 0

Julian

Yes I did receive your reply and I understand.

Thanks

John

#3 ♥ 0
This category is archived. No new posts are possible.