ProcessDuplicates

Stimulsoft Reports.NET discussion
Post Reply
dennisss
Posts: 3
Joined: Wed Dec 12, 2007 3:19 am
Location: Sweden

ProcessDuplicates

Post by dennisss »

Dear Stimulsoft team,

I have a warranty report that needs to be a specific format for our supplier to accept.

The columns is as follows:
Invoice #, Type, Framenumber, Sold date, Article number, Description, Price, etc...

If there is more than one article the invoice #, type, framenumber and sold date should be empty on line 2 and onwards (until the beginning of the next warranty).

The only column that's always unique for each warranty is Framenumber.
If I set ProcessDuplicates to hide for the first 4 columns I get problems when, for instance, the date is the same as the next warranty or the type is the same.

What I would need is to be able to set a column as "Master" and make the "Child" columns mimic the visibility of the "Master", so I in practice could set ProcessDuplicates to Hide on Framenumber and set Framenumber as "Master" to Invoice #, Type & Sold date.

Is this possible to do? What have I missed? And did this make any sense?

PS: Example of what it should look like

Invoice#___Type___Framenumber___Solddate___Articlenumber___Description___Price
1000______XXX____111111________071220_____121000________XXX_________100
___________________________________________121001________YYY_________200
1001______XXX____222222________071220_____121000________XXX_________100
___________________________________________121001________YYY_________200
(Ignore the lines)

(If I set ProcessDuplicates to hide you can see that the Solddate and the Type in the above example would be hidden and they need to be displayed).

Best regards
Dennis
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

ProcessDuplicates

Post by Edward »

In case of your report the property Processing Duplicates can be set in Hide only for the Invoice datacolumn.

As for other columns then this property will not be work there.

The only decision available is to define in the report's Dictionary as much variables as columns there and a one variable for the index field (e.g. MyInvoiceIDVariable)
Each variable must be assigned with new value in the AfterPrint event Handler:

Code: Select all

MytypeVariable = MyDataSource.type;
MyInvoiceIDVariable = MyDataSource.InvoiceID;
Then in the Text Property of the each StiText component you can write the following:

Code: Select all

{IIF((MytypeVariable == MyDataSource.type)&&(MyDataSource.InvoiceID==MyInvoiceIDVariable),string.Empty,MyDataSource.type.ToString())}
In that case all "Child" values will be hidden.

Please see the sample report in the attachment. This report could be opened in the Demo.exe sample application from the standard delivery.

Thank you.
Attachments
25.ProcessingDuplicatesMasterChild.mrt
(16.86 KiB) Downloaded 248 times
dennisss
Posts: 3
Joined: Wed Dec 12, 2007 3:19 am
Location: Sweden

ProcessDuplicates

Post by dennisss »

Thank you!!

Works perfectly!
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

ProcessDuplicates

Post by Edward »

Let us know, if you need any help.

Thank you.
Post Reply