Storing No Of Records in a variable
dear friends,
i have to calculate number of records thats displayed
so i'm using COUNT(MAsterdata1) since only one master band is vailable.
In the program
dim i as variant
i=count(MasterData1)
showmessgae(VarToSTr(i))
But this is giving me only blank msg box without nay value.
How to store number of records in a varibale???
i have to calculate number of records thats displayed
so i'm using COUNT(MAsterdata1) since only one master band is vailable.
In the program
dim i as variant
i=count(MasterData1)
showmessgae(VarToSTr(i))
But this is giving me only blank msg box without nay value.
How to store number of records in a varibale???
Comments
from FR Forum..
Somebody lpz answer NEwbies question....
PS:
Den i hav seen u answering some comlpex queries,
these questions may not be of ur level.still for me it is important
Regards
seshadri.r
i'm using FR3.17.
I'm writing the code in Basic Scripts inside fast Report.
I just want to get the count of records in a masterdata band
and store it in a variable.
The COUNT(MasterData1) gives the coutn but i'm not able to store them
in a variable and use it.
1. one more query was to move the cursor to next record.
2. Wat is the syntax for End Of File if any in BAsic Scripts??
i have gone through Manual but i think these points are not available
code page?
in what event are you writing this code?
i'm using studio version and basic script as language.
i'm writing in OnBeforeMasterData1Print
im a delphi pascal person and i am not sure of all available in studio edition.
generally
be careful where you try to retrieve aggregate values they aren't available until after something has been processed
ie a memo in a footer might contain
[COUNT(MAsterdata1)]
declare your variable as integer, you may also want to declare it at the start of the code page so it is available globally rather than in an event .where it exists only for the life of the event.
and use the correct function to display it in showmessage.
normally a master band is connected to data through the dataset property of the band( choice of available datasets) which are usually frdbdatasets,or using specific internal dbengine controls.
this controls the number of times the band appears,
memos within the band are connected to a datafield of the dataset and display the value of the current record. You only setrowcount property when you do not have the band connected to a dataset.
So unless you are doing some fancy manipulation you should not need to try to move to the next record.
hope this helps
got it.actually i have changed the delimiter and trying
with diferent delimiter.Thts the problem..
Thanx for your gyan on FR3..
NExt time will post in appropriate forum.