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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:51:01+00:00 2026-06-13T01:51:01+00:00

I have a form that allows a user to select what report they want

  • 0

I have a form that allows a user to select what report they want to generate. They can also select criteria, select Print, Preview, export, etc. After the user makes their selections and clicks the “Generate” button, I have a class that creates the report object, loads the report, dataset, and then prints or exports the report. I created a separate form to preview the report. When I pass the report object to the preview form, I receive “Invalid Report Source.” The report prints and exports just fine, I just cannot preview the report. I do not want to duplicate the code in the preview form, I was hoping that I could just pass the report object. Snippets of my code are below. Any suggestions?

public static class CrystalReportUtilities
{
    private static ReportDocument goReport {get; set;}
    private static string gsReportName { get; set; }
    private static string gsSqlString { get; set; }
    private static object[,] goParameters { get; set; }

    public static void generateReport(parameters...)
    {
      goReport = loadReport();
...
      goReport.SetDataSource(DataTable);
...
      previewReport();


    private static void previewReport()
    {
        CrystalReportPrintPreviewForm loReportPreview = new CrystalReportPrintPreviewForm(goReport);
        loReportPreview.ShowDialog();
    }


public partial class CrystalReportPrintPreviewForm : Form
{
    private ReportDocument goReport;

    public CrystalReportPrintPreviewForm(ReportDocument poReport)
    {
        InitializeComponent();

        goReport = poReport;
    }

    private void crystalReportViewer1_Load(object sender, EventArgs e)
    {
        try
        {
            if (goReport != null)
            {
                crystalReportViewer1.ReportSource = goReport;  // Receive "Invalid Report Source"
            }
        }
  • 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-13T01:51:02+00:00Added an answer on June 13, 2026 at 1:51 am

    Problem resolved. I am running on a Windows 7, 64 bit OS. I originally installed Crystal Reports for 64 bit Visual Studio 2010. It appears that you need both, the 64 bit and 32 bit version of the runtimes, with SP4.

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

Sidebar

Related Questions

I have a form on all my pages that allows the user to select
I have a django form that allows a user to select multiple options: CARDS
I have a form that allows a user to select a county from a
I have a form that allows a user to import a spreadsheet. This spreadsheet
I have a form that allows me to enter a user into my database.
I have a TextBox in a Windows Form that allows a user to enter
I have a bound form in microsoft access that allows a user to add
I have a longish form that scrolls vertically and also allows editing records. When
I have a typical ADO.NET EF-driven form that allows the user to input a
I have a form that allows the user to enter a weight, in either

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.