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 6166855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:24:45+00:00 2026-05-23T22:24:45+00:00

I was just wondering how to pass SQL to crystal report. Right now I

  • 0

I was just wondering how to pass SQL to crystal report. Right now I am only able to load a premade report onto my crystal report viewer. Now, I want to be able to put in parameters for building my reports. Here’s some code…

    private void btn_InventoryReport_Click_1(object sender, EventArgs e)
    {
        ReportDocument inventoryReport = new ReportDocument();
        inventoryReport.Load("C:\\Users\\Wilson Kao\\documents\\visual studio 2010\\Projects\\Wincent Warehouse Management Studios\\Wincent Warehouse Management Studios\\InventoryReport.rpt");
        inventoryReport.Refresh();
        crv_Report.ReportSource = inventoryReport;
        crv_Report.Refresh();
    }

Right now, I want to be able to add SQL to filter out the report, something like this

da.SelectCommand = new OleDbCommand("SELECT * FROM InventoryView WHERE vid = @vid", cs);
da.SelectCommand.Parameters.Add("@vid", OleDbType.Integer).Value = vid;
//Make Report Based on this SQL

I tried this : http://csharp.net-informations.com/crystal-reports/csharp-crystal-reports-sql-query.htm

but it said i’m missing an assembly or something like that (prob a 64/32 bit incompatibility) but hopefully theres something else I can do. Thanks!

  • 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-05-23T22:24:46+00:00Added an answer on May 23, 2026 at 10:24 pm

    Solved. Looked into the bug and it said that I actually needed to move some of the dlls into something called dotnet1 folder (it wasnt there I had to create it myself). After that I had to modify app.config and it worked. awesome

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

just wondering when I had an iphone I was able to create a web
Just wondering what the best way to access read only information form a Microsoft
Possible Duplicate: Change Notification with Sql Server 2008 Am just wondering is there's anyway
I am just wondering, is there a way to pass the parameters to php
I am just wondering what ways there are to pass two or more double
I'm just wondering if anyone knows why $.map and $.fn.map pass arguments in flipped
I'm just wondering if somebody can explain to me how to pass reference cells
Just wondering, if I want to create a class that does something and I
I'm new to .Net development, and now are following NerdDinner tutorial. Just wondering if
Just wondering if the entity framework is setup to handle things like SQL injection

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.