Jump to content

1 application, 1 server, 2 browser, 2 IP and 1 problem


Alessandro

Recommended Posts

Good Morning!
 
I have a very strange problem!
 
I have 1 application (.exe) running on the server.
I have 2 database (independent, but equal) using the same application.
I use 2 different browsers with different IP to access the server application.
As the initial login, I direct the user to use X or Y database.
Records and consultations work perfect. So far so good.
 
Problem:
When I generate a report using an database X, if I generate the same report using the database Y in another different browser and IP, the report X the data showing in the report Y!
 
To generate the report, I use a procedure in Firebird (with parameters), a data module with DataSet / DataSource and FastReport.
 
Can anyone help me clarify what's going on?
 
Thank you.

 

post-2783-0-65323000-1495139453_thumb.png

Link to comment
Share on other sites

Alessandro,
 
FastReport tem esse problema, verifique as seguintes condições quando voce cria os relatórios:
--
FastReport has this problem, check the following conditions when you create the reports:
frxReport.EngineOptions.DestroyForms := False;
frxReport.EngineOptions.UseGlobalDataSetList := False;
frxReport.EngineOptions.EnableThreadSafe := True;
frxReport.PreviewOptions.AllowEdit := False;

e procurer gerar os relatórios sempre com nomes diferentes ex:

--

And seek to generate reports always with different names eg:

frxPDF.DefaultPath := REL_+FormatDateTime('_[HHMMSSZZZ]', Now)+'.pdf';
  • Upvote 1
Link to comment
Share on other sites

 

Alessandro,
 
FastReport tem esse problema, verifique as seguintes condições quando voce cria os relatórios:
--
FastReport has this problem, check the following conditions when you create the reports:
frxReport.EngineOptions.DestroyForms := False;
frxReport.EngineOptions.UseGlobalDataSetList := False;
frxReport.EngineOptions.EnableThreadSafe := True;
frxReport.PreviewOptions.AllowEdit := False;

e procurer gerar os relatórios sempre com nomes diferentes ex:

--

And seek to generate reports always with different names eg:

frxPDF.DefaultPath := REL_+FormatDateTime('_[HHMMSSZZZ]', Now)+'.pdf';

 

Marlon...

Eu fiz dessa forma aqui e os dados se misturam.

 

procedure TUniMainModule.MyFrxShowV2(NomeRelatorio, TituloDoRelatorio, TituloFormulario : String);
var fn, Aurl: String;
    FormUrlView1: TFm_Relatorio;
    RelRep : TfrxReport;
begin
   DmCadastro.AbreFechaLoja(0);
   RelRep := TfrxReport.Create(nil);
   try
      fn := UniServerModule.NewCacheFileUrl(False, 'pdf', '', '', AUrl);
 
      RelRep.LoadFromFile(extractFilePath(Application.Exename) + '\Relatorios\' + nomerelatorio);
      RelRep.ShowProgress := False;
      RelRep.PrintOptions.ShowDialog    := False;
      RelRep.PreviewOptions.AllowEdit := False;
      RelRep.EngineOptions.SilentMode := True; // no dialogs
      RelRep.EngineOptions.EnableThreadSafe := True; // Thread safety
      RelRep.EngineOptions.DestroyForms := False; // Needed for correct operation
      RelRep.EngineOptions.UseGlobalDataSetList := False; // Do not keep a global list of a datasets
      frxPDFExport.Background              := true;
      frxPDFExport.ShowProgress            := False;
      frxPDFExport.ShowDialog              := False;
      frxPDFExport.FileName                := fn;
      frxPDFExport.DefaultPath             := '';
 
      RelRep.PrepareReport(); // Cria report
      RelRep.Export(frxPDFExport); // Exporta Report
 
      FormUrlView1 := TFm_Relatorio.Create(UniApplication);
      FormUrlView1.uniURLFrame1.URL := Aurl;
      FormUrlView1.Show;
 
   finally
      RelRep.Free;
   end;
   TrimAppMemorySize();
end;
 

 

 

 

Link to comment
Share on other sites

A variável AbreFechaLoja(0) você busca de onde?

--

The variable OpenFakeStore (0) you search from where?

 

Você chegou a verificar no servidor, se os relatórios gerados por ambos os clientes se são gerados diferente?

--

Did you get to check on the server if the reports generated by both clients are generated differently?

Enviado de meu XT1563 usando Tapatalk

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...