 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Vladimir Stefanovic Guest
|
Posted: Mon Jan 26, 2004 1:00 pm Post subject: Re: Quick report printing bitmaps |
|
|
| Quote: | I'm using QReport to print variable bitmaps.
Everything is fine for the first time, the printout ( preview) is ok.
If I'm calling the function for the next time, the second page is
corrupted
( black).
The third time everything is black, including a static logo.
I checked my bitmaps on a normal canvas before and after the printout,
everything ok.
Some ideas or suggestions?
Detlef
|
That are famous QuickReport's bugs, and one of the reasons why Borland
discontinued cooperation with them.
Go to their web site and see if some patches are available.
Vladimir.
|
|
| Back to top |
|
 |
Detlef Guest
|
Posted: Wed Jan 28, 2004 9:03 am Post subject: Quick report printing bitmaps |
|
|
Hi all,
I'm using QReport to print variable bitmaps.
Everything is fine for the first time, the printout ( preview) is ok.
If I'm calling the function for the next time, the second page is corrupted
( black).
The third time everything is black, including a static logo.
I checked my bitmaps on a normal canvas before and after the printout,
everything ok.
Some ideas or suggestions?
Detlef
Attached the code:
//----------------------------------------------------------------------
// defintion of the list
template <class T> class SeaTList :public TList
{
public:
__property T* Items[int Index] = {read=GetItem, write=PutItem};
T* First() {return (T*)TList::First();};
T* Last() {return (T*)TList::Last();};
void Add(T* Item){TList::Add(Item);};
protected:
T* GetItem(int Index) {return (T*)Get( Index);};
void PutItem(int Index, T* Item) {TList::Put(Index, Item);};
};
SeaTList<Graphics::TBitmap>* BitmapList;
//--------------------------------------------------------------------------
-
void __fastcall TFormQuickReportGraphic::QuickRep1NeedData(TObject *Sender,
bool &MoreData)
{
MoreData = ( iBitmapListIndex < iPagesCount);
}
//--------------------------------------------------------------------------
-
void __fastcall TFormQuickReportGraphic::DetailBand1BeforePrint(
TQRCustomBand *Sender, bool &PrintBand)
{
QRMainImage->Picture->Bitmap = BitmapList->Items[iBitmapListIndex];
iBitmapListIndex++;
PrintBand = true;
}
//--------------------------------------------------------------------------
-
void __fastcall TFormQuickReportGraphic::QuickRep1BeforePrint(
TCustomQuickRep *Sender, bool &PrintReport)
{
iPagesCount = BitmapList->Count;
iBitmapListIndex = 0;
}
|
|
| Back to top |
|
 |
Detlef Guest
|
Posted: Tue Feb 03, 2004 10:02 am Post subject: Re: Quick report printing bitmaps |
|
|
I'm now creating the QReport form every time and delete it after the
printout.
Than it works.
Detlef
"Detlef" <detlef.stute (AT) seatec-gmbh (DOT) com> schrieb im Newsbeitrag
news:40177ac4 (AT) newsgroups (DOT) borland.com...
| Quote: | Hi all,
I'm using QReport to print variable bitmaps.
Everything is fine for the first time, the printout ( preview) is ok.
If I'm calling the function for the next time, the second page is
corrupted
( black).
The third time everything is black, including a static logo.
I checked my bitmaps on a normal canvas before and after the printout,
everything ok.
Some ideas or suggestions?
Detlef
Attached the code:
//----------------------------------------------------------------------
// defintion of the list
template <class T> class SeaTList :public TList
{
public:
__property T* Items[int Index] = {read=GetItem, write=PutItem};
T* First() {return (T*)TList::First();};
T* Last() {return (T*)TList::Last();};
void Add(T* Item){TList::Add(Item);};
protected:
T* GetItem(int Index) {return (T*)Get( Index);};
void PutItem(int Index, T* Item) {TList::Put(Index, Item);};
};
SeaTList<Graphics::TBitmap>* BitmapList;
//--------------------------------------------------------------------------
-
void __fastcall TFormQuickReportGraphic::QuickRep1NeedData(TObject
*Sender,
bool &MoreData)
{
MoreData = ( iBitmapListIndex < iPagesCount);
}
//--------------------------------------------------------------------------
-
void __fastcall TFormQuickReportGraphic::DetailBand1BeforePrint(
TQRCustomBand *Sender, bool &PrintBand)
{
QRMainImage->Picture->Bitmap = BitmapList->Items[iBitmapListIndex];
iBitmapListIndex++;
PrintBand = true;
}
//--------------------------------------------------------------------------
-
void __fastcall TFormQuickReportGraphic::QuickRep1BeforePrint(
TCustomQuickRep *Sender, bool &PrintReport)
{
iPagesCount = BitmapList->Count;
iBitmapListIndex = 0;
}
|
|
|
| Back to top |
|
 |
Vladimir Stefanovic Guest
|
Posted: Tue Feb 03, 2004 3:14 pm Post subject: Re: Quick report printing bitmaps |
|
|
| Quote: | I'm now creating the QReport form every time and delete it after the
printout.
Than it works.
Detlef
|
Well, don't be so sure I also create QReport form dynamically
every time and still have problems. I do not know how is it possible
but the system crashes less when I assign BMP's than JPG's.
TQRImages can sometimes be viewed in preview and sometimes not.
In both cases it can be printed like a black rectangle or invisible
(better behaivor - to save toner at least :)
Good luck.
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|