Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Location of Object Post Reply Post New Topic
Author Message
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet Topic: Location of Object
     Posted: 26 Nov 2014 at 12:33am
Morning all,

Is there a way to use a Text Object in a formula to calculate the position of it in relation to the report?

For example; a Text box is inserted mid way through a report (Crystal defaults the name to 'Text3') and you want to calculate where it appears as, depending on the previous Report data, it will turn up on different pages.

Ideally I'd like to do PageNumber(Text3) so it outputs the page number this object is on, but that's not possible.

Does anybody have any suggestions?
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 26 Nov 2014 at 4:29am
I know in CR 2011 you can change the X and Width with a formula, but nothing else.  You might be able to get somewhat creative with multiple sections (hiding and showing based on a formula).
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Nov 2014 at 4:36am
i think the poster wants to identify what page an object was printed on then reference that page number on a later page rather than change a locaion based on a condition.
What is unclear to me... is this a particluar field result out of many rows that are printing or is this one 'row' of data that is consuming multiple pages of the report?
 
IP IP Logged
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet Posted: 26 Nov 2014 at 4:52am
Hi guys,

DBlank - you are correct in what I am trying to achieve. I will expand a bit on what I am looking to do.

In my Report I have 'sections' which are identified by Text Boxes; for example Details A holds a Text Box with "1. {Section Title}" and then a subreport is in Details B. The Subreport will then start below the text box.

My idea is to now create a Contents Page based on the placement of the Text Box's.

So if Text1 ('1. {Section1Name}') is on page 3 following by 5 pages of subreport data and then Text2 ('2. {Section2Name}') is on page 9 I would be able to reference the Text box's to have a Contents Page at the top of the report.

Hopefully that makes sense....
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Nov 2014 at 4:54am
you are hoping the content page will be your first page (or at least preceding the content sections it is referencing)?

Edited by DBlank - 26 Nov 2014 at 4:54am
IP IP Logged
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet Posted: 26 Nov 2014 at 5:03am
That's correct, yes.

The problem is I cannot find a way to reference the page that the Text box's are on.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Nov 2014 at 5:05am
what is your final goal on this?
are you exporting or trying to create hyper links?
or just a reading table of contents for aprinted report?
IP IP Logged
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet Posted: 26 Nov 2014 at 5:08am
Just to have the contents page reference the Text Box locations and have it exported to a PDF document for reporting purposes. No Hyperlinks required (yet - now you've put the idea in my head!).
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Nov 2014 at 5:24am
take a look at VisualCut or use http://www.kenhamady.com/bookmarks.html
to see reviews of different add on products.
I know VisualCut would let you burst the report into PDFs with bookmarks and might have a table of contents trick.
Ido has added some new features I have not yet had a chance to play with or deploy into any of my processes.
Since you want this to preclude the printing process you have to use a process that takes advantage of the calculations that happen in an early data pass. Whileprintingrecords would give you results to late to use but is essentially what you would need to get to the printed page number. You would need to use a sub report that replicates the report to pull that in.
The other issue here is that you are not really doing any "grouping" per se, just different group sections in the same group.
There is an interesting SAP blog on this process using a sub report process to build a sting with page numbers...
 
You can also do an internet search on 'crystal report table of contents' for some more ideas.
However, I think you might consider your end game of the purpose of the table of contents and would something like VisualCut's bookmarks might end up being more effective.
 


Edited by DBlank - 26 Nov 2014 at 5:27am
IP IP Logged
Dr4ke
Senior Member
Senior Member


Joined: 09 May 2014
Online Status: Offline
Posts: 209
Quote Dr4ke Replybullet Posted: 26 Nov 2014 at 5:27am
Thank you mate :-) I shall take a look at these suggestions!
IP IP Logged
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