|
-
Oct 30th, 2014, 09:52 PM
#1
Thread Starter
Addicted Member
Details Section format, paylip-like report. landscape division
Hi..
I wonder if it is possible to create a report like payslip however
the there should only be 2 employees' payslip per page.
like in the image here.
Should I make a subreport here?
-
Oct 30th, 2014, 10:17 PM
#2
Addicted Member
Re: Details Section format, paylip-like report. landscape division
I guess it's achievable in Crystal Report, but you will be doing a very lot of work...
you can use a Subreport. And a lot of formulas to ensure that you can have 2 Employees per page.
---
The 1st thing you need to solve is, how will you take 2 employess? Are there Employee IDs in numeric order?
What if Employee 2 is deleted and Employee 1 is the first on the list, how will CR take the next employee?
It's hard to think though... *sigh*
Last edited by terry002; Oct 30th, 2014 at 10:26 PM.
If I had helped you...
Don't forget to mark your Inquiry as RESOLVED...
I will be glad if you can also give me some Reputation points in helping you (by Clicking Rate This Post)...
Happy VB Coding Everyone! 
-
Oct 30th, 2014, 10:30 PM
#3
Thread Starter
Addicted Member
Re: Details Section format, paylip-like report. landscape division
 Originally Posted by terry002
The 1st thing you need to solve is, how will you take 2 employess? Are there Employee IDs in numeric order?
What if Employee 2 is deleted and Employee 1 is the first on the list, how will CR take the next employee?
It's hard to think though... *sigh*
I will be pulling up the data using a query so there is a possibility that there will be lots of employees. and there will only be one record per employee. It doesnt matter if an employee is deleted.
-
Oct 30th, 2014, 10:34 PM
#4
Addicted Member
Re: Details Section format, paylip-like report. landscape division
here's the catch how can you tell the 2nd Subreport that he will be printing the next record?
That's what I'm worrying about...
If I had helped you...
Don't forget to mark your Inquiry as RESOLVED...
I will be glad if you can also give me some Reputation points in helping you (by Clicking Rate This Post)...
Happy VB Coding Everyone! 
-
Oct 30th, 2014, 10:37 PM
#5
Thread Starter
Addicted Member
Re: Details Section format, paylip-like report. landscape division
That's where I'm getting trouble. If there will only be one employee per page, that's a piece of cake
-
Oct 30th, 2014, 10:37 PM
#6
Addicted Member
Re: Details Section format, paylip-like report. landscape division
That's true... man that's the hard part.... 
Is it requested by the client?
If I had helped you...
Don't forget to mark your Inquiry as RESOLVED...
I will be glad if you can also give me some Reputation points in helping you (by Clicking Rate This Post)...
Happy VB Coding Everyone! 
-
Oct 30th, 2014, 10:41 PM
#7
Addicted Member
Re: Details Section format, paylip-like report. landscape division
You can do it actually, now I know,
You need to put your records to be printed inside a VIRTUAL TABLE in your SQL, with a TRACE NO. (1-# of records in your virtual table)
With that you can put a formula in your CR that it will print the next TRACE NO. (From your virtual table)... Something like that logic...
With that kind of scenario, you can use the 2 subreports.
I don't have so much time since we are just halfday today here in the office and will be leaving in a while.
If I had helped you...
Don't forget to mark your Inquiry as RESOLVED...
I will be glad if you can also give me some Reputation points in helping you (by Clicking Rate This Post)...
Happy VB Coding Everyone! 
-
Oct 30th, 2014, 10:42 PM
#8
Thread Starter
Addicted Member
Re: Details Section format, paylip-like report. landscape division
yeah.
inserting another Details Section will not help as well.
-
Oct 30th, 2014, 10:44 PM
#9
Thread Starter
Addicted Member
Re: Details Section format, paylip-like report. landscape division
are u in the philippines?
-
Oct 30th, 2014, 10:45 PM
#10
Addicted Member
Re: Details Section format, paylip-like report. landscape division
Another tip:
Use GLOBAL VARIABLE, because you will use it in both of your SUBREPORTS... (UPDATE IT PER SUBREPORT)
Can't elaborate it yet, but I know it will work.
---
To answer your question (thumbs up)
I know you're from the Phils. from your 1st post about your payslip some time ago.
If I had helped you...
Don't forget to mark your Inquiry as RESOLVED...
I will be glad if you can also give me some Reputation points in helping you (by Clicking Rate This Post)...
Happy VB Coding Everyone! 
-
Oct 30th, 2014, 10:46 PM
#11
Thread Starter
Addicted Member
Re: Details Section format, paylip-like report. landscape division
will try researching your suggestions. hoping for luck Thanks!
-
Oct 30th, 2014, 10:49 PM
#12
Addicted Member
Re: Details Section format, paylip-like report. landscape division
Your Virtual Table will be like your Payslip Table
You will just add 1 column for your tracing number 1 to Number of records.
That will be your guide in printing your payslip. and tell the CR which records it will print. 
---
Will be logging back next week... gtg! goodluck! ^_^
Last edited by terry002; Oct 30th, 2014 at 10:55 PM.
If I had helped you...
Don't forget to mark your Inquiry as RESOLVED...
I will be glad if you can also give me some Reputation points in helping you (by Clicking Rate This Post)...
Happy VB Coding Everyone! 
-
Oct 31st, 2014, 12:56 AM
#13
Thread Starter
Addicted Member
Re: Details Section format, paylip-like report. landscape division
Ah sorry..this is going to be a different format.
There will be multiple records per employee in this case.
-
Nov 2nd, 2014, 08:24 PM
#14
Addicted Member
Re: Details Section format, paylip-like report. landscape division
There will be multiple records per employee in this case.
So did you finished working on it?
If I had helped you...
Don't forget to mark your Inquiry as RESOLVED...
I will be glad if you can also give me some Reputation points in helping you (by Clicking Rate This Post)...
Happy VB Coding Everyone! 
-
Nov 4th, 2014, 01:29 AM
#15
Thread Starter
Addicted Member
Re: Details Section format, paylip-like report. landscape division
not yet,,,just figured out that the query will return multiple records per employee
-
Nov 4th, 2014, 02:03 AM
#16
Addicted Member
Re: Details Section format, paylip-like report. landscape division
 Originally Posted by bjay_tiamsic26
not yet,,,just figured out that the query will return multiple records per employee
It means you have 2 tables?
Am I correct?
You can still use 2 subreports then. 
---
I think we are the only two who talks in this thread, so we can use our native language then...
Last edited by terry002; Nov 4th, 2014 at 02:12 AM.
If I had helped you...
Don't forget to mark your Inquiry as RESOLVED...
I will be glad if you can also give me some Reputation points in helping you (by Clicking Rate This Post)...
Happy VB Coding Everyone! 
-
Nov 4th, 2014, 02:42 AM
#17
Thread Starter
Addicted Member
Re: Details Section format, paylip-like report. landscape division
ahaha, i guess so.
hmm no...
At first i thought there will only be one record per employee but now
there will be multiple...
ganto po kakalabasan..

there are specifically 2 employees in that table (the image)
-
Nov 4th, 2014, 02:57 AM
#18
Addicted Member
Re: Details Section format, paylip-like report. landscape division
Ganito gawin mo 2 subreports (pero same format):
Dapat yang data mo naka virtual table yung isa.
I guess yung 1st column mo dyan e yung Employee number (key mo yan sa inner join mo).
Sa virtual table gagawin mo, same ng Employee table Schema, the difference is maglalagay ka ng isang (1 ) column (auto-Number) this will be your key in telling the Crystal Report kung anu priprint nya sa page na yun. (kunin mo lang ang kailangan mo)
Basically you will start with ID 1 and 2 para sa 1st page and 3 and 4 sa 2nd Page.
Tapos from ijoin mo yung virtual table mo dyan sa table na yan
Sample Data:
Rowstamp---|---Emp No.---|---Name---|---Time In---|---Time Out---|
1 |900151 |Juan Cruz | 15:30 |16:45 |
1 |900151 |Juan Cruz | 14:00 |16:45 |
1 |900151 |Juan Cruz | 15:30 |16:45 |
Ngayon multiple data yan, lalagay mo Header part yung dapat 1 lang ang lalabas.
Tapos sa Detail part yung sinasabi mong multiple data.
If I had helped you...
Don't forget to mark your Inquiry as RESOLVED...
I will be glad if you can also give me some Reputation points in helping you (by Clicking Rate This Post)...
Happy VB Coding Everyone! 
-
Nov 4th, 2014, 03:01 AM
#19
Thread Starter
Addicted Member
Re: Details Section format, paylip-like report. landscape division
sge po try ko..
1st time ko magvirtual table, pero nakakuha nko reference..
ill get back on this thread po pag may problem or nasolve ko na hehe
salamat!
-
Nov 4th, 2014, 03:09 AM
#20
Addicted Member
Re: Details Section format, paylip-like report. landscape division
Unti untiin natin, gawin mo muna yung sa Virtual table before tayo punta sa next step, mahirap magmadali. masmaganda kung pulido ang ginagawa saka tayo punta sa next.
Tutorials:
http://www.mssqltips.com/sqlserverti...ble-variables/
Last edited by terry002; Nov 4th, 2014 at 03:14 AM.
If I had helped you...
Don't forget to mark your Inquiry as RESOLVED...
I will be glad if you can also give me some Reputation points in helping you (by Clicking Rate This Post)...
Happy VB Coding Everyone! 
-
Nov 4th, 2014, 03:13 AM
#21
Thread Starter
Addicted Member
Re: Details Section format, paylip-like report. landscape division
I was able to create a virtual table na po 
DECLARE @virtualTKAA TABLE
(
ID int IDENTITY not null,
EmployeeNo nvarchar(10),
EmployeeName nvarchar(120)
)
INSERT INTO @virtualTKAA (EmployeeNo,EmployeeName)
select distinct EmpNo, (Select LastName +', ' +FirstName from dbo.viewEmploymentHistory where EmployeeNo = tkAA.EmpNo ) as EmpName from [dbo].[TimeKeeping_Details_AA] tkAA where cutoffid=2
Select * from @virtualTKAA
-
Nov 4th, 2014, 03:14 AM
#22
Thread Starter
Addicted Member
Re: Details Section format, paylip-like report. landscape division
I have two main tables po na pnagkukunan,
Timekeeping_Details ung multiple values
Timekeeping_Summary yan po ung mga summation, so isang record sa isang employee lang
-
Nov 4th, 2014, 03:17 AM
#23
Thread Starter
Addicted Member
Re: Details Section format, paylip-like report. landscape division
pano ko po sasabhin kay crystal report na 1 & 2 for page 1?
-
Nov 4th, 2014, 03:23 AM
#24
Thread Starter
Addicted Member
Re: Details Section format, paylip-like report. landscape division
 Originally Posted by bjay_tiamsic26
I have two main tables po na pnagkukunan,
Timekeeping_Details ung multiple values
Timekeeping_Summary yan po ung mga summation, so isang record sa isang employee lang
never mind this reply po
-
Nov 4th, 2014, 03:26 AM
#25
Addicted Member
Re: Details Section format, paylip-like report. landscape division
Kaya 2 sub reports gagamitin mo, kasi may GLOBAL variable ka, which contains your "Auto-number" ID. (starts from 1 to number of records)
bawat galaw ng Sub Report, nag uupdate yung Variable na yun, which yun ang gagamitin mo para sa sub reports.
For Example (initializing Global Numbervar from your Main Report to 1):
Sub report 1 (hahanapin nya si ID 1):
Global Numbervar ID;
//After magprint ni Sub Report 1
ID := ID + 1
// so it means ID = 2
Subport report 2 (hahanpin nya si ID 2):
Global Numbervar ID;
//After magprint ni Sub Report 2
ID := ID + 1
//magiging ID = 3
Tuloy natin bukas ang pag uusap, out na kasi namin sa office. ^_^
If I had helped you...
Don't forget to mark your Inquiry as RESOLVED...
I will be glad if you can also give me some Reputation points in helping you (by Clicking Rate This Post)...
Happy VB Coding Everyone! 
-
Nov 4th, 2014, 07:58 PM
#26
Thread Starter
Addicted Member
Re: Details Section format, paylip-like report. landscape division
sge po..
ill try to research incrementing global variable.
may function po ba para malaman ni crystal report na tapos na magprint si Subreport 1 sa page 1?
-
Nov 4th, 2014, 08:42 PM
#27
Addicted Member
Re: Details Section format, paylip-like report. landscape division
I haven't tried it yet actually, parang pure logic pa lang yan, kasi di pa naman pinapagawa sa akin ang ganyang project. try ko minsan.
If I had helped you...
Don't forget to mark your Inquiry as RESOLVED...
I will be glad if you can also give me some Reputation points in helping you (by Clicking Rate This Post)...
Happy VB Coding Everyone! 
-
Nov 4th, 2014, 09:28 PM
#28
Addicted Member
Re: Details Section format, paylip-like report. landscape division
Update:
Di pala pwede gamitin yung FORMULA (SHARED VARIABLES) sa Subreports, hahaha! sakit din pala sa ulo pinapagawa ng client mo... :P
If I had helped you...
Don't forget to mark your Inquiry as RESOLVED...
I will be glad if you can also give me some Reputation points in helping you (by Clicking Rate This Post)...
Happy VB Coding Everyone! 
-
Nov 11th, 2014, 09:48 PM
#29
Addicted Member
Re: Details Section format, paylip-like report. landscape division
Ei @bjay_tiamsic26...
just found a solution for your INQUIRY... 
tried and tested...
If I had helped you...
Don't forget to mark your Inquiry as RESOLVED...
I will be glad if you can also give me some Reputation points in helping you (by Clicking Rate This Post)...
Happy VB Coding Everyone! 
-
Nov 11th, 2014, 11:06 PM
#30
Thread Starter
Addicted Member
Re: Details Section format, paylip-like report. landscape division
Wow!
Will you share it? hehe .. pleaseeeeeee
-
Nov 12th, 2014, 12:12 AM
#31
Addicted Member
Re: Details Section format, paylip-like report. landscape division
Requirements:
2 - tables
1 - Subreport
1 - Crystal Formula
---
1st table - (same fields from your Main Source), with additional field ID or something that MUST be AUTO INCREMENTED
2nd table - same fields as your 1ST TABLE, the difference is the ID field is NOT AUTO INCREMENTED. Why? because it will be your EVEN ID TABLE...
---
1. INSERT all the data you need from your 1st table, I'm sure it will be numbered automatically.(1 - # of records)
2. From the 1st table make use of INSERT SELECT statement and INSERT all the EVEN IDs by using the WHERE Clause "WHERE ID mod 2 = 0"
---
In your Crystal Report:
1. Make your MAIN REPORT as table 1. (be sure to SELECT ONLY THE ODD IDs)
2. Create a FORMULA, that will be the LINK to your SUBREPORT. formula must be (ID of your MAIN REPORT + 1)
2. Create a SUBREPORT for your EVEN TABLE then CHANGE THE SUBREPORT link to your formula...
Like the one attached above... Napansin mo ba yung System ID sa right ay same sa FORMULA sa kanan>?
Madali lang pala... ginawa ko lang ng 10 mins.
Kung Auto-Incremented ang field mo sa 1ST TABLE, dapat mareset mo sya sa 1... para wala problema ang source mo.
Last edited by terry002; Nov 12th, 2014 at 12:31 AM.
If I had helped you...
Don't forget to mark your Inquiry as RESOLVED...
I will be glad if you can also give me some Reputation points in helping you (by Clicking Rate This Post)...
Happy VB Coding Everyone! 
-
Nov 12th, 2014, 11:09 PM
#32
Thread Starter
Addicted Member
Re: Details Section format, paylip-like report. landscape division
still need to create a virtual table in this case correct?
Do you have sample of the project?
Last edited by bjay_tiamsic26; Nov 12th, 2014 at 11:24 PM.
-
Nov 13th, 2014, 12:07 AM
#33
Addicted Member
Re: Details Section format, paylip-like report. landscape division
Nope I don't have a sample project,
I just tested the database tables that I have here in the office.
About Virtual tables, if you want to use that kind of style, you need to make your SOURCE as a Stored Procedure.
But if you don't know how, you need to use a Physical table, which the records are deleted and refreshed everytime you print your payslip.
If I had helped you...
Don't forget to mark your Inquiry as RESOLVED...
I will be glad if you can also give me some Reputation points in helping you (by Clicking Rate This Post)...
Happy VB Coding Everyone! 
-
Nov 13th, 2014, 12:48 AM
#34
Thread Starter
Addicted Member
Re: Details Section format, paylip-like report. landscape division
can you guide me step by step?
do you have hangout hehe?
-
Nov 13th, 2014, 12:52 AM
#35
Addicted Member
Re: Details Section format, paylip-like report. landscape division
naka-provide na yung step by step, nasa taas na...
If I had helped you...
Don't forget to mark your Inquiry as RESOLVED...
I will be glad if you can also give me some Reputation points in helping you (by Clicking Rate This Post)...
Happy VB Coding Everyone! 
-
Nov 13th, 2014, 01:06 AM
#36
Thread Starter
Addicted Member
Re: Details Section format, paylip-like report. landscape division
Is there other way to make an additional field for my Main Table than creating a virtual table?
1st table - (same fields from your Main Source), with additional field ID or something that MUST be AUTO INCREMENTED
my maintable actually has an incrementing ID named AA_TkSummaryID
-
Nov 13th, 2014, 01:11 AM
#37
Thread Starter
Addicted Member
-
Nov 13th, 2014, 01:40 AM
#38
Addicted Member
Re: Details Section format, paylip-like report. landscape division
Create ka ng new table,
yung main report mo, papasok mo yung data na andyan sa Main Table mo,
Tapos lagyan mo ng Integer na nag-au-auto increment.
yung 2nd report mo? naka-join sa main report mo?
If I had helped you...
Don't forget to mark your Inquiry as RESOLVED...
I will be glad if you can also give me some Reputation points in helping you (by Clicking Rate This Post)...
Happy VB Coding Everyone! 
-
Nov 13th, 2014, 01:46 AM
#39
Thread Starter
Addicted Member
Re: Details Section format, paylip-like report. landscape division
 Originally Posted by terry002
yung 2nd report mo? naka-join sa main report mo?
you mean the subreport?.. no, hindi ysa naka-join sa main report.
-
Nov 13th, 2014, 01:48 AM
#40
Addicted Member
Re: Details Section format, paylip-like report. landscape division
I mean yung Main table mo, yung Details nya is yung nasa main report mo?
So mangyayari dyan, yung 1st table mo i-jojoin mo sa 2nd table mo, <main table>.AAEmpno = <2nd table>.Empno
If I had helped you...
Don't forget to mark your Inquiry as RESOLVED...
I will be glad if you can also give me some Reputation points in helping you (by Clicking Rate This Post)...
Happy VB Coding Everyone! 
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|