Show report

Hi, I have some preblem here:

ADOQImpCodeBar(TADOQuery) have the Query:
SELECT
   itItem.Description, itItem.NoItem
FROM itItem
WHERE itItem.NoItem = :NoItem

frDBDSImpCodeBar(TfrDBDataSet)->DataSet is ADOImpCodeBar

frRImpCodeBar(TfrReport)->DataSet is frDBDSImpCodeBar

when i doubleclick on frRImpCodeBar and I click on preview report, it is perfect.

but when it is the code who try to Show it, it doesn't work. ;)

I will show you what I do:
ADOQImpCodeBar->Parameters->ParamByName("NoItem")->Value = edtNoItem->Text;
ADOQImpCodeBar->Open();

frRImpCodeBar->Title = "Code-barre";
if(!frRImpCodeBar->PrepareReport())
{
   ShowMessage("Error when prepare the report !");
}
frRImpCodeBar->ShowReport();

;)

I see the build of report but nothing is show.
(I haven't time to see if the build put 0 or 1 output)

Can you help me please? ;)

Comments

  • edited 8:22AM
    I have to find, this should be done:
    frRImpCodeBar->LoadFromFile(FilePath + ExtractFileName("ItemImpCodeBar.frf"));
    frRImpCodeBar->ShowReport();
    

    You should not forget to put the objects of which our report need. Like me, I have a BarCode in my report, then I must put TfrBarCodeObject (even not need to bind it to nothing) on my form. ;)

    Odd but it goes. ;)

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.