Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8644801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:23:22+00:00 2026-06-12T12:23:22+00:00

I am trying to use crystal reports again with Linq but I am having

  • 0

I am trying to use crystal reports again with Linq but I am having problems. I have read a diverse amount of forums and articles on how this should be done but I am not sure what I could be doing wrong.

1st Method Tried

Dim DBDataContext = GetDataConnection()

Dim cryRpt As IBS_DAL.cryLocationTransfer = New IBS_DAL.cryLocationTransfer()
cryRpt.Load(cryRpt.FileName)

Dim testDS = From stl In DBDataContext.STranLines
             Where stl.STLStkRef >= "000000000330" AndAlso
                   stl.STLStkRef <= "000000000337" AndAlso
                   (stl.STLTranCode = "LI" Or stl.STLTranCode = "LO")
             Select stl.ToRepObj

cryRpt.SetDataSource(testDS.ToList)

CrystalReportViewer1.ReportSource = cryRpt

ToRepObj is currently setting to a class which I made so that it will use a object which doesn’t have null value.

But when the report loads it is asking for a password which makes absolutely no sense as I am feeding it the data.The server name is the .net object which I had previously set in the report.

I really need to find a solution as I was previously using Microsoft Reporting but found some areas that are lacking and thus decided that it would be best to use Crystal but have never used it with Linq.

2nd Method Tried

I have also tried another way which I have seen on this website but for some reason it is giving me a blank report.The .Net Object are linked on stkcode in crystal report.

Dim testDS = (From stl In DBDataContext.STranLines
                 Where stl.STLStkRef >= "000000000330" AndAlso 
                       stl.STLStkRef <= "000000000337" AndAlso
                       (stl.STLTranCode = "LI" Or stl.STLTranCode = "LO")
                 Select stl)
Dim ds1 = (From stl As STranLine In testDS
           Select stl.ToRepObj).ToList
Dim ds2 = (From stl As STranLine In testDS
           Select stl.Stock.ToRepObj).ToList

Dim cryrpt2 As ReportDocument = New IBS_DAL.CrystalReport1()

cryrpt2.Database().Tables("IBS_DAL_roSTranLine").SetDataSource(ds1)
cryrpt2.Database().Tables("IBS_DAL_roStock").SetDataSource(ds2)

CrystalReportViewer1.ReportSource = cryrpt2
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T12:23:24+00:00Added an answer on June 12, 2026 at 12:23 pm

    try this maybe helpful

     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim data As New DataClasses1DataContext
        Dim m = (From master In data.Masters Select master Where master.ID = 10)
        Dim a As New CrystalReport3
        a.SetDataSource(m)
        CrystalReportViewer1.ReportSource = a
     End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a site running Crystal Reports Viewer in IIS 7 but for security
I am trying to use the crystal reports application in ubuntu. So far i
I am trying to find out how to use crystal reports with sql server.
I am trying to use a specific font with Crystal Reports XI. Specifically, I
Im trying use a Java annotation in a Groovy class but have trouble to
I am trying to use crystal reports with sqlite. The Development enviornment is windows
I have been having a rather troubling issue with utilizing Crystal Reports pulling data
I am trying to use Crystal Reports ActiveX Viewer 13 from within Winforms. While
I am trying use gem tire to search in my application. I have tables
Hi I'm trying use a datepicker on a field I have. I'm trying to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.