Topic: Logo
hello friends..
how to load logo from database on report..
see image
My Visual Database → General → Logo
hello friends..
how to load logo from database on report..
see image
can anyone help??
can anyone help??
not works.. i want to load Picture from Database...
need script....
software shows this message
procedure report (sender: string);
var
frxDBDataset1: TfrxDBDataset;
image: TDataSet;
begin
SQLQuery('SELECT column AS "image" FROM dbName WHERE id='+form1.tablegrid1.sqlValue , image);
frxDBDataset1 := TfrxDBDataset.Create(frmLogin);
frxDBDataset1.UserName := 'dbimage';
frxDBDataset1.CloseDataSource := True;
frxDBDataset1.OpenDataSource := True;
frxDBDataset1.DataSet := image;
frmLogin.frxReport.Clear;
frmLogin.frxReport.DataSets.Clear;
frmLogin.frxReport.DataSets.Add(frxDBDataset1);
frxDBDataset1.DataSet.Close;
frmLogin.frxReport.LoadFromFile(ExtractFilePath(Application.ExeName)+'report\image.fr3');
frmLogin.frxReport.ShowReport;
frxDBDataset1.Free;
end;
You can also do it without writing script. Check whether this helps
thanks .. thats good but i am using logo on fuel receipt... i have only one logo to print on all reports.. so any way to load directly from database to Receipt.. i am also loading Name, address , contact and Footer text.. but on image .. software throws an error.. that i posted in previous post...
Hi Raheel, Zimguy, Sibprogsistem,
I don't use the ReportDesigner much but whenever I've wanted to use any pictures (as in your example, for a logo), then I simply add the picture(logo) directly into the Reports folder within my project. Then, in the ReportDesigner, I drag a 'picture object' into whatever section of the report I want and then specify the picture I want to load.
Because, in this instance, it's simply a picture(logo) and unrelated to any data, it's actually nothing to do with MVD and all done within the Reporter.
Regards,
Derek.
thanks DEREK...
i am using this type of receipt.. but to change logo .. we have to open report designer..
so i want to change logo by adding logo in database....
i think Dmitry can help but i think he is not available these day...
Hello Dmitry.. looking for you ...
i have a problem... can you help???
Form1.DBImage1.LoadFromDatabase('Receipt', 'Logo', 1);
Sorry Dmitry...
please explain.. how to write...
i am writing script in report designer...
Here ReceiptForm is not a main form.. its a subForm..
Please attach your project.
Hello Dmitry.....
I attached my Project..
i am loading Header text and footer text from database by scripting in Report designer...
but i can't load logo... you can see in project..
Hello Raheel,
I understand what you're trying to do - load the dbimage into the 'picture' object in Fastreport by script. But like you, I can't work out what the correct syntax should be.
As a work-around, and because you only ever have 1 row in your 'receipts' table, I would simply create a relationship between your 'database' table and your 'receipt' table, pre-set form1.combobox2 to '1' (using index1) and hide it; that way, the logo (and the header and footer messages) can be added as data fields to the dataset that you define for the report in the standard way.
I don't know if that's an acceptable solution for you?
Derek.
thanks Derek....
its good... I tried this solution but did not made relataionship.. so i got an error.. thanks for your help
hello derek...
I tried same procedure but did't found picture in report... picture was blank... I created combobox in set index 1.. made receipt relation ship with datatable. but loading not complete....
Hi Raheel,
Are you trying it on data that you'd added before you created the relationship? If so, there wouldn't be any id's in place to link the data.
Can you attach what you've done and maybe I or someone else might spot something?
Derek.
oh.. yes.. i was checking on old stored data..
now i made new delivery.. now its working ....
thanks
No problem.
I often find my problem is with the data rather than the program itself so I use SQLiteStudio (it's free) to look at how the data is being stored.
But if you don't have SQLiteStudio, it's very easy to create a temporary form and display the entire contents of all your tables on it (including any relationships that might be missing).
Have a look at the attached - I use a temporary form called 'raw data' and place a button (raw data) on the first form. Click it and it shows you right away where there might be a problem (in this example, some links between the 'database' table and the 'receipt' table are missing). Once you have corrected that and are happy that the data is being stored as you want, you can simply delete the form and button.
Derek.
thanks Derek...
You was right...
i was trying on old data entries...
i made new entry now its work...
i need your contact number.. if you dont mind
My Visual Database → General → Logo
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi