Skip to Content
avatar image
Former Member

Copy / Paste as new Formula

I'm new to CR but I've been programming for about 10+ years and have been working in VS2010 with VB.NET and C# for the past year. Prior to that I've developed with Visual Studio since version 4.2.

I've been tasked with a relatively mundane job to create a new row of formulas in several reports.

So, I have a row with over a dozen formulas that need to be replicated and slightly changed. I thought that if I simply selected, copied and pasted the formula objects it would paste and create new "copies" of the original formulas. Instead I find it creates a copy of the same formula or rather I should say it creates a "Link" to the original formula. Now this may be all well and good for some situations but this has been an infuriating thorn in my side to make the changes to these reports. I expected to scp (select, copy & paste) the objects and just change the new copies like I would have done in any other visual IDE.

I am hoping that someone in the community knows a special "key trick" that will allow me to do this. Kinda like the "key trick" I discovered for Format Painter. The "trick" being that if you want to "paint" more than one object with a selected format you can hold the ALT key down.

In any event, I really hope someone knows a trick for the SCP because I'm going to go nuts with one of the reports where I'll have to create 352 new formulas.

Thanks in advance,

Greg

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    May 11, 2011 at 04:08 PM

    Each formula needs to have it's own unique name. The easiest way, that I know of, is to assembly line the process...

    Start my creating all of the formula field names that you're going to need. Just keep them empty until you're done.

    Open the 1st "template" formula and copy the code. Now it's just a simple process of breezing through each empty formula an pasting in the code and making the necessary tweaks.

    HTH,

    Jason

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 11, 2011 at 08:02 PM

    Basically, Crystal Reports IDE is not very user friendly when trying to copy and paste existing formulas en-masse.

    I mean, that if you have 'n' number of formulas on a page and you want to duplicate some sub-set of those formulas but change them slightly, the ONLY solution CR IDE has is that you have to systematically create all new formulas and place them on the page.

    IF CR-IDE was like any OTHER visual IDE environment they'd allow you to "rubber-band" select a group of formulas, copy them, then paste them on the same page. CR-IDE should then be smart enough to create all new formulas placed where you want them and all the user would have to do is go through and rename and edit the new formulas.

    INSTEAD CR-IDE's solution is pasting the same formula, essentially giving you a "Link" to the original formula. If you edit the formula you change the original formula. This is useless.

    CR-IDE needs to be re-done correctly to follow the way Visual Studio has work for over a DECADE now. In fact just about ALL visual editting interfaces I can think of do it the way Visual Studio has done. Now, I'm not implying Visual Studio came up with this but it's the first that came to mind (most used).

    SAP PLEASE PLEASE fix this.

    Thank you,

    Greg

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Don Williams

      Thanks for getting back to me again. I'm currently using Crystal Reports 10 and I don't think my company is going to buy an upgrade so I guess I'm stuck there. Is there that much of a diff? I think I'll try the the trial version but I'm concerned about it affecting my installed "licensed/sanctioned" version.

      In any event I do agree that 352 formulas are excessive but I'm not familiar enough with CR to recommend a better way.

      I'm doing this work because I'm waiting for another .NET web service project to "come online" (business speak for getting sign off) and there's a consultant who thinks it's beneath his effort to waste time with these changes. To a certain extent I agree as consultants are far more costly than I am etc. So, I don't balk much and just "crank the press" so to speak.

      Once my project is back I'm back to familiar territory and increased happiness in the land of C#. 😊

      Thanks again, I'll close it later today.

      Greg

      PS. The interface for editing these messages has a glitch. When done "editing" your message the way to "post" the message is hitting the button labeled "Edit Message". Kinda funny considering that's the button I hit to get into the editing mode in the first place.

      Edited by: greatoak2011 on May 12, 2011 4:53 PM

      Edited by: greatoak2011 on May 12, 2011 4:53 PM