Data Connectivity
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Data Connectivity
Message Icon Topic: Version Conflict 9, 10 Post Reply Post New Topic
Author Message
shaddy
Newbie
Newbie
Avatar

Joined: 20 Jul 2010
Online Status: Offline
Posts: 7
Quote shaddy Replybullet Topic: Version Conflict 9, 10
    Posted: 21 Dec 2010 at 9:56am
Hello all,

I'm trying to get a report I wrote to work on an asp.net application I have written but have had a couple issues. First, I noticed when printing with an older version of Crystal referenced, specifically 9.2.9500.18 of the Crystal Reports Engine, blank information is outputted (it is a ttx reference for file structure, with passed in dataset), but if I create a new project, and use a newer version of the runtime (tried 10.2.3600.0) with the same information, the report prints out fine. TTX file is pretty simple and straight forward..


ItemNumber    String    12   
Item_Sku    String    14   
Vend_ItemNumber    String    20   
Desc1    String    20   
Desc2    String    20   
ShortSku    Number       
CompId    Number       

Dataset utilizes all these, and I debugged to ensure data is being set for both reports in both programs. I figured the report was just created in a newer version (2008), so i created a new report from 9, and tried to pass just the ItemNumber and Item_Sku, but still get a blank when I try to run it on the 9 runtime... is there something I'm just totally looking over?

By the way, I already have a report running in this program, utilizing the 9 framework, created in crystal 9, and it runs fine, but does not use a ttx file, and there is no dataset passed, just parameters passed.

C# test code:




            ReportDocument rd = new ReportDocument();

            DataSet oDS = new DataSet(); // holds data table
            DataTable oDT = new DataTable();
            DataRow dr1 = oDT.NewRow();
            DataRow dr2 = oDT.NewRow();
            DataRow dr3 = oDT.NewRow();


            oDT.TableName = "RManagerLabel";
            oDT.Columns.Add("ItemNumber", Type.GetType("System.String"));
            oDT.Columns.Add("Item_Sku", Type.GetType("System.String"));
            oDT.Columns.Add("Vend_ItemNumber", Type.GetType("System.String"));
            oDT.Columns.Add("Desc1", Type.GetType("System.String"));
            oDT.Columns.Add("Desc2", Type.GetType("System.String"));
            oDT.Columns.Add("ShortSku", Type.GetType("System.Int32"));
            oDT.Columns.Add("CompId", Type.GetType("System.Int32"));

            dr1["ItemNumber"] = "a234982";
            dr1["Item_Sku"] = "ALK LRG";
            dr1["Vend_ItemNumber"] = " ";
            dr1["Desc1"] = " ";
            dr1["Desc2"] = " ";
            dr1["ShortSku"] = 0;
            dr1["CompId"] = 1;

            dr2["ItemNumber"] = "b234982";
            dr2["Item_Sku"] = "BLK LRG";
            dr2["Vend_ItemNumber"] = " ";
            dr2["Desc1"] = " ";
            dr2["Desc2"] = " ";
            dr2["ShortSku"] = 0;
            dr2["CompId"] = 1;

            dr3["ItemNumber"] = "c234982";
            dr3["Item_Sku"] = "CLK LRG";
            dr3["Vend_ItemNumber"] = " ";
            dr3["Desc1"] = " ";
            dr3["Desc2"] = " ";
            dr3["ShortSku"] = 0;
            dr3["CompId"] = 1;

            oDT.Rows.Add(dr1);
            oDT.Rows.Add(dr2);
            oDT.Rows.Add(dr3);

            oDS.Tables.Add(oDT);

            rd.Load(Server.MapPath("/Reports/RManagerLabel.rpt"));
            rd.SetDataSource(oDS);

            try
            {
                rd.PrintToPrinter(1, false, 0, 0); // printer set in report already
                //Print Successful
            }
            catch(Exception ex)
            {
               //Print error
            }

IP IP Logged
shaddy
Newbie
Newbie
Avatar

Joined: 20 Jul 2010
Online Status: Offline
Posts: 7
Quote shaddy Replybullet Posted: 22 Dec 2010 at 5:01am
.... Anyone? Disapprove
IP IP Logged
shaddy
Newbie
Newbie
Avatar

Joined: 20 Jul 2010
Online Status: Offline
Posts: 7
Quote shaddy Replybullet Posted: 30 Dec 2010 at 8:41am
Went ahead and upgraded frameworks to use 10 globally, since 9 didn't seem to like datasets passed. Working fine now.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.