hey pple..
i am creating a report wizard for my project. i cant seem to find a way to add controls (rpttextboxes and rptlabels) at runtime based on user requirements.
i know how to use the load() function on forms but it requires a control array which is not available on the datareport.
please help i am stuck.
adding controls to data reportdatareport
Page 1 of 1
4 Replies - 11770 Views - Last Post: 05 December 2005 - 08:24 AM
Replies To: adding controls to data report
#2
Re: adding controls to data report
Posted 02 December 2005 - 07:47 AM
umm i think you want records on your datareport...
if that's so..
you need to have a VB data environment in your project.
well if you can wait for a day.. ill give a lil example on how to use both effectively/
if that's so..
you need to have a VB data environment in your project.
well if you can wait for a day.. ill give a lil example on how to use both effectively/
#3
Re: adding controls to data report
Posted 02 December 2005 - 11:41 PM
Well, use the Data Environment to create a Data Report.
Remember not to use the Standard Controls in the Data Report.
Click the 'DataReport' Tab in the Toolbox to open the tab filled with controls that can be added in the Data Report.
Text-boxes can be used in the Detail Band only unlike some others like the Function Control.
Remember not to use the Standard Controls in the Data Report.
Click the 'DataReport' Tab in the Toolbox to open the tab filled with controls that can be added in the Data Report.
Text-boxes can be used in the Detail Band only unlike some others like the Function Control.
#4
Re: adding controls to data report
Posted 03 December 2005 - 09:08 AM
here's how you do it,
first add a datareport and a data enviornment by right clicking in the project menu then selecting Add> datareport/ dataenvironment.
then... go to this site, a good description for what your gonna use.
VB Data Environment
the advantage of using data envrionment is that it is done in design time, and doesnt need CODE to work, very handy.
first add a datareport and a data enviornment by right clicking in the project menu then selecting Add> datareport/ dataenvironment.
then... go to this site, a good description for what your gonna use.
VB Data Environment
the advantage of using data envrionment is that it is done in design time, and doesnt need CODE to work, very handy.
#5
Re: adding controls to data report
Posted 05 December 2005 - 08:24 AM
How to bind data environment to data report.
first of all add a data environment and a datareport to the project then.
open the data environ ment, you should see a object in a tree view list called "Connection1"
right click on it, select properties, then this tab appears

i have selected Microsoft OLE DB provider for ORacle, which allows me to use the driver for oracle databases.
click "Next" button to go to the next tab.
this is the next ab that appears.

i have entered the default username & password "Scott" "Tiger" in ORacle DB.
now test the connection if you feel it is necessary by clicking the 'Test Connection' button.
now right click "Connection1" again, this time select "Add Command" from the pop up menu.

now right click on the object that appears below "Connection1" named as "Command1" and select properties.
this tab appears then

now i ve selected the option button "SQL Statement" and entered the SQL query "Select * from emp" which allows me to view all records of the table "emp" in "Scott" user.
now you'll see a "+" sign beside "COmmand1", open it, then also open the data report in the background, both the windows should be seen
like this

now put the mouse pointer on the command1, press and drag the contents onto the datareport, in the "Detail section",
now these steps are important and crucial.
ull now see several labels and textboxes (labels are dashed and textbox outlines are solid) in the datareport,
now place the Dashed labels onto the "Page header section and put the appropriate textboxes underneath those labels, BUT in the "DETAILS section"
now in the property section(right most) of the datareport, set the datasource as "dataenvironment1" and datamember as "COmmand1"
you might be successful, but be sure on how to adjust the report size, it shouldnt be bigger than the page size, then you might encounter errors
hope this helps!
first of all add a data environment and a datareport to the project then.
open the data environ ment, you should see a object in a tree view list called "Connection1"
right click on it, select properties, then this tab appears

i have selected Microsoft OLE DB provider for ORacle, which allows me to use the driver for oracle databases.
click "Next" button to go to the next tab.
this is the next ab that appears.

i have entered the default username & password "Scott" "Tiger" in ORacle DB.
now test the connection if you feel it is necessary by clicking the 'Test Connection' button.
now right click "Connection1" again, this time select "Add Command" from the pop up menu.

now right click on the object that appears below "Connection1" named as "Command1" and select properties.
this tab appears then

now i ve selected the option button "SQL Statement" and entered the SQL query "Select * from emp" which allows me to view all records of the table "emp" in "Scott" user.
now you'll see a "+" sign beside "COmmand1", open it, then also open the data report in the background, both the windows should be seen
like this

now put the mouse pointer on the command1, press and drag the contents onto the datareport, in the "Detail section",
now these steps are important and crucial.
ull now see several labels and textboxes (labels are dashed and textbox outlines are solid) in the datareport,
now place the Dashed labels onto the "Page header section and put the appropriate textboxes underneath those labels, BUT in the "DETAILS section"
now in the property section(right most) of the datareport, set the datasource as "dataenvironment1" and datamember as "COmmand1"
you might be successful, but be sure on how to adjust the report size, it shouldnt be bigger than the page size, then you might encounter errors
hope this helps!
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|