loadfromfile help
Am I stupid?
I am trying to find the definition for LoadFromFile to try and load an image from a file - I have downloaded the users/programmers and developers manuals (none of which were installed duringthe install process for VCL pro) and cant find (PDF search for loadfromfile) the information anywhere.
Frustrating
I am trying to find the definition for LoadFromFile to try and load an image from a file - I have downloaded the users/programmers and developers manuals (none of which were installed duringthe install process for VCL pro) and cant find (PDF search for loadfromfile) the information anywhere.
Frustrating
Comments
Click in "Fx" icon when you have Designer open.
Still having a problem - expect i am being dull
The script i have for a child band is as follws (tried this in the obp event for the picture as well.
The picture exists at that location, my report shows (all db fields are OK) but the picture is not displayed
procedure Child1OnBeforePrint(Sender: TfrxComponent);
begin
Picture1.LoadFromFile('e:\temp,jpg');
end;
begin
end.
Put any Memos on them with any simple text inside to verify that.
Maybe there's something wrong with both bands
- did you connect MasterData to a DataSet (like TfrxADOTable or TfrxADOQuery),
- is your Childband Strechable.
TfrxPictureView is on the child band
Masterdata2 (there is no masterdata1) is connected to frxDBDataSet1 which is connected to a UniDac query.
The textual data (connected to the dataset) on both the child band and the masterband displays correctly.
To be clear I have the following components
frxReport1 - dataset and datasetname are uninitialsed
frxDBDataset1 - dataset is set to a uniquery
TFrxMasterdata - dataset is frxDBDataset1
various text components that are connected to frxdataset1
tfrxPictureView - which is not connected to a dataset
child band wasnt strected - but changing it so it is made no difference
hope this sheds some light.
- Picture1.LoadFromFile('e:\temp,jpg')
There should be a dot
- Picture1.LoadFromFile('e:\temp.jpg')
But I'm not sure it really could be such an issue
But changing it to a . didn't make any difference [img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> Interestingly though I have the following. I place a TfrxPicture in the report title and have the obp as above I have a second TfrxPicture in the child band with the same obp code (picture1 and picture2). If I preview the report - temp.jpg is displayed correctly in the header but not in the child band If I run my program and trigger the report with frxReport1->ShowReport() then neither tfrxPicture shows temp.jpg does this help?[/img]
I did small test (Delphi BDS 2006) as I have no idea about C++ And it worked fine.
I suggest you to try again with a simple report with one MasterData and TfrxPictureView placed on it.
This may help to avoid any influence of other things we even don't know.
Thanks Mick
I tries the same but unfortunately with the same results. I just have a reporttitle and a masterdata.
I must be doing something very simple wrong
Place TfrxReport1 on form
Place TfrxDBDataset on form
Set frxReport1 dataset property to frxDBdataset1 (I later delete this)
Set Dataset property of TfrxDBdataset to a TUniQuery
Open frxReport1
Add frxDBdataset1 to report via report|data menu
Add masterdata to report and set dataset to frxdbdataset1
From Data Tree drag a text column to masterdat (just to show that all is working at that level
Add a TfrxPictureView to the form ??? don???t assign a picture
In the pictures obp add event code ??? code now looks like
Preview report get error cannot use same dataset for report.dataset and band.dataset
So clear report dataset property
Report runs, text field displays OK but no picture displayed
Hope that shows where I am going wrong - suspect it might be to do with how I connect datasets but i cant see why.
in multi designpage reports to tell the number of times to run the report.
procedure Picture1OnBeforePrint(Sender: TfrxComponent);
begin
//TfrxPictureView(Sender).Picture.LoadFromFile('e:\temp.jpg');
//should be
picture1.loadfromfile('e:\temp.jpg');
// or if you were loading this info from a db field
picture1.loadfromfile(<Datasetname."fieldname">);
end;
Sort of making progress - Now when I preview the report I see text field and temp.jpg once for each record as expected.
But when i run the report
frxReport1->ShowReport();
I see my text field (once for each record) but no picture.
What could be different between previewing the report in the designer and showing the report. I knopw the query is running OK becuase I get the text values for each record. its just the picture that seems to be the problem.
Win 7 x64 using embarcadero builder C++ Xe3 with Devart UniDac components connected to a DevExpress grid
I haven't saved the report as yet just closed the designer and run my program.
Slight development though. I created a new project and connected to the same dataset and ran the report and all was ok. I have checked and I have configured the components in exactly the same way.
Confused as to why the pictures show in both previews but in one report but not in the other.
Frustrating - very much appreciate the help though.
error reading frxPDFExport1.Quality Property, Quality does not exist
I am wondering whether I need to reinstall XE3 but exclude the FR components and the reinstall FR4
here is what i would try first use fr's unistaller to remove fr4
delete the fastreports/fastreport 4 folder
use xe3's installer to repair removing the fastreport components.
install your purchased version of fr4.
run frs recompiler if you need to change settings for tchart version
Cheers