Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Supressing Subreport

Status
Not open for further replies.

tumtoo10

Programmer
Dec 10, 2001
40
US
In crystal report how can I supress the message
"Unable to access First Record" , if a subreport doesn't fetches any record.The subreport is linked with the primary report on a Primary key field.
The rest of the report is okay , but it doesn't opens up if the query on which the subreport is based fetches no records.
 
I believe that message is telling you that there is a problem with your data table. For some reason a report is having trouble reading the data. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
also check your subreort linking, make sure you are not linking
 
Dear kenhamady ,
I am using crystal report ver 8. The subreport is based on a query which fetches data from only one table. Also the linking is there on the PK field. But if the base table on which the Subreport is based doesn't have any records, it gives me this message.
Can u be more elaborate on the solution.
 
What is the database you are using?
Do you mean an MS Access query?
Does the query return 0 records from a table that has records, or is it trying to read a table that doesn't exist? Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
No, my database is MS sql server 7. When making the report i just write the query after selecting the sql option.
And then it says "Unable to access first record", in case the table has 0 records.
 
I have no idea how you are writing your "query" and what you mean by the "SQL option". Can you tell me exactly how you are getting there? That message doesn't mean 'no records returned' it means 'no records found to read'. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
When we say new report Crystal Report asks for type
i..e, Data File, SQL/ODBC or Active Data and number of othere option.
on clicking (SQL/ODBC or Active Data) and Logging on to the Server by providing DSN . Then it asks to select table or SQL statement in "Select Recordset" form .
In both the cases if there are no Records in Table it gives that Msgbox "Unable To Access First record" instead of
Displaying a Blank Report
 
Uhm, select recordset? You must not be in the Crystal Reports program, are you in VB using the Crystal RDC? In Visual Studio.NET? See faq149-237. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top