When suggesting solutions for the Picture-problem in my blog about the OutOfMemoryException, I talked about a possibility to work with an extra dataset to provide a picture, separated from your invoice dataset.
People were interested, so I wrote a blog about it, but haven’t published it yet. I’m going to .. but I felt forced in blogging this one first .. as in my opinion, my dataset-solution was too far-fetched, and I didn’t want anyone to start implementing it, while there are better solutions.
First of all, I got the suggestion to “split the one big dataset” (one print of one report of multiple documents) into printing that one report multiple times (each document is a separate REPORT.RUN).. . That might work to solve the OutOfMemoryException .. but you’re not quite sure, are you? If you still have many lines on the report, then you’ll be running into the same problems .. . I hope I didn’t misunderstand the proposed solution. At least many thanks to Craig!
But then I got this comment on that blog from a person where I don’t know the name of (signed by “deV.ch”):
Wouldn’t a simple clear on the blob field on the following dataitem (lets assume its sales line) be enough to have the picture only on the first row?
That actually made much sense, but seemed too simple to not have thought of it. For testing this, I took a small shortcut (didn’t test too much, just went for the suggestion, rammed some code in the default code, didn’t do anything for documenting this, …). The picture fields are in the PageLoop-Header section, so I though I was safe to add the CLEARs on the SalesinvoiceLine-dataitem, like this:
And it does exactly what we were intending to do: only the picture in the first line of the dataset.
My dataset-solution was clearly too far-fetched!
Marvelous! I’m quite ashamed because most probably, I would have done it in a much more complex way, while there was no reason.. . . But i’m thankful to the community!