BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Quick report printing bitmaps

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
Vladimir Stefanovic
Guest





PostPosted: Mon Jan 26, 2004 1:00 pm    Post subject: Re: Quick report printing bitmaps Reply with quote



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





PostPosted: Wed Jan 28, 2004 9:03 am    Post subject: Quick report printing bitmaps Reply with 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
Detlef
Guest





PostPosted: Tue Feb 03, 2004 10:02 am    Post subject: Re: Quick report printing bitmaps Reply with quote



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





PostPosted: Tue Feb 03, 2004 3:14 pm    Post subject: Re: Quick report printing bitmaps Reply with quote

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 Smile 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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.