Print Preview ActiveX Active Users: 41 / Visits Today: 62
Highest Active Users: 41
Print Preview ActiveX
Home | Profile | Register | Active Topics | Members | Search | FAQ | RSS
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Print Preview
 Tips & Tricks
 Number of Item in a group
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic: Splitting Paratext to fit on page(s) Topic Next Topic: VB Runtimes and various CAB files  

mvolcanes
Starting Member

3 Posts

Posted - 08/09/2005 :  17:33:38  Show Profile  Reply with Quote
Is there any way to generate a report like this:

Number Description Cost
1 Part 1 10.00
2 Part 1 30.00
--------
40.00
1 Part 2 10.00
2 Part 2 30.00
--------
40.00

The information is get of a query (Select Description,cost from table order by Description)
If you see the number has to be calculate at the report.

Thanks

Go to Bottom of Page

Waty Thierry
Forum Admin

Belgium
635 Posts

Posted - 08/09/2005 :  19:18:06  Show Profile  Visit Waty Thierry's Homepage  Reply with Quote
Yes, but you should need to do the calculation within your code, and preview it in PPreview.
If you want help, let me know, I can help you on that.

Come and visit :
www.immoassist.com
www.ppreview.net
www.vbdiamond.com
www.d2dsources.com
www.mandix.com
Go to Bottom of PageGo to Top of Page

mvolcanes
Starting Member

3 Posts

Posted - 08/09/2005 :  19:59:20  Show Profile  Reply with Quote
Thanks, can you help me with this report, I'm ussing a recordset to set into ppreview component.

quote:
Originally posted by Waty Thierry

Yes, but you should need to do the calculation within your code, and preview it in PPreview.
If you want help, let me know, I can help you on that.

Come and visit :
www.immoassist.com
www.ppreview.net
www.vbdiamond.com
www.d2dsources.com
www.mandix.com

Go to Bottom of PageGo to Top of Page

Waty Thierry
Forum Admin

Belgium
635 Posts

Posted - 08/09/2005 :  20:02:19  Show Profile  Visit Waty Thierry's Homepage  Reply with Quote
Sent me the DB, the query used for that, and the code you already wrote, and I will duplicate the layout you described on top.

Come and visit :
www.immoassist.com
www.ppreview.net
www.vbdiamond.com
www.d2dsources.com
www.mandix.com
Go to Bottom of PageGo to Top of Page

mvolcanes
Starting Member

3 Posts

Posted - 08/09/2005 :  20:11:39  Show Profile  Reply with Quote
The code is:

StrSql = "SELECT ASNDTL.TrnsClientPartNumber, "
StrSql = StrSql & "TrnsPalletNo, TrnsLabelSerial,TrnsContainerCode,TrnsContainerQuantity,TrnsUnitsPerContainer,"
StrSql = StrSql & "SUM (TrnsNoCases*TrnsCaseQty) AS TotCost FROM ASNDTL "
StrSql = StrSql & "INNER JOIN Pallet ON ASNDTL.TrnsItemNumber = Pallet.TrnsItemNumber and ASNDTL.TrnsNumber = Pallet.TrnsNumber "
StrSql = StrSql & "Where ASNDTL.TrnsNumber ='" & ASNID & "' "
StrSql = StrSql & " GROUP BY ASNDTL.TrnsClientPartNumber, Pallet.TrnsPalletNo, Pallet.TrnsLabelSerial , Pallet.TrnsNoCases, Pallet.TrnsCaseQty,TrnsContainerCode,TrnsContainerQuantity,TrnsUnitsPerContainer"
Set oRS = New ADODB.Recordset
oRS.Open StrSql, StrCnt, adOpenStatic, , adCmdText
'TrnsContainerCode,TrnsContainerQuantity,TrnsUnitsPerContainer

.CurrentFrame = "Inside"
.CurrentX = .C_Twips("0 cm")
.CurrentY = .C_Twips("1 cm")
.NewReport
.CurrentX = .C_Twips("0 cm")
.CurrentY = .C_Twips("1 cm")
.ReportHeaders oRS
.ModifyColumn "TrnsClientPartNumber", "Part Number", .ConvertToTwip(prInch, 1)
.ModifyColumn "TrnsPalletNo", "RAN", .ConvertToTwip(prInch, 0.75)
.ModifyColumn "TrnsLabelSerial", "Serial", .ConvertToTwip(prInch, 0.75)
.ModifyColumn "TotCost", Title:="Total", CalcType:=prCCSum, Align:=prCARight
.ModifyColumn "TrnsContainerCode", "Packing Code", .ConvertToTwip(prInch, 0.75)
.ModifyColumn "TrnsContainerQuantity", "Quantity", .ConvertToTwip(prInch, 0.7)
.ModifyColumn "TrnsUnitsPerContainer", "U.per Cont", .ConvertToTwip(prInch, 0.7)

.ModifyReport LineAroundReport:=False
.ModifyReport GroupCol:="TrnsClientPartNumber"
.ModifyReport LineBeforeCalc:=True
.ModifyReport LineAfterCalc:=False
.RecordsetReport oRS, True, False, prASPage


quote:
Originally posted by Waty Thierry

Sent me the DB, the query used for that, and the code you already wrote, and I will duplicate the layout you described on top.

Come and visit :
www.immoassist.com
www.ppreview.net
www.vbdiamond.com
www.d2dsources.com
www.mandix.com

Go to Bottom of PageGo to Top of Page
  Previous Topic: Splitting Paratext to fit on page(s) Topic Next Topic: VB Runtimes and various CAB files  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Print Preview ActiveX © Mandix Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000 Version 3.4.02