Please give me step by step how to connect the Memo object to the database. Thanks
- First you should add a DataSet to the report,
- Then click on memo and Designer opens an editor,
- Click "Insert expression" and choose DataSet and its field.
DataSet may be added in two ways: Designer data folder and Report.DataSet property.
I know only first one: Data folder in Designer and new object TfrxADoQuery or TfrxADOTable.
If you use Query you can write your own select statement. To verify if it is correct click on FieldAliases at Object Inspector.
ADOQueries need ADOConnection to be set properly - but this is an area of programmers (Delphi or other), far from my knowledge :-(
Please give me step by step how to connect the Memo object to the database. Thanks
- First you should add a DataSet to the report,
- Then click on memo and Designer opens an editor,
- Click "Insert expression" and choose DataSet and its field.
DataSet may be added in two ways: Designer data folder and Report.DataSet property.
I know only first one: Data folder in Designer and new object TfrxADoQuery or TfrxADOTable.
If you use Query you can write your own select statement. To verify if it is correct click on FieldAliases at Object Inspector.
ADOQueries need ADOConnection to be set properly - but this is an area of programmers (Delphi or other), far from my knowledge :-(
Regards
Mick
Is MasterData I have to connect to the database? Is TfrxMemoView I have to connect to the database in DataSet and DataField properties?
Is MasterData I have to connect to the database? Is TfrxMemoView I have to connect to the database in DataSet and DataField properties?
Usually you connect MasterData to a DataSet if you need to print that band for each row of the DataSet.
If your MasterData should be print only once for a certain data you get from anywhere then you don't have to connect MasterData to any DataSet. When you work with FR Designer (after double click on MaterData band) you get a dialog named "Select DataSet" and you should select "[not assigned]" and specify "Number of records" as 1. You can see that on a picture below:
[img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />
Regards
Mick[/img]
If you need to assign a certain Dataset field to a Memo then have a look at here - how to do it with FR Designer:
How to extract column names from a table? In your example, you can see the name of the table (Customers) and the names of the columns (Cust No, Company etc ...). Are they manually entered and, if so, where. Is the "Expression" field to enter sql commands? Under which name hides the database examples in the Demos folder? Thank you.
...
How to extract column names from a table? In your example, you can see the name of the table (Customers) and the names of the columns (Cust No, Company etc ...). Are they manually entered and, if so, where. Is the "Expression" field to enter sql commands? Under which name hides the database examples in the Demos folder? Thank you.
When you are in Designer just double click on a Column name you need to pass to the Memo and you'll see it in an area below Column names, then click OK.
Designer will pass DataSet."Columnname" into your Memo box.
...
How to extract column names from a table? In your example, you can see the name of the table (Customers) and the names of the columns (Cust No, Company etc ...). Are they manually entered and, if so, where. Is the "Expression" field to enter sql commands? Under which name hides the database examples in the Demos folder? Thank you.
When you are in Designer just double click on a Column name you need to pass to the Memo and you'll see it in an area below Column names, then click OK.
Designer will pass DataSet."Columnname" into your Memo box.
Regards
Mick
But I cannot see column name to double cklick on. I can see only Data name.
I have not got these icons on the left in Data tab! Why? How to obtain them?
For me, this panel looks like this
It seems that is a Delphi issue - how to compile your project and make more icons available in the toolbar.
I've just installed BDS 2006, and will have a look at it tommorow.
I'll let you know when I find it.
Unless some Delphi Gurus here will solve that for you [img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
Regards
Mick[/img]
did you add the frxADOComponents to your uses clause
Thanks Gordk [img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
Hats off !
I tried to compile a standard demo project (included with Source code of FR 4):
"c:\Program Files (x86)\FastReports\FastReport 4\Demos\EmbedDesigner\Project1.dpr"
and I got the same problem as Duf had - no DataSet icons on the Toolbar.
After adding frxADOComponents uses clause - it works fine. There are necessery icons[/img][img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
Regards
Mick[/img]
If I ask to connect to MySQL in this thread it will be the right question?
Sure [img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
Use TfrxADODatabase component from the same tool palette where you have TfrxADOQuery.
Place TfrxADODatabase into Data Tab and use TfrxADODatabase.DatabaseName property - you'll be able to choose provider or ODBC.
Then use your TfrxADOQuery.Database property and select that DATABASE.[/img]
If I ask to connect to MySQL in this thread it will be the right question?
Sure [img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
Use TfrxADODatabase component from the same tool palette where you have TfrxADOQuery.
Place TfrxADODatabase into Data Tab and use TfrxADODatabase.DatabaseName property - you'll be able to choose provider or ODBC.
Then use your TfrxADOQuery.Database property and select that DATABASE.[/img]
TfrxADODatabase is an internal component of FastReport.
I thought about a Designer tool palette like in a exmaple below dbGo tool palette contains some components similar to those of FastReport.
But I have no idea how to use them in your report to connect to MySQL and to TfrxADOQuery [img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />
Let's hope some help will come here from C++ or Delphi Gurus[/img]
Well that means your MasterData is properly connected to a Database.
Have a look at the film in Post#10 of this topic - Memo and dataset.wmv.
Start with a small test - place a TrfxMemoView on your MasterData and insert a DataSet field into it.
After that operation Memo should look like [<myDataSet."MyField">]
If you run report now you should see three values from your 3 rows.
The next step will be to place your picture on MasterData as a background - or maybe you already have it.
If so verify at design time if that TfrxPicture is Sent to back.
Cut off any important (secret) information from your report and connect it (some Memos) to FR Demo database (Bio, Customers, or so).
Then upload that report here and I'll have a look at it.
I have Delphi RAD XE3 installed with FastReports 4.0
I cant seem to find any frxADOComponents in Tool Pallette. Any idea why this is missing, or where I need to install it from? This is driving me slowly mad!
Comments
- Then click on memo and Designer opens an editor,
- Click "Insert expression" and choose DataSet and its field.
DataSet may be added in two ways: Designer data folder and Report.DataSet property.
I know only first one: Data folder in Designer and new object TfrxADoQuery or TfrxADOTable.
If you use Query you can write your own select statement. To verify if it is correct click on FieldAliases at Object Inspector.
ADOQueries need ADOConnection to be set properly - but this is an area of programmers (Delphi or other), far from my knowledge :-(
Regards
Mick
If your MasterData should be print only once for a certain data you get from anywhere then you don't have to connect MasterData to any DataSet. When you work with FR Designer (after double click on MaterData band) you get a dialog named "Select DataSet" and you should select "[not assigned]" and specify "Number of records" as 1. You can see that on a picture below:
[img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> Regards Mick[/img]
How to extract column names from a table? In your example, you can see the name of the table (Customers) and the names of the columns (Cust No, Company etc ...). Are they manually entered and, if so, where. Is the "Expression" field to enter sql commands? Under which name hides the database examples in the Demos folder? Thank you.
Designer will pass DataSet."Columnname" into your Memo box.
Regards
Mick
For me, this panel looks like this
I've just installed BDS 2006, and will have a look at it tommorow.
I'll let you know when I find it.
Unless some Delphi Gurus here will solve that for you [img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> Regards Mick[/img]
I thought about a Designer tool palette like in a exmaple below
dbGo tool palette contains some components similar to those of FastReport.
But I have no idea how to use them in your report to connect to MySQL and to TfrxADOQuery [img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> Let's hope some help will come here from C++ or Delphi Gurus[/img]
Have a look at the film in Post#10 of this topic - Memo and dataset.wmv.
Start with a small test - place a TrfxMemoView on your MasterData and insert a DataSet field into it.
After that operation Memo should look like [<myDataSet."MyField">]
If you run report now you should see three values from your 3 rows.
The next step will be to place your picture on MasterData as a background - or maybe you already have it.
If so verify at design time if that TfrxPicture is Sent to back.
Then upload that report here and I'll have a look at it.
I cant seem to find any frxADOComponents in Tool Pallette. Any idea why this is missing, or where I need to install it from? This is driving me slowly mad!