Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

manual crosstab

Status
Not open for further replies.

swetham

Programmer
May 5, 2010
257
DE
I have a table called "Leaves" with fields "name","initial","startdate","enddate",no_of_days". I want to create a report like,

SNo Name Initial dates days
1 n1 i1 2010-05-03 - 2010-05-05 3
2 n2 i2 2010-05-05 - 2010-05-06 2
Total 5

manual crosstab is the only way to do this or is there any other way?

Thanks,
Sweish
 
What part of this are you having trouble with? It looks like all you need to do is place the fields in the detail section and then right click on the days field and insert a sum.

-LB
 
In my database i have startdate and enddate so i want those two dates to be displayed in dates column with '-'. I wrote a formula
whileprintingrecords;
table.startdate+"-"+table.enddate

But it is not working. another problemis this is a sub report and i want the total in crosstab of main report to be displayed in subreport.
 
You don't need "whileprintingrecords". Just replace the "+" with "&" and you can then combine datatypes:

{table.startdate} & "-" & {table.enddate}

You use shared variables to pass values between a main report and a subreport, as you can see in responses to your other posts.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top