TsiLang and FastReport Pdf Export

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
lehd
Posts: 4
Joined: Thu Jan 22, 2009 10:53 am

TsiLang and FastReport Pdf Export

Post by lehd »

Hello all.
I use the last version of TsiLang in Delphi 7.
I also use FastReport. My reports have pdf export feature implemented by FastReport components. But I dont use tsilang for reports.
The problem is that after any pdf export tsilang components seem to be corrupted. Some translations become empty, some switch to diff language.

Any ideas?

Thank you.
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Hello,

This is really strange. Are you able to reproduce this on simple sample project? Actually, it looks like a problem somewhere in your code.
Best regards,
Igor Siticov.
lehd
Posts: 4
Joined: Thu Jan 22, 2009 10:53 am

Post by lehd »

Hi. Thanks for fast response.
Yes, it is really strange. I tried to reproduce in a sample project but it works fine. In my main project it fails after any kind of export not only pdf.
Any form containing any fastreport with any export will switch to diff language after export. I'm using dispatcher, 1 main tsilang and linked ones all over the app. The translation goes wrong only in one or several form in the call hierarchy. But the dispatcher stays with the correct language and other forms looks fine.
It maybe the code problem like memory faults but the app is stable, all works fine.
Do you have any idea of what kind of problems may corrupt tsilang?

I will try to make a simple sample form inside my app, hoping that it may help to find out the root of the problem.
lehd
Posts: 4
Joined: Thu Jan 22, 2009 10:53 am

Post by lehd »

I tried it. Added one simple form with empty report and pdf export, no tsilang components on this form. All works fine until i run export of this empty report. Then most strings from tsilang are empty while other captions and things like that are switched to different language. Really strange and I cannot imagine how my code can do this.
The problem is that i cannot reproduce it with the very simple project. Maybe the number of translated resource makes sense as my app is rather big, full sil export is about 400k.
lehd
Posts: 4
Joined: Thu Jan 22, 2009 10:53 am

Post by lehd »

I added onlangchange event handler to the one of the linked tsilangs. And saw that every time the form is created the main dispatcher tried to load the file. The filename property is not empty but there is no file with this name and it seems that only this particular linked tsilang becomes empty. I though t that filename property is ignored when there is no file and actually it is like this - all works fine until any fastreport export.
I tried to remove the filename and now it works. Really really strange but it works.

I dont know whether it is a bug or some issue with my app but it is like this.
Maybe this description can be helpful for any reason to somebody.

Anyway, thanks for help.
Post Reply