cancel
Showing results for 
Search instead for 
Did you mean: 

Name Tags CR9 vs CRXI R2

Former Member
0 Kudos

Have a report for name tags that will show a picture if one is present for each record. If no picture, just the name is printed. There are three sections, First Name + place holder for the picture, Maiden name and Last Name + a hidden field for class photo. A photo is only inserted for the Last name on the record. No photo for the spouse.

The code used in both versions of Crystal Reports is:


Private Sub crSection_Format(ByVal pFormattingInfo As Object)
    On Error GoTo ErrHandle
     Set crSection.ReportObjects("Classmate").FormattedPicture = _
        LoadPicture(crNameTagsAdhesive.Sections("DetailSection3").ReportObjects("PicFile").Value)
     
crSection_Format_Exit:
    Exit Sub

ErrHandle:
   
End Sub

This is what calls the report:



           cmd.CommandText = "SELECT FirstName, LastName, MaidenName, ClassYear, ClassPhoto," & _
                      " ClassYear AS OrderYear," & _
                       " LastName AS Sortname, 1 AS SortOrder" & _
                       " FROM Members INNER JOIN Attending ON Members.ID = Attending.ID" & _
                       " Where Attending.numAttend > 0" & _
                       " UNION ALL SELECT Spouse,  LastName, Null, Null, Null," & _
                       " ClassYear, Lastname, 2 As SortOrder" & _
                       " FROM Members INNER JOIN Attending ON Members.ID = Attending.ID" & _
                       " WHERE Attending.numAttend > 1" & _
                       " ORDER BY OrderYear, Sortname, SortOrder"
    End If
                      
    rs.CursorLocation = adUseClient
    rs.CursorType = adOpenDynamic
    Set rs = cmd.Execute
    crNameTagsAdhesive.DiscardSavedData
    crNameTagsAdhesive.Database.SetDataSource rs
    crNameTagsAdhesive.ReadRecords
    With CRViewer1
        .Refresh
        .ReportSource = Report
        .ViewReport
        .Zoom (60)
        .EnableExportButton = False
        .DisplayTabs = False
        .EnableGroupTree = False
        .EnableCloseButton = False
    End With

CRXI R2 doesn't play nice since there is a picture (placeholder picture) for each person including spouses.

Any ideas are appreciated.

Thanks.

Kim

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

This is now beyond the abilities of forums.

I suggest you purchase a case and have a dedicated support engineer work with you directly:

http://www.sdn.sap.com/irj/boc/gettingstarted

Or

http://store.businessobjects.com/store/bobjects/Content/pbPage.CSC_map_countyselector/pgm.67024400?r...

0 Kudos

Was this ever resolved?  I am getting a similar problem, and I can't find anything that explains what a QE error is.

former_member183750
Active Contributor
0 Kudos

Not that I am aware of. You may want to start a new Discussion that summarizes and explains the issue as you see it (this one has info spanning 2 pages and a number of posts). Include version of CR used (include service packs applied). Please do note that CR XI R2 has been out of support for over two years, so no fixes and thus your only option may be CR 2013 designer and SAP Crystal Reports, Developer Version for Visual Studio .NET

- Ludek

0 Kudos

I am actually investigating upgrading to the latest version but am having problems with that. (see here: http://scn.sap.com/message/15462853#15462853)

I was simply wondering if there was information on what the QE property error was or typically why it comes up.  I found somewhere that someone believed this was caused be a memory issue, but nothing official.

I am a programmer and have really only heard of this QE property error with Crystal Reports, although there are a very few reports of this on the web, and some of them appear to refer to other applications.  It is frustrating to not even know what the QE property is and therefore have no idea what direction to go to address the issue.

The unfortunate thing is that only some client machines get this message which makes it very difficult to find the cause.

Anything you can provide about this would be appreciated.  FYI this is with Crystal XI R2 SP6 FP4.

Thank you

Seradex

former_member183750
Active Contributor
0 Kudos

QE errors would indicate a database connection issue when using the RAS SDK. E.g.; using this code:

        /* ODBC
        // create logon attributes
        m_boAttributes = new PropertyBag();
        m_boAttributes["Database DLL"] = "crdb_odbc.dll";
        m_boAttributes["QE_DatabaseType"] = "ODBC (RDO)";
        m_boAttributes["QE_ServerDescription"] = "ODBC - Xtreme Sample Database 11.5";
        m_boAttributes["QE_SQLDB"] = true;
        m_boAttributes["Server Name"] = "Xtreme Sample Database 11.5";

if one of the parameters is incorrect, a QE error is one of the possible outcomes. For now, without a bit more info (db, connection type, etc., etc) that is about all I can say...

- Ludek

0 Kudos

Thank you very much for that.  it is the most helpful info I have even seen regarding the QE property error message.  It is weird though as our clients are not supposed to use RDO, only ADO.  I now have a direction to go.

Thank you again and have a good day,

Seradex

Answers (1)

Answers (1)

former_member183750
Active Contributor
0 Kudos

Only suggestion I have is the latest Service Pack:

https://smpdl.sap-ag.de/~sapidp/012002523100015859952009E/crxir2win_sp6.exe

If that does not resolve the issue, this may be a bug and unfortunately, CR XI R2 is out of patch support now...

Ludek

Former Member
0 Kudos

Ludek,

Thanks for the response. SP6 is installed. Is there any other solution for VB6 and CR that might work? That is, until I get up to speed with .net?

Thanks.

Kim

former_member183750
Active Contributor
0 Kudos

From what I can see in the code, you're creating a recordset and passing that to the report. Is the report created off of a TTX file? If so, can you verify the report against that TTX? If not, can you recreate the TTX and verify the report against that? What about rather than creating a recordset, you create a temp table with that data and pass that to the report? In this way, we could test this in the designer which is always a better way to go.

Ludek

Former Member
0 Kudos

Thanks for the response, Ludek.

Don't know about TTX. Report is created directly from the recordset and database tables. How to create a ttx file?

Created a temp table with only the Firstname, Lastname, Maiden, Spouse, ClassYear, ClassPhoto and NumAttend. wrote this sql:


SELECT FirstName, LastName, MaidenName, ClassYear, ClassPhoto, ClassYear as SortYear, 
Lastname AS SortName, 1 AS SortOrder
FROM Members
WHERE NumAttend>0 
UNION ALL SELECT Spouse, LastName, Null, Null, Null, Classyear, Lastname, 2
FROM Members
WHERE NumAttend>1
ORDER BY SortYear, SortName, SortOrder

Same results - placeholder pic in all photos. Did this in CR XI R2 Sp6. It seems that the results would be the same whether it is done in Crystal 11.5 or through VB6?

Temp table and report are available.

Thank you.

former_member183750
Active Contributor
0 Kudos

Hello Kim:

Thank you for trying the temp table. Right now, I'd rather keep away from TTX files. These are legacy "beasts" - in every sense of the word and we don't want to get anywhere close to those if we don't have to.

Since the issue can be duplicated in the designer, I wonder if I can ask you to please post the query to the [CR design|; forum and see if they can help us out there.

Ludek

Former Member
0 Kudos

Ludek,

Went to the other forum and no answers as of yet.

I did, however, change the on error go to procedure to include all errors. Discovered that this part is what is causing error # 9, Subscript out of range.


Private Sub crSection_Format(ByVal pFormattingInfo As Object)
    On Error GoTo ErrHandle
    Set crSection.ReportObjects("Classmate").FormattedPicture = _
        LoadPicture(Report.Sections("DetailSection3").ReportObjects("PicFile").Value)
crSection_Format_Exit:
    Exit Sub

ErrHandle:
    If Err.Number = 53 Then
        MsgBox Err.Description 
  
    Else
        MsgBox Err.Number & " - " & Err.Description
    End If
End Sub

Hopefully, that gives you more info.

Thanks.

Kim

former_member183750
Active Contributor
0 Kudos

Sorry Kim. It does not tell me much. I discussed the issue with couple of guys here and they all agree that we need to get this to work in the designer 1st. What's the url to your post in the CR design forum?

Ludek

Former Member
0 Kudos

Thanks for your help. The URL is:

Thank you.

Kim

former_member183750
Active Contributor
0 Kudos

Kim, I've created an ftp container and I'd like you to pl;ease upload the report to it(saved data or not - does not matter). You'll be getting an email from the ftp server re. instructions within the next 1/2 hour.

Ludek

Former Member
0 Kudos

Ludek,

So that you know the file is an internal report with the extension of .dsr. Or should I recreate it using the .rpt extension?

Thanks for your help.

Kim

former_member183750
Active Contributor
0 Kudos

Just export the dsr to an rpt file format and upload that.

Ludek

Former Member
0 Kudos

Can't seem to find in VB6 where to export a CR file. Sent to you re-created dsr.

Thanks for your help.

Kim

former_member183750
Active Contributor
0 Kudos

Kim, I was finally able to look at the report. Unfortunately, I'm not sure what I should be seeing. As is, I see a report (label report on custom size paper) with 5 names, each name displaying the same picture.

Can you tell me what we want to see on this report?

Ludek

Former Member
0 Kudos

Ludek,

Many thanks for your time. The program can add pictures associated with a record. That picture is then picked up by Crystal report. If there is no picture for the record, then the name tag prints only the name. The attached jpg is an example. Bartelt, Peterson and Ritger are classmates. MA Peterson is a spouse therefore no pic. Bartelt, as a classmate, has no pic.

[http://classreunionprogram.com/downloads/nametags.jpg]

The same pic you see is the place holder and should not be in any of the name tags unless that pic is in a saved record.

Let me know if you have any questions.

Thank you.

Kim

Former Member
0 Kudos

Ludek,

This is in VB6 using CR XI R2.

When the declaration 'Private Report as New CrystalReport1' is used, then the error 'Subscript out of range' is issued by the Sub crSection_format:


Private WithEvents crSection As CRAXDRT.Section                 'Insert name tag
Private Report As New crCrystalReport1        'this causes a 'subscript error' or so it seems
Private cn As New ADODB.Connection
Private rs As New ADODB.Recordset
Private cmd As New Command

Private Sub crSection_Format(ByVal pFormattingInfo As Object)
    On Error GoTo ErrHandle
    Set crSection.ReportObjects("Classmate").FormattedPicture = _
        LoadPicture(Report.Sections("DetailSection1").ReportObjects("PicFile").Value)
crSection_Format_Exit:
    Exit Sub

ErrHandle:
    If Err.Number = 53 Then
        MsgBox Err.Description & vbCrLf & _
        "Photos must be in C:\ProgramData\My Class Reunion\Photos directory.", vbCritical, "No Photos"
        Resume Next
    Else
        MsgBox Err.Number & " - " & Err.Description
    End If
End Sub

In the load form sub changing Report to CrystalReport1 eliminates the 'subscript' error


    Report.DiscardSavedData       'change all Report to CrystalReport1 'eliminates subscript' error
    Report.Database.SetDataSource rs, 3
    Report.ReadRecords
    CRViewer1.ReportSource = Report

However, then the place holder pic shows up for all records in the report.

Former Member
0 Kudos

Disregard the last post. After more thought, it did not make sense that changing the variable would change the output. So, I rechecked what I did and the outcome is the same error 'Subscript out of range' is still the error.

Sorry for the oversight.

Kim

Former Member
0 Kudos

Changing the CRViewer to CRAXDDRT used by CR XI creates this error: [http://classreunionprogram.com/downloads/qe_property.jpg] Titled 'Crystal Report Viewer and then 'Cannot find the QE property'.

Ludek, does this offer any ideas?

Thank you.

Kim Peterson

former_member183750
Active Contributor
0 Kudos

Not really. That is a database engine telling us something is missing. Don't use craxDDrt.dll. Use craxDrt.dll.

Ludek

Former Member
0 Kudos

Ludek,

Thanks for the response. At one time I thought the craxxdrt.dll was used for external reports in vb6 and craxdrt.dll was used for internal reports. Seems that it should not matter.

At any rate, here is a graphic that shows how the name tag[ report |http://classreunionprogram.com/downloads/nametags_cr9.jpg]works with CR9 and VB6. This should give you a better idea of what is needed with CR XI R2 or for that matter CR 10.5 with VS 2008.

Kim

Former Member
0 Kudos

My main OS is 7 which has among other programs both CR9 and CR XI R2 Sp6. Also have a Virtual PC with Windows XP mode. In OS7 only one name tag report prints, two show the qe property msg. All other reports work.

Took that file and copied to the VPC and all reports, including three name tag reports.

Could one conclusion be that there is something going on with CR XI R2?

Former Member
0 Kudos

Ludek,

Now, when any of the reports are called in VB6, a run time error 713 'Application defined or object defined error' pops up. In this application I am using mostly CR9 viewers, however, on one I placed a CR XI R2 viewer as a test to see if the error could be eliminated. Same results. The error only occurs when deploying the app not when in development mode. This is happening on a VPC running XP mode and also on a 64 bit machine. Any ideas on that?

Earlier in this thread you mentioned that whenever 'Cannot find the QE property' message appears it means that something is missing. I am using CRAXdrt.dll. Do you have anything specific for this message?

Is there an update for the file(s) uploaded a while back?

Thanks for your help.

Kim

Former Member
0 Kudos

Cannot find QE property refers to this part of the form holding the viewer:


     Set crSection.ReportObjects("Classmate").FormattedPicture = _
        LoadPicture(Report.Sections("DetailSection3").ReportObjects("PicFile").Value)

The name tags have four (4) fields plus an ole object/picture and they are Firstname, Lastname, Maidenname and classphoto.

This only occurs using vb6 and CRXI R2. If this is commented out then the picture being used as place holder shows up on all name tags. If an ole object is inserted and the above is not used then no pictures are displayed on the name tag.

It seems that there are instances where a picture is used in a Crystal report using XI. Is there any place where that the picture would change such as on name tags? If so, how to?