Hello, I use Crystal Reports XI and I would like to create reports dinamically i.e. runtime via delphi code. In particular I would like to add bitmaps and pages via code. How can I do this?
Reading the docs the best I can achieve is adding bitmaps dinamically by using CrystalActiveXViever but I cannot find a way to add pages dinamically and also I have to put the CrViewer in the main form; that's not good but if I put it in another form I get message errors.
I really need help and the documentation is not that clear.
I try to add sections in my code but how does the command
Crreport.sections.add() works?
My report has a variable number of pages and I would like to be able to force a new page whenever I chose; I thought that by adding sections and force a new page at the end of every section could work but I cannot do that.
Please do help me.
I know it has sections but it is quite hard to handle them. I looked at the samples but I cannot modify them for my purposes. I don't have a database, so I don't have fields and can't manage to do groups.
What I need is the possibility to add bitmaps taken from another program. If in the other program I have say:
page 1: 3 bitmaps
page 2: 1 bitmap
page 3: 2 bitmaps
I'd like to have the same layout in the report.
Now I use just crreport.sections.item['D'] and the layout difficult to control. Anyway, Crystal does have pages, infact there is a method crreport.sections.newpageafter and also crreport.sections.newpagebefore.
How can I understand the product better if the documentation for the runtime part is so scarce?
I examined the code but cannot find examples of how to create additional report header sections.
crReport.sections.add(what kind of index shall I put here?);
I looked at some examples in vb where they simply put an integer but that does not work in delphi. I'm really getting crazy at this. If I managed to create these additional report header sections (or even detail sections) as suggested by you, the job would be done, but cannot realize how to do it.
Ok, now things are starting to work out fine. I found out a document from where I deduced that the way to add sections was:
crreport.areas.Item['RH'].sections.add(RH1);
At last! The "area' was the key to everything!
Now, I added the bitmaps and the layout is good (every bitmap is in the proper page) but for one thing. The quality of the bitmap is not very good. If I open the bitmaps with Paint or with Word the quality is normal but it seems that something happens when I put them in the report.
What could I do?
This issue is neverending.
I managed to do everything but now I've been requested to do things differently. I mean, I wrote a code that:
1) create bitmaps
2) save bitmaps to a file
3) load bitmaps and adds them to the report with the method AddPictureObjects
Of course saving a loading take too mucb time so I would like to know how could I add the bitmaps in a more direct way (i.e. without saving them to a file and the loadig them). Is this possible? Please do help me!
GreenLeaf when I do a google search on Tektips - I get
Automate Loading a Custom Function into Enterprise (XI)?
but cant seem to find the thread anywhere!!!!
I need to do something similar - see thread
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.