on 09-26-2013 5:48 AM
HI Experts,
I have an issue with the crystal report wherein I need to have the base docnum in my invoice form. I have multiple deliveries which copied to one invoice. I need the Docnum of deliveries to be place in my invoice header. I made a formula below which works fine in footer. What I need is to the header.
//Footer
whileprintingrecords;
global stringvar ConCat;
left(ConCat,length(ConCat)-1)
//Details
whileprintingrecords;
global stringvar ConCat;
ConCat := ConCat + Totext ({Command_1.docnum},0,"") +','
How can I do this in header.
Thank you.
RD
Hi Ardie,
That formula will never show the contents on the header due to the way CR evaluates formulas, sections etc.
To be able to display the output of the formula on the header, you would need a Subreport and a shared variable.
Try this:
1) Insert your original report as a Subreport and place it on the Report Header
2) Inside the Subreport, modify the formula on the Footer to:
whileprintingrecords;
global stringvar ConCat;
shared stringvar sh_concat;
sh_concat := left(ConCat,length(ConCat)-1);
3) Suppress all the sections of the Subreport
4) Back in the Main Report, reduce the size of the Subreport and make it so small that it appears no bigger than a dot.
5) Remove the formula you have in the Main Report's details and footer section
6) Create a formula with the code below and place it on the Header:
whileprintingrecords;
shared stringvar sh_concat;
P.S: Make sure this formula is place in a section below the section that holds the Subreport.
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ablilash,
Thank you for your reply. How about the details formula where I placed in the details. Should that formula remain in the main report? or all of the formula will be in the subreport and the only formula that will appear in the main report is:
whileprintingrecords;
shared stringvar sh_concat;
Thank you.
RD
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.