Dear frens,

I have made an application in VB.net using Visual studio 8, with ms access as a backend.

I have crystal report installed in it. I have got a problem while connecting database to the crystal report. I have also got problem in designing part. Is there any solution for it.

And the other part is that I also tried to make a report viewer througn database report viewer. But it showed certain problem .It showed report of only one row at one time and the report cannot be exported to word file.

Is there any solution for it.

I m in immense trouble.

Please help me

Waiting .....

Kshiteesh

Dani AI

Generated

Brief, practical checklist that solves the two problems described by and complements what started and offered to review.

Start by isolating designer vs runtime:

  • Open the .rpt in the Crystal designer and preview it. If the designer shows multiple rows but your app shows one, the problem is in the code that supplies data. If the designer shows only one row, check the report’s record selection formula and grouping (these limit rows).
  • Use a typed DataSet or a DataTable as the report’s data source whenever possible. Designing the report against a dataset avoids path/driver problems at runtime and makes binding predictable.

Code-level checklist (what to check or paste when asking for help):

  • The code that fills the DataSet/DataTable (show the Fill call and SQL/parameters).
  • The code that loads/sets the report (Load, SetDataSource, and assigning ReportSource).
  • Any parameter assignment and the full exception text when export fails.

Common causes and fixes:

  • Supplying a single DataRow or calling SetDataSource inside a loop will produce one-row output — build the full table, then call SetDataSource once.
  • Export failures are often runtime/deployment problems: missing/mismatched Crystal runtime components, wrong export format used, or file-permission/path problems. Confirm the same CR runtime version used at design time is installed on the target machine and that the app runs in 32-bit if the CR runtime is 32-bit.

Example binding/export pattern (VB.NET, replace placeholders):

Dim ds As New DataSet()
' fill ds.Tables("MyTable") here

Dim rpt As New CrystalDecisions.CrystalReports.Engine.ReportDocument()
rpt.Load("Path\To\MyReport.rpt")
rpt.SetDataSource(ds.Tables("MyTable"))
CrystalReportViewer1.ReportSource = rpt

rpt.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.WordForWindows, "C:\temp\report.doc")
rpt.Close()
rpt.Dispose()

Notes and cautions:

  • Avoid keeping the Access DB under Program Files; use a writable location or convert to SQL Server Express for stability.
  • When posting code, include the SQL, the Fill call, the SetDataSource lines, and any exception stack traces so responders like can reproduce and diagnose quickly.

ksiteesh,
attach the code here- i will rectify & tell whats the problem,,,

Dear frens,

I have made an application in VB.net using Visual studio 8, with ms access as a backend.

I have crystal report installed in it. I have got a problem while connecting database to the crystal report. I have also got problem in designing part. Is there any solution for it.

And the other part is that I also tried to make a report viewer througn database report viewer. But it showed certain problem .It showed report of only one row at one time and the report cannot be exported to word file.

Is there any solution for it.

I m in immense trouble.

Please help me

Waiting .....

Kshiteesh

Hello
The only work around that I have found to work was to change your connection string (I use Access as a database):
Instead of -
Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Application.StartupPath & "\Database.mdb"
I had to use -
Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
"C:\Database Folder\Database.mdb"
You will manually place the database in a folder labeled Database Folder (or whatever) on the C Drive.
This allows both your application and Crystal Report to have access to the database. You will then have to go back to Crystal Reports/Database/Set Datasource Location then choose "C:\Database Folder\Database.mdb". This will allow your CR to access your database and changes in the database will be viewed immediately in the CR while the application is running.
Hope this helps
Scott

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.