Print Page | Close Window

Line Number

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=1238
Printed Date: 02 May 2024 at 7:55am


Topic: Line Number
Posted By: figaro
Subject: Line Number
Date Posted: 28 Aug 2007 at 4:03am

Can any one please tell me how to insert line number in the detais section of the crysta report.....




Replies:
Posted By: rnareshk
Date Posted: 28 Aug 2007 at 5:50am
create a running total.
Steps:
1) Select the unique field in your table.
2) Put Count
3)Evaluate for each record
4)Reset is Never


-------------
Thank You,
Naresh.


Posted By: figaro
Date Posted: 28 Aug 2007 at 9:41pm
Thanks for your reply,
 
   I have many lines in my detail section, I have to insert serial numbers to each line, can I do it without any help from the table, just by using any formula... Plz help me out.
 
regards


Posted By: rnareshk
Date Posted: 29 Aug 2007 at 2:02am

Put the following in a formula field and use it:

WhilePrintingRecords;
Global NumberVar x;
x:=x+1;
x



-------------
Thank You,
Naresh.


Posted By: figaro
Date Posted: 29 Aug 2007 at 2:32am
Thank u very much sir,its working.. I have one major problem related to crystal report,if u  give me your email id,it will be more helpful for me. Can you give me ur id or shall i post it here itself
 
regards,

Vikram



Posted By: rnareshk
Date Posted: 29 Aug 2007 at 4:02am
post it in forum.
If I dont understand the problem, you can send the details by mail.


-------------
Thank You,
Naresh.


Posted By: figaro
Date Posted: 29 Aug 2007 at 4:59am

I am using 2 tables from a database namely OEORDH and OEORDHO, the fields of the table are like this....

 

OEORDH

 

ORDUNIQ  ORDNUMBR  CUSTOMER CUSTGROUP BILLNAME

 4546             QUT02               CUST01             GRI               XYZ             

 4610              QUT03               CUST02             GR2              YYY

 4738              QUT03               CUST01              GR1             XYZ

 

 

OEORDHO

 

  ORDUNIQ         OPTFIELD       VALUE

    4546                  OPTFLD1            ABCDE

    4546                  OPTFLD2            DEFG

    4610                  OPTFLD3            ASDF

    4738                  OPTFLD1            ABCD      

 

These are the contents of the two tables, actually I am preparing a sales order report, when I select a report of ORDNUMBR QUT02, I want the value in OEORDHO to be printed of the of the respective ORDUNIQ (i.e. value of 4546)

 

      To be clear when I select QUTO02 I want "ABCDE" to be printed on my report. But as per now we are getting all the items of the value field on the report.

     I wil tell u how I did it, I inserted a subreport and added a command from standard report creation wizard, and inserted the following query
 
select value
from oeordho
where orduniq in(select orduniq from oeordh)
 
              And linked this subreport to OEORDH.ORDUNIQ.
 
    By executing this all the items in the value field is printing on the report, is there any way to pass a parameter to that SQL query instead of (select orduniq from oeordh)???
 
I hope you understood the actually problem, if you did not understand plz tell me, I will try to explain more clearly
 
regards,
 
Vikram


Posted By: rnareshk
Date Posted: 29 Aug 2007 at 9:22pm
Is the data correct ? I found one - many relation between the tables.

-------------
Thank You,
Naresh.


Posted By: figaro
Date Posted: 29 Aug 2007 at 9:48pm
Yes Sir data is correct...
When I select QUT02 of ORDUNIQ 4546, then the corresponding value from the second table must get printed, ie ABCDE ,  DEFG.
 
I created a subreport and inserted a command from standard report creation wizard and wrote the following expression inside that command

select value
from oeordho
where orduniq in(select orduniq from oeordh)

I inserted this value into the subreport, I linked this subreport to OEORDH.ORDUNIQ,
I know my query displayes all the values in OEORDHO table.

Is there any way to pass a particular ORDUNIQ ie ("4546") to that sql expression so that I get only value corresponing to 4546 ie "ABCDE" "DEFG"...
 
Please tell me how can i acchieve this.
 
regards,
Vikram.

 


Posted By: rnareshk
Date Posted: 29 Aug 2007 at 10:13pm
Hi Vikram,
 
I tried this using a parameter.
 
1) Create a parameter
2) Click Report Menu -> Click Selection Formula -> Record
3) In the editor put the following condition
 
     {?param1}={OEORDHO.ORDUNIQ}
 
Thats it.
Please check whether its correct or not.
 


-------------
Thank You,
Naresh.


Posted By: figaro
Date Posted: 29 Aug 2007 at 11:52pm
No sir its not working,  can i send my .rpt file to you? will u plz look into it?
Its a request


Posted By: rnareshk
Date Posted: 30 Aug 2007 at 12:49am
Ok, send it to rnareshk@gmail.com

-------------
Thank You,
Naresh.


Posted By: figaro
Date Posted: 30 Aug 2007 at 5:06am
I have sent that to your mail sir.
 
regards,
Vikram


Posted By: firoza
Date Posted: 31 Aug 2007 at 1:53am
how to print serial no for each record in crystal report

-------------
cheers ,firoza


Posted By: figaro
Date Posted: 31 Aug 2007 at 4:27am
just type the follwing code in the formula section,
 

WhilePrintingRecords;

Global NumberVar x;

x:=x+1;

x

 

and place this formula in the details section..

Thank you.


Posted By: premnathk.chn
Date Posted: 03 Feb 2008 at 9:57pm
hi how to print SNo within the detail section(D1,D2,d3..) itself.

Eg:I have to display details about a company so i should have a table with serial no for each row
1 Factory Adress
2 No of Employess
3 Major Raw Material
.
.
.

also if any of the row doesnt have details it should be supressed(Which i have done) and the serial no should be adjusted accordingly.This will repeat for as many factories
Note:Each and every row is present in a different details

regards,
Prem



Print Page | Close Window