cancel
Showing results for 
Search instead for 
Did you mean: 

Comments in the Record Selection Formula area

scottpearce
Explorer
0 Kudos

Hi All,

I've been tasked with upgrading a vb6 project that uses Crystal Reports XI (the activeX viewer) to VS 2010. It went surprising well - the .NET Crystal Reports objects are very similar.

One question though - CrystalDecisions.CrystalReports.Engine.ReportDocument.RecordSelectionFormula behavior has slightly changed. In the current assembly comments are excluded. They used to be included. Our code relies on comment fields being present.

So my question is, where in the Crystal objects can I get the RecordSelectionFormula string that INCLUDES comment lines (lines preceded with //).

Thanks,

Scott

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Scott,

mmmmm, I've never seen anyone who used the comments that way, great idea.... Unfortunately I don't believe the Engine will get all of the text, just the valid SQL.

Also, you should be using RAS rather than the engine. RAS gets updated, the engine doesn't always, and RAS is the replacement for the RDC, not the engine.

I'll point this question out to our .NET Resource to see if he knows if there is an option to get the raw text.

Thank you

Don

Answers (3)

Answers (3)

scottpearce
Explorer
0 Kudos

Still waiting for this to appear in a hotfix or Service Pack.

scottpearce
Explorer
0 Kudos

How can I use this "ADAPT01498114" number to check on it's status?

Edited by: Scott Pearce on May 23, 2011 3:28 AM

0 Kudos

Hi All,

The fix for this is using this:

ReportClientDocument.DataDefController.DataDefinition.RecordFilter.FreeEditingText

it will return all of the text.

scottpearce
Explorer
0 Kudos

Thanks for your efforts, Don. I'll keep an eye on this thread, and go on with some other things in the meantime.

scottpearce
Explorer
0 Kudos

I look forward to hearing back. This is a show-stopper for me, as it means a complete re-write which will break all the reports our channel has out in the wild.

0 Kudos

Hi Scott,

Trevor has been able to get the comments by simply using the reportclientdocument.RecordSelectionFormula using the report engine.

For some unknown reason though I use the exact same code and all I get is the formula. He tested on Windows 2008 Server and I'm using Windows 7 64 bit....

We ran out of time to figure out why so I'll have more info for you tomorrow.

What OS are you using/testing on?

Thank you

Don

scottpearce
Explorer
0 Kudos

I'm using Windows 7 64-bit also.

0 Kudos

Hi Scott,

We've done more testing and we think, still testing, that the reason this simple code doesn't work is because the PC's had the beta installed. Any new PC it works:

MessageBox.Show("my formula: " + rpt.RecordSelectionFormula);

Can you test this and see what happens also?

Also, I should mention you can use both the report engine and RAS in the same app to get things done.

Just remember RAS is much much more powerful than the engine.

Thanks again

Don

0 Kudos

Hi Scott,

We found the cause, not the details though, if you run your app on Windows 2008 R2 then it works. If you are using Windows 7 or Windows 2008 R1 then it doesn't work. I did not test on Windows XP but likely the same issue.

I'll track the issue now and update this post once I have all the tracking info.

Problem_Report: ADAPT01498114

set for Service Pack 1 if all goes well.

Also note, Windows Server 2008 R2 is the only version in the[ supported platforms|http://www.sdn.sap.com/irj/sdn/crystalreports-dotnet?rid=/library/uuid/e06b8953-a62b-2d10-38b9-ca71f747e2b1] PDF file.

Thank you

Don

Edited by: Don Williams on Nov 18, 2010 6:30 AM